Niels Leijen / PowerControl

Files at this revision

API Documentation at this revision

Comitter:
kwasymodo
Date:
Sun May 21 22:00:02 2017 +0000
Parent:
2:1e3291e8294d
Commit message:
changed stuff;

Changed in this revision

PowerControl.cpp Show annotated file Show diff for this revision Revisions of this file
PowerControl.h Show annotated file Show diff for this revision Revisions of this file
--- 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(){
--- a/PowerControl.h	Fri May 12 20:19:17 2017 +0000
+++ b/PowerControl.h	Sun May 21 22:00:02 2017 +0000
@@ -1,6 +1,9 @@
 #ifndef POWERCONTROL_H
 #define POWERCONTROL_H
 
+// uncomment to send debug information
+#define DEBUG
+
 #include "mbed.h"
 // include 3rd party library
 #include "PinDetect.h"