Amir Chaudhary
/
Hexmodal-firmware_v3-1_hex_w_3d_14
Implemented LED Indicator Patterns
Diff: app/main.cpp
- Revision:
- 12:c1cf0e717684
- Parent:
- 11:e433cbbfd436
- Child:
- 13:831ffc0ea56c
--- a/app/main.cpp Wed Jan 02 02:27:07 2019 +0000 +++ b/app/main.cpp Thu Jan 03 16:12:43 2019 +0000 @@ -337,13 +337,6 @@ } } -void flash_builtin() { - myled = 1; // turn the LED on (HIGH is the voltage level) - wait(2); // wait for a second - myled = 0; // turn the LED off by making the voltage LOW - wait(1); // wait for a second -} - // Enables button when bouncing is over void button1_enabled_cb(void) { @@ -901,9 +894,6 @@ } void startTest(uint8_t *measurements) { - // Signal that test is running - flash_builtin(); - flash_builtin(); // Determine test length & measurement interval switch (MessageType) @@ -932,6 +922,8 @@ // Start test relayPin = 1; + AppLedStateOn = 1; + Led3StateChanged = true; } void endTest(uint8_t *measurements) { @@ -957,6 +949,8 @@ // End test relayPin = 0; + AppLedStateOn = 0; + Led3StateChanged = true; } void button_options_handler(void) @@ -1016,11 +1010,6 @@ set_time(1514764800); relayPin = 0; - flash_builtin(); - flash_builtin(); - flash_builtin(); - flash_builtin(); - running_test = false; joining = true; received_downlink = false; @@ -1031,6 +1020,8 @@ //button1.mode(PullUp); // Activate pull-up button1.fall(callback(button1_onpressed_cb)); // Attach ISR to handle button press event + AppLedStateOn = 0; + Led3StateChanged = true; while( 1 ) {