Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Womifa committed Aug 21, 2020
2 parents 979edbf + 772d0be commit dd26867
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Software/grab/grab.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ INCLUDEPATH += ./include \
../math/include \
..

QMAKE_CFLAGS = $$(CFLAGS)
QMAKE_CXXFLAGS = $$(CXXFLAGS)
QMAKE_LFLAGS = $$(LDFLAGS)

QMAKE_CXXFLAGS += -std=c++17
CONFIG(clang) {
QMAKE_CXXFLAGS += -stdlib=libc++
Expand Down
12 changes: 9 additions & 3 deletions Software/src/LedDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,44 +452,50 @@ AbstractLedDevice * LedDeviceManager::createLedDevice(SupportedDevices::DeviceTy

AbstractLedDevice* device = nullptr;

switch (deviceType){
switch (deviceType) {

case SupportedDevices::DeviceTypeLightpack:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::LightpackDevice";
device = (AbstractLedDevice *)new LedDeviceLightpack();
break;

case SupportedDevices::DeviceTypeAlienFx:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::AlienFxDevice";

# ifdef Q_OS_WIN
device = (AbstractLedDevice *)new LedDeviceAlienFx();
# else
break;
# endif /* Q_OS_WIN */
break;

case SupportedDevices::DeviceTypeAdalight:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::AdalightDevice";
device = (AbstractLedDevice *)new LedDeviceAdalight(Settings::getAdalightSerialPortName(), Settings::getAdalightSerialPortBaudRate());
break;

case SupportedDevices::DeviceTypeArdulight:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::ArdulightDevice";
device = (AbstractLedDevice *)new LedDeviceArdulight(Settings::getArdulightSerialPortName(), Settings::getArdulightSerialPortBaudRate());
break;

case SupportedDevices::DeviceTypeDrgb:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::DrgbDevice";
device = (AbstractLedDevice*)new LedDeviceDrgb(Settings::getDrgbAddress(), Settings::getDrgbPort(), Settings::getDrgbTimeout());
break;

case SupportedDevices::DeviceTypeDnrgb:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::DnrgbDevice";
device = (AbstractLedDevice*)new LedDeviceDnrgb(Settings::getDnrgbAddress(), Settings::getDnrgbPort(), Settings::getDnrgbTimeout());
break;

case SupportedDevices::DeviceTypeWarls:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::WarlsDevice";
device = (AbstractLedDevice*)new LedDeviceWarls(Settings::getWarlsAddress(), Settings::getWarlsPort(), Settings::getWarlsTimeout());
break;

case SupportedDevices::DeviceTypeVirtual:
DEBUG_LOW_LEVEL << Q_FUNC_INFO << "SupportedDevices::VirtualDevice";
device = (AbstractLedDevice *)new LedDeviceVirtual();
break;

default:
break;
Expand Down
4 changes: 4 additions & 0 deletions Software/src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ DEFINES += $${SUPPORTED_GRABBERS}

LIBS += -L../lib -lgrab -lprismatik-math

QMAKE_CFLAGS = $$(CFLAGS)
QMAKE_CXXFLAGS = $$(CXXFLAGS)
QMAKE_LFLAGS = $$(LDFLAGS)

CONFIG(gcc):QMAKE_CXXFLAGS += -std=c++11
CONFIG(clang) {
QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
Expand Down

0 comments on commit dd26867

Please sign in to comment.