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 CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: Libs/DC_DC/DC_DC.cpp
- Revision:
- 34:18bcf276d3bf
- Parent:
- 30:91af74a299e1
- Child:
- 36:0afc0fc8f86b
--- a/Libs/DC_DC/DC_DC.cpp Tue Jan 06 20:45:26 2015 +0000
+++ b/Libs/DC_DC/DC_DC.cpp Wed Jan 07 03:25:50 2015 +0000
@@ -58,11 +58,8 @@
// Do nothing if already on
if (on && dcdcControl == ON) return;
- // Do nothing if error present
- if (critError) return;
-
- // If start requested
- if (on) {
+ // If start requested and no error
+ if (on && !critError) {
dcdcControl = ON;
starting = true;
startTimer.reset();
@@ -70,6 +67,7 @@
stopTimer.stop();
stopTimer.reset();
stopping = false;
+
// If stop requested
} else {
stopping=true;
@@ -166,8 +164,8 @@
if (critError || starting || stopping || !(status & 1) || dcdcControl == OFF) return;
else {
- if (chan == FAN1) fan1.write(duty);
- if (chan == FAN2) fan2.write(duty);
+ if (chan == FAN1) fan1.write(duty);
+ if (chan == FAN2) fan2.write(duty);
if (chan == PUMP1) pump1.write(duty);
if (chan == PUMP2) pump2.write(duty);
}
