telldus-core: Add new package.

Signed-off-by: Peter Liedholm <PeterFromSwe884@gmail.com>
This commit is contained in:
Peter Liedholm
2019-01-19 17:04:14 +01:00
parent 2a4d79be0d
commit 03f255c9f0
8 changed files with 220 additions and 0 deletions
@@ -0,0 +1,23 @@
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};