repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
layout is working, now up to the communication
[mTask.git]
/
client
/
main.c
diff --git
a/client/main.c
b/client/main.c
index
3388f21
..
90f6e5f
100644
(file)
--- a/
client/main.c
+++ b/
client/main.c
@@
-17,6
+17,7
@@
#define MSG_GET_TASK 't'
#define MSG_DEL_TASK 'd'
#define MSG_SDS_SPEC 's'
#define MSG_GET_TASK 't'
#define MSG_DEL_TASK 'd'
#define MSG_SDS_SPEC 's'
+#define MSG_SDS_DEL 'a'
#define MSG_SDS_UPD 'u'
void read_message(void)
#define MSG_SDS_UPD 'u'
void read_message(void)
@@
-24,7
+25,6
@@
void read_message(void)
//Find next task
if(input_available()){
uint8_t c = read_byte();
//Find next task
if(input_available()){
uint8_t c = read_byte();
- uint8_t ct;
debug("Receiving input: %c %02x\n", c, c);
switch(c){
case MSG_SDS_SPEC:
debug("Receiving input: %c %02x\n", c, c);
switch(c){
case MSG_SDS_SPEC:
@@
-36,16
+36,17
@@
void read_message(void)
//TODO do something with the return value
sds_update();
break;
//TODO do something with the return value
sds_update();
break;
+ case MSG_SDS_DEL:
+ debug("Receiving a delete SDS request");
+ sds_delete();
+ break;
case MSG_DEL_TASK:
debug("Receiving a delete task request");
task_delete();
break;
case MSG_GET_TASK:
debug("Receiving a task");
case MSG_DEL_TASK:
debug("Receiving a delete task request");
task_delete();
break;
case MSG_GET_TASK:
debug("Receiving a task");
- ct = task_register();
- write_byte('t');
- write16(ct);
- write_byte('\n');
+ task_register();
break;
case '\0':
break;
break;
case '\0':
break;