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: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: io/DeviceFeedback.cpp
- Revision:
- 71:063c45e99578
- Parent:
- 67:c360a2b2c948
- Child:
- 76:b07effe83fb8
--- a/io/DeviceFeedback.cpp Tue Feb 10 20:52:13 2015 +0000
+++ b/io/DeviceFeedback.cpp Mon Feb 16 09:17:30 2015 +0000
@@ -9,8 +9,14 @@
DeviceFeedback::DeviceFeedback(PwmOut speaker) :
_speaker(speaker),
- _thread(DeviceFeedback::thread_func, this)
+ _thread(DeviceFeedback::thread_func, this),
+ shieldLEDRed(D5),
+ shieldLEDBlue(D8),
+ shieldLEDGreen(D9)
{
+ shieldLEDRed = 255;
+ shieldLEDBlue = 255;
+ shieldLEDGreen = 255;
}
void DeviceFeedback::beepSuccess()
@@ -25,11 +31,17 @@
void DeviceFeedback::closeRelay()
{
+ shieldLEDRed = 255;
+ shieldLEDBlue = 255;
+ shieldLEDGreen = 0;
sendMessage(MSG_CLOSE_RELAY);
}
void DeviceFeedback::openRelay()
{
+ shieldLEDRed = 255;
+ shieldLEDBlue = 255;
+ shieldLEDGreen = 255;
sendMessage(MSG_OPEN_RELAY);
}
