fix if statements and sds publishing
[mTask.git] / int / task.c
index 2e0fbb4..3b5690a 100644 (file)
@@ -20,21 +20,18 @@ int task_register(int fd)
                die("Trying to add too much tasks...\n");
 
        memset(&tasks[ct], 0, sizeof(struct task));
-       debug("Interval: ");
        //Read interval
        read16(fd, c, tasks[ct].interval);
        //Read tasklength
-       debug("Length: ");
        read16(fd, c, tasks[ct].tlen);
 
        if(tasks[ct].tlen > MAXTASKSIZE)
                die("Task is too long: %d\n", tasks[ct].tlen);
        //Read task bytecode
        for(int i = 0; i<tasks[ct].tlen; i++){
-               debug("Read %d\n", i);
                read(fd, tasks[ct].bc+i, 1);
-               debug("t[][%i]: %d\n", i,
-                       tasks[ct].bc[i]);
+               debug("t[][%i]: 0x%02x %d\n", i,
+                       tasks[ct].bc[i], tasks[ct].bc[i]);
        }
        //Return the task number for later removal
        debug("Received a task of length %d\n", tasks[ct].tlen);