repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added debug statements, dynamic allocation is working for tasks
[mTask.git]
/
client
/
sds.c
diff --git
a/client/sds.c
b/client/sds.c
index
66bcb16
..
e6bf3b5
100644
(file)
--- 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);
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;
}
write_byte('\n');
return;
}