Niels Leijen / PowerControl
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(){