You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.0 KiB

  1. Added a typecast (signed/unsigned char problem). Should be portable.
  2. --- a/service/ProtocolIkea.cpp
  3. +++ b/service/ProtocolIkea.cpp
  4. @@ -23,7 +23,7 @@ int ProtocolIkea::methods() const {
  5. std::string ProtocolIkea::getStringForMethod(int method, unsigned char level, Controller *) {
  6. const char B1[] = {84, 84, 0};
  7. - const char B0[] = {170, 0};
  8. + const char B0[] = {(char)170, 0};
  9. int intSystem = this->getIntParameter(L"system", 1, 16)-1;
  10. int intFadeStyle = TelldusCore::comparei(this->getStringParameter(L"fade", L"true"), L"true");
  11. --- a/service/ProtocolX10.cpp
  12. +++ b/service/ProtocolX10.cpp
  13. @@ -22,7 +22,7 @@ int ProtocolX10::methods() const {
  14. std::string ProtocolX10::getStringForMethod(int method, unsigned char data, Controller *controller) {
  15. const unsigned char S = 59, L = 169;
  16. const char B0[] = {S, S, 0};
  17. - const char B1[] = {S, L, 0};
  18. + const char B1[] = {S, (char)L, 0};
  19. const unsigned char START_CODE[] = {'S', 255, 1, 255, 1, 255, 1, 100, 255, 1, 180, 0};
  20. const unsigned char STOP_CODE[] = {S, 0};