mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge remote-tracking branch 'origin' into macos_compile
Conflicts: test/CMakeLists.txt Former-commit-id: b91fa41ebbd5ec96f6a98dddc49f86b4b8af15d8
This commit is contained in:
commit
b63fdb0333
Binary file not shown.
1
deploy/hyperion.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion.tar.gz.REMOVED.git-id
Normal file
@ -0,0 +1 @@
|
|||||||
|
c358364291c2377c26ef2912042fae6d7fe50d08
|
@ -145,8 +145,8 @@ void BoblightClientConnection::handleMessage(const QString & message)
|
|||||||
red = qMax(0, qMin(255, int(255 * messageParts[4].toFloat(&rc1))));
|
red = qMax(0, qMin(255, int(255 * messageParts[4].toFloat(&rc1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t green = qMax(0, qMin(255, 255 * int(messageParts[5].toFloat(&rc2))));
|
uint8_t green = qMax(0, qMin(255, int(255 * messageParts[5].toFloat(&rc2))));
|
||||||
uint8_t blue = qMax(0, qMin(255, 255 * int(messageParts[6].toFloat(&rc3))));
|
uint8_t blue = qMax(0, qMin(255, int(255 * messageParts[6].toFloat(&rc3))));
|
||||||
|
|
||||||
if (rc1 && rc2 && rc3)
|
if (rc1 && rc2 && rc3)
|
||||||
{
|
{
|
||||||
|
@ -52,3 +52,9 @@ target_link_libraries(test_qregexp
|
|||||||
add_executable(test_qtscreenshot TestQtScreenshot.cpp)
|
add_executable(test_qtscreenshot TestQtScreenshot.cpp)
|
||||||
target_link_libraries(test_qtscreenshot
|
target_link_libraries(test_qtscreenshot
|
||||||
${QT_LIBRARIES})
|
${QT_LIBRARIES})
|
||||||
|
|
||||||
|
add_executable(test_rs232highspeed
|
||||||
|
TestRs232HighSpeed.cpp
|
||||||
|
../libsrc/leddevice/LedRs232Device.cpp)
|
||||||
|
target_link_libraries(test_rs232highspeed
|
||||||
|
serialport)
|
||||||
|
32
test/TestRs232HighSpeed.cpp
Normal file
32
test/TestRs232HighSpeed.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
// Hyperion includes
|
||||||
|
#include "../libsrc/leddevice/LedRs232Device.h"
|
||||||
|
|
||||||
|
|
||||||
|
class TestDevice : public LedRs232Device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TestDevice() :
|
||||||
|
LedRs232Device("/dev/ttyAMA0", 2000000)
|
||||||
|
{
|
||||||
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
|
int write(const std::vector<ColorRgb> &ledValues) {}
|
||||||
|
int switchOff() {};
|
||||||
|
|
||||||
|
void writeTestSequence()
|
||||||
|
{
|
||||||
|
uint8_t data = 'T';
|
||||||
|
|
||||||
|
writeBytes(1, &data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
TestDevice device;
|
||||||
|
device.writeTestSequence();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user