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.
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: LightSwitchAction.h
- Revision:
- 21:cfdaee0a2b50
- Parent:
- 9:90fadae5489a
- Child:
- 87:e9d77e9f9eae
--- a/LightSwitchAction.h Wed Feb 26 18:59:01 2014 +0000
+++ b/LightSwitchAction.h Wed Feb 26 21:29:18 2014 +0000
@@ -25,6 +25,9 @@
// what we act upon
#include "Light.h"
+// the resource we are bound to
+#define SWITCH_RESOURCE "/lt/0/on"
+
class LightSwitchAction : public Action {
private:
Light *m_light;
@@ -32,9 +35,8 @@
public:
LightSwitchAction(ErrorHandler *error_handler,Light *light);
virtual ~LightSwitchAction();
-
- ErrorHandler *logger();
-
+
+ void toggle();
void on();
void off();