X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2Fmain.c;h=5acebef3d29f7a57139d4cc2964eb6b6eee81fa1;hb=8c4fb11d9a590d3f9d361c36e0cb476568c00735;hp=3a95d0e0a3c6a396ba87cfee3056d959be610ac1;hpb=64f379e7446a716257f6030157f2cb254200aa7b;p=mTask.git diff --git a/int/main.c b/int/main.c index 3a95d0e..5acebef 100644 --- a/int/main.c +++ b/int/main.c @@ -23,14 +23,14 @@ void read_message(void) //Find next task if(input_available()){ uint8_t c = read_byte(); - debug("Receiving input: %c\n", c); + debug("Receiving input: %c %02x\n", c, c); switch(c){ case MSG_SDS_SPEC: debug("Receiving an sds"); sds_register(); break; case MSG_SDS_UPD: - debug("Receiving an sds"); + debug("Receiving an sds update"); //TODO do something with the return value sds_update(); break; @@ -40,7 +40,9 @@ void read_message(void) break; case MSG_GET_TASK: debug("Receiving a task"); + // write_dpin(0, true); task_register(); + // write_dpin(0, false); break; case '\0': break; @@ -76,7 +78,6 @@ void loop(void) debug("Current task to run: %d", ct); run_task(curtask); curtask->lastrun = cyclestart; -// write_byte('\n'); } } @@ -88,20 +89,15 @@ int main(int argc, char *argv[]){ gargv = argv; #endif - read_byte(); //Initialize systems setup(); sds_init(); task_init(); - while(!input_available()){ - delay(100); - } debug("booting up"); - while(true){ //Check for newetasks - debug("loop"); +// debug("loop"); loop(); delay(100); }