Updated with emergency button and watchdog code

Dependencies:   wheelchaircontrol4 Watchdog ros_lib_kinetic

Revision:
13:1d0ed92043af
Parent:
11:c9afd96fa08b
Child:
14:240bcc258bfe
--- a/main.cpp	Thu Jun 27 18:11:42 2019 +0000
+++ b/main.cpp	Thu Jun 27 18:33:05 2019 +0000
@@ -67,14 +67,16 @@
     //testAccT.start();
     pc.printf("before starting\r\n");
     queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::compass_thread);  //Sets up sampling frequency of the compass_thread
-    queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::velocity_thread); //Sets up sampling frequency of the velosity_thread
+    queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::velocity_thread); //Sets up sampling frequency of the velocity_thread
     queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::assistSafe_thread); //Sets up sampling frequency of the velosity_thread
+    queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::emergencyButton_thread);      // Sets up sampling frequency of the emergencyButton_thread
     //queue.call_every(200, rosCom_thread); //Sets up sampling frequency of the velosity_thread
     t.reset();
     compass.start(callback(&queue, &EventQueue::dispatch_forever));      //Starts running the compass thread
     velocity.start(callback(&queue, &EventQueue::dispatch_forever));     //Starts running the velosity thread
     assistSafe.start(callback(&queue, &EventQueue::dispatch_forever));     //Starts running the velosity thread
-    queue.call_every(SAMPLEFREQ, &smart, &Wheelchair::emergencyButton_thread);      // Sets up sampling frequency of the emergencyButton_thread
+    emergencyButton.start(callback(&queue, &EventQueue::dispatch_forever)); 
+    
     //ros_com.start(callback(&queue, &EventQueue::dispatch_forever));     //Starts running the velosity thread
         pc.printf("After starting\r\n");