X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2Fmain.c;h=c4417f8cfd000b501a6a4e0b7be8561629846eb2;hb=ee5171fbc1c8e1ea7454e95b3e89c24338423523;hp=bd0a42854324dc5e33ae0c38632a735cbb9b3d25;hpb=2520cfc83a29d273b17441c5cdf411f1182bbb62;p=mTask.git diff --git a/int/main.c b/int/main.c index bd0a428..c4417f8 100644 --- a/int/main.c +++ b/int/main.c @@ -3,7 +3,8 @@ #include #include -#ifndef STM +#ifdef STM +#else #include #endif @@ -23,14 +24,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 +41,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 +79,6 @@ void loop(void) debug("Current task to run: %d", ct); run_task(curtask); curtask->lastrun = cyclestart; -// write_byte('\n'); } } @@ -88,22 +90,16 @@ 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"); - + //debug("booting up"); while(true){ //Check for newetasks - debug("loop"); +// debug("loop"); loop(); - delay(10); + delay(50); } return 0; }