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.
Diff: PowerControl.cpp
- Revision:
- 3:54792b95c570
- Parent:
- 2:1e3291e8294d
--- a/PowerControl.cpp Fri May 12 20:19:17 2017 +0000
+++ b/PowerControl.cpp Sun May 21 22:00:02 2017 +0000
@@ -2,7 +2,6 @@
extern RawSerial pc;
//extern DigitalOut ledError;
-extern CAN can;
PowerControl::PowerControl(PinName button):
_button(button), _canControl(BUCK2)
@@ -12,6 +11,8 @@
_button.setSamplesTillHeld( 200 );
_button.attach_asserted_held( this, &PowerControl::goSleep );
_button.attach_asserted( this, &PowerControl::goWakeup );
+
+ goWakeup();
}
void PowerControl::goSleep(){