not working again.
[mTask.git] / int / task.c
index d00959a..8fde866 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifndef STM32F767xx
+#ifndef STM
 #include <unistd.h>
 #include <stdio.h>
 #endif
@@ -29,16 +29,22 @@ int task_register(void)
        memset(&tasks[ct], 0, sizeof(struct task));
        //Read interval
        tasks[ct].interval = read16();
+       debug("interval");
+       debugi(tasks[ct].interval);
        //Read tasklength
        tasks[ct].tlen = read16();
+       debug("length");
+       debugi(tasks[ct].tlen);
 
        if(tasks[ct].tlen > MAXTASKSIZE)
                die("Task is too long: %d", tasks[ct].tlen);
        //Read task bytecode
        for(unsigned int i = 0; i<tasks[ct].tlen; i++){
                tasks[ct].bc[i] = read_byte();
-               debug("t[][%i]: 0x%02x %d", i,
-                       tasks[ct].bc[i], tasks[ct].bc[i]);
+               debug("bc read:");
+               debugi(i);
+//             debug("t[][%i]: 0x%02x %d", i,
+//                     tasks[ct].bc[i], tasks[ct].bc[i]);
        }
        //Return the task number for later removal
        debug("Received a task of length %d", tasks[ct].tlen);