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

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