revert mission timer to 32 bit, add signal level monitoring
This commit is contained in:
@@ -26,11 +26,11 @@ void gps_init()
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_CTS_RTS,
|
||||
.rx_flow_ctrl_thresh = 122,
|
||||
};
|
||||
ESP_ERROR_CHECK(uart_param_config(GPS_UART_NUM, &uart_config));
|
||||
ESP_ERROR_CHECK(uart_set_pin(GPS_UART_NUM, GPS_TXD, GPS_RXD, GPS_RTS, GPS_CTS));
|
||||
ESP_ERROR_CHECK_WITHOUT_ABORT(uart_param_config(GPS_UART_NUM, &uart_config));
|
||||
ESP_ERROR_CHECK_WITHOUT_ABORT(uart_set_pin(GPS_UART_NUM, GPS_TXD, GPS_RXD, GPS_RTS, GPS_CTS));
|
||||
|
||||
const int uart_buffer_size = (1024 * 2);
|
||||
ESP_ERROR_CHECK(uart_driver_install(GPS_UART_NUM, uart_buffer_size, uart_buffer_size, 10, &uart_queue, 0));
|
||||
ESP_ERROR_CHECK_WITHOUT_ABORT(uart_driver_install(GPS_UART_NUM, uart_buffer_size, uart_buffer_size, 10, &uart_queue, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void gps_task(void *arg)
|
||||
if (line[0] == '$') {
|
||||
ESP_LOGI(TAG, "Received NMEA: %s", line);
|
||||
|
||||
if (strstr(line, "$GPGGA") == line) {
|
||||
if (strstr(line, "$GNGGA") == line) {
|
||||
parse_gpgga(line);
|
||||
parse_gpgga_to_struct(line, &gpsDataOut);
|
||||
} else if (strstr(line, "$GPRMC") == line) {
|
||||
|
Reference in New Issue
Block a user