X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Fsds.c;h=e6bf3b560d04b54fc06db50350cdf836d96d5da1;hb=09b207a39b7791098daafd7d87c3ad9d3db3e19f;hp=66bcb16a407c166a93faa8a2ad3fbec9228e0d53;hpb=7ab8606c3d22a2bc2743eae7a398407c84d502f2;p=mTask.git diff --git a/client/sds.c b/client/sds.c index 66bcb16..e6bf3b5 100644 --- a/client/sds.c +++ b/client/sds.c @@ -85,7 +85,21 @@ void sds_publish(int id) write_byte('p'); write16(sdss[cs].id); write_byte(sdss[cs].type); - write16(sdss[cs].value); + + switch(sdss[cs].type){ + //Long + case 'l': + //Int + case 'i': + write16(sdss[cs].value); + break; + case 'b': //Bool + case 'c': //Character + case 'B': //Button + case 'L': //UserLED + write_byte(sdss[cs].value); + break; + } write_byte('\n'); return; }