System Management code
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: main.cpp
- Revision:
- 31:7eaa5e881b56
- Parent:
- 30:91af74a299e1
- Child:
- 32:e70407021ad2
--- a/main.cpp Thu Nov 13 10:53:10 2014 +0000
+++ b/main.cpp Fri Nov 14 06:05:59 2014 +0000
@@ -1,9 +1,10 @@
#include "IOobjects.h"
#include "runTime.h"
#include "outDiagnostics.h"
+#include "serviceCAN.h"
int main() {
- wdt.kick(0.11); // Kick the watchdog timer, set the timeout to 110ms
+ wdt.kick(0.25); // Kick the watchdog timer, set the timeout to 110ms
pc.baud(921600);
pc.printf("\r\n\r\nSys Mgmt Reset\r\n");
can.mode(FIFO); // Use FIFO mode
@@ -24,10 +25,11 @@
// Start the serial, CAN threads
Thread serial_out(outDiagnostics::thread_serialOut, 0, osPriorityAboveNormal, 6000); // Allocate 6kB RAM stack
- Thread can_out(outDiagnostics::thread_canOut, 0, osPriorityAboveNormal, 256); // Allocate 256B RAM stack
+ Thread can_out(outDiagnostics::thread_canOut, 0, osPriorityAboveNormal); // Allocate 256B RAM stack
// Background task
while(1) {
// Service CAN and Xbee logic
+ if (canbus::serviceCAN());
}
}
\ No newline at end of file
