diff --git a/deploy/hyperion.tar.gz b/deploy/hyperion.tar.gz deleted file mode 100644 index 04948604..00000000 Binary files a/deploy/hyperion.tar.gz and /dev/null differ diff --git a/deploy/hyperion.tar.gz.REMOVED.git-id b/deploy/hyperion.tar.gz.REMOVED.git-id new file mode 100644 index 00000000..75bbb7c6 --- /dev/null +++ b/deploy/hyperion.tar.gz.REMOVED.git-id @@ -0,0 +1 @@ +c358364291c2377c26ef2912042fae6d7fe50d08 \ No newline at end of file diff --git a/libsrc/boblightserver/BoblightClientConnection.cpp b/libsrc/boblightserver/BoblightClientConnection.cpp index de254803..f78d6784 100644 --- a/libsrc/boblightserver/BoblightClientConnection.cpp +++ b/libsrc/boblightserver/BoblightClientConnection.cpp @@ -145,8 +145,8 @@ void BoblightClientConnection::handleMessage(const QString & message) 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 blue = qMax(0, qMin(255, 255 * int(messageParts[6].toFloat(&rc3)))); + uint8_t green = qMax(0, qMin(255, int(255 * messageParts[5].toFloat(&rc2)))); + uint8_t blue = qMax(0, qMin(255, int(255 * messageParts[6].toFloat(&rc3)))); if (rc1 && rc2 && rc3) { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fa4658bd..707d23ee 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,3 +48,9 @@ target_link_libraries(test_qregexp add_executable(spidev_test spidev_test.c) add_executable(gpio2spi switchPinCtrl.c) + +add_executable(test_rs232highspeed + TestRs232HighSpeed.cpp + ../libsrc/leddevice/LedRs232Device.cpp) +target_link_libraries(test_rs232highspeed + serialport) diff --git a/test/TestRs232HighSpeed.cpp b/test/TestRs232HighSpeed.cpp new file mode 100644 index 00000000..95707ca4 --- /dev/null +++ b/test/TestRs232HighSpeed.cpp @@ -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 &ledValues) {} + int switchOff() {}; + + void writeTestSequence() + { + uint8_t data = 'T'; + + writeBytes(1, &data); + } +}; + +int main() +{ + TestDevice device; + device.writeTestSequence(); + + return 0; +}