GPS NEMA String parser library. Only supports SkyTraq Venus chip at this time.
Dependents: MTDOT-EVB-LinkCheck-AL MTDOT-BOX-EVB-Factory-Firmware-LIB-108 TelitSensorToCloud mDot_sensor_to_cloud ... more
Diff: GPSPARSER.cpp
- Revision:
- 13:b41779d6cddb
- Parent:
- 12:179474537b42
--- a/GPSPARSER.cpp Thu Aug 10 16:23:41 2017 -0500
+++ b/GPSPARSER.cpp Wed Jan 31 09:14:03 2018 -0600
@@ -35,6 +35,7 @@
: _getSentenceThread(&GPSPARSER::startSentenceThread,this),
_led(led),
_led_state(0),
+ _led_state_out(0),
_tick_running(false)
{
_gps_uart = uart;
@@ -191,6 +192,12 @@
if (! _tick_running) {
_tick.attach(this, &GPSPARSER::blinker, 0.5);
_tick_running = true;
+ } else {
+ if (_led_state_out != _led_state)
+ {
+ _led_state_out = _led_state;
+ _led->setPWM(NCP5623B::LED_3, _led_state_out);
+ }
}
}
}
@@ -480,6 +487,5 @@
void GPSPARSER::blinker() {
_led_state = (_led_state == 0) ? 8 : 0;
- _led->setPWM(NCP5623B::LED_3, _led_state);
}