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: mbed MODSERIAL FATFileSystem
Diff: System/StaticDefs.cpp
- Revision:
- 87:6d95f853dab3
- Parent:
- 85:dd8176285b6e
- Child:
- 99:9d0849f5fcd7
- Child:
- 101:c24f70abb124
diff -r ba3a118b0080 -r 6d95f853dab3 System/StaticDefs.cpp
--- a/System/StaticDefs.cpp Thu May 02 20:34:16 2019 +0000
+++ b/System/StaticDefs.cpp Wed May 08 13:24:04 2019 +0000
@@ -64,6 +64,10 @@
static IMU imu(p28, p27); // tx, rx pin
return imu;
}
+Sensors & sensors() {
+ static Sensors sensors;
+ return sensors;
+}
OuterLoop & depthLoop() {
static OuterLoop depthLoop(0.1, 0); // interval, sensor type
@@ -79,6 +83,11 @@
static OuterLoop headingLoop(0.1, 2); // interval, sensor type
return headingLoop;
}
+OuterLoop & altimLoop() {
+ static OuterLoop altimLoop(0.1, 3); // interval, sensor type
+ return altimLoop;
+}
+
StateMachine & stateMachine() {
static StateMachine stateMachine;
@@ -99,20 +108,16 @@
return legController;
}
-Sensors & sensors() {
- static Sensors sensors;
- return sensors;
-}
MbedLogger & mbedLogger() {
static MbedLogger mbedLogger("/local/"); //local file system
return mbedLogger;
}
-MbedLogger & sdLogger() {
- static MbedLogger sdLogger("/sd/");
- return sdLogger;
-}
+//MbedLogger & sdLogger() { // leaving this in with no SD card might be a problem.
+// static MbedLogger sdLogger("/sd/");
+// return sdLogger;
+//}
DigitalOut & led1() {
static DigitalOut led1(LED1);
@@ -133,7 +138,10 @@
static DigitalOut led4(LED4);
return led4;
}
-
+DigitalIn & motorDisconnect() {
+ static DigitalIn motorDisconnect(p24, PullDown);
+ return motorDisconnect;
+}
Gui & gui() {
static Gui pythonGUI;
return pythonGUI;