pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT

Dependencies:   mbed MMA8451Q USBDevice WakeUp vt100

Fork of afero_node_suntory_2017_06_15 by Orefatoi

Revision:
19:b45b077c88bc
Parent:
14:b205267fa5f6
Child:
21:d03c7bbb9f37
diff -r 9ac89f4f6aed -r b45b077c88bc sensors/ToDoQ.cpp
--- a/sensors/ToDoQ.cpp	Thu Jun 01 02:13:30 2017 +0000
+++ b/sensors/ToDoQ.cpp	Fri Jun 02 00:55:55 2017 +0000
@@ -20,10 +20,6 @@
 ToDoQ::ToDoQ()
 {
     todoQ = new USQueue<ToDo*>(NULL,USQueue<ToDo*>::QSIZE_16);
-    for (int i = 0; i < TODO_QUEUE_SIZE; i++)
-    {
-        q[i] = NULL;
-    }
 }
 
 void 
@@ -37,20 +33,21 @@
 {
     SensorsMain::getInstance()->loop();
     
-    ToDo* todoP = todoQ->deq();
+    ToDo* todoP = todoQ->pkq(NULL);
     
     if(todoP != NULL)
     {
         if(_onGetTodo(todoP)!=true)
         {
-//            SERIAL_PRINT_DBG("ToDoQ::_onGetTodo returned false\n");
             ++(todoP->retry_count);
-            todoQ->enq(todoP);
+            //todoQ->enq(todoP);
         }
         else
         {
+            todoQ->deq();
             SERIAL_PRINT_DBG("ToDoQ retry count : %d\n", todoP->retry_count);
             todoP->retry_count = 0;
+            todoP->success();
         }
     }
 }