Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MPU6050IMU QEI RPCInterface mbed
Fork of zumy_mbed by
Revision 13:af3e8a8189ed, committed 2016-03-16
- Comitter:
- jlamyi
- Date:
- Wed Mar 16 21:59:54 2016 +0000
- Parent:
- 12:ff5d24a59ebe
- Child:
- 14:a153ce7cc4c8
- Commit message:
- took off watchdog
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 26 23:35:50 2016 +0000
+++ b/main.cpp Wed Mar 16 21:59:54 2016 +0000
@@ -3,7 +3,7 @@
#include "MPU6050.h"
#include "QEI.h"
-bool debug = false;
+//bool debug = false;
extern "C" void mbed_reset();
@@ -13,8 +13,8 @@
RPCFunction gsd(&GetSensorData, "gsd");
void Reset(char* input, char* output);
RPCFunction rst(&Reset, "rst");
-void WD_init(char* input, char* output);
-RPCFunction wdinit(&WD_init, "wdinit");
+//void WD_init(char* input, char* output);
+//RPCFunction wdinit(&WD_init, "wdinit");
float accel_x, accel_y, accel_z, gyro_x, gyro_y, gyro_z;
int r_enc, l_enc;
@@ -31,6 +31,7 @@
// Simon's Watchdog code from
// http://mbed.org/forum/mbed/topic/508/
+/*
class Watchdog {
public:
// Load timeout value in watchdog timer and enable
@@ -48,9 +49,9 @@
LPC_WDT->WDFEED = 0x55;
}
};
-
+*/
// Setup the watchdog timer
-Watchdog wdt;
+// Watchdog wdt;
int main() {
init_done = 0;
@@ -119,13 +120,15 @@
// RPCFunction
void GetSensorData(char* input, char* output){
sprintf(output, "%f,%f,%f,%f,%f,%f,%i,%i", accel_x, accel_y, accel_z, gyro_x, gyro_y, gyro_z, l_enc, r_enc);
- wdt.kick();
+ //wdt.kick();
}
void Reset(char* input, char* output){
mbed_reset();
}
+/*
void WD_init(char* input, char* output){
- wdt.kick(0.5);
+ //wdt.kick(0.5);
}
+*/
\ No newline at end of file
