repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update sub"
[mTask.git]
/
int
/
main.c
diff --git
a/int/main.c
b/int/main.c
index
c4417f8
..
3388f21
100644
(file)
--- a/
int/main.c
+++ b/
int/main.c
@@
-24,6
+24,7
@@
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:
@@
-41,9
+42,10
@@
void read_message(void)
break;
case MSG_GET_TASK:
debug("Receiving a task");
break;
case MSG_GET_TASK:
debug("Receiving a task");
- // write_dpin(0, true);
- task_register();
- // write_dpin(0, false);
+ ct = task_register();
+ write_byte('t');
+ write16(ct);
+ write_byte('\n');
break;
case '\0':
break;
break;
case '\0':
break;
@@
-79,6
+81,13
@@
void loop(void)
debug("Current task to run: %d", ct);
run_task(curtask);
curtask->lastrun = cyclestart;
debug("Current task to run: %d", ct);
run_task(curtask);
curtask->lastrun = cyclestart;
+ if(curtask->interval == 0){
+ curtask->used = false;
+ write_byte('m');
+ write_byte('d');
+ write_byte('\n');
+ }
+ write_byte('\n');
}
}
}
}