application: add gm1351 decoding
This commit is contained in:
parent
56d540a04c
commit
93d85322d5
|
@ -477,6 +477,7 @@ void main(void)
|
|||
if (sensor_gm1351_received_flag) { // meter data has been received
|
||||
action = true; // action has been performed
|
||||
sensor_gm1351_received_flag = false; // reset flag
|
||||
if (sensor_gm1351_decode()) { // decode received value
|
||||
led_toggle(); // notify user about activity
|
||||
gm1351_last = rtc_get_counter_val(); // remember we got a value
|
||||
char measurement[10 + 1]; // to store the string with the measurement value
|
||||
|
@ -489,6 +490,7 @@ void main(void)
|
|||
spp_tx_putchar_nonblocking( measurement[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (action) { // go to sleep if nothing had to be done, else recheck for activity
|
||||
action = false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue