Added GPS Model info
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
TinyGPSPlus gps;
|
TinyGPSPlus gps;
|
||||||
|
String gps_model = "None";
|
||||||
|
|
||||||
#define MIC_I2S_SAMPLE_RATE 16000
|
#define MIC_I2S_SAMPLE_RATE 16000
|
||||||
#define MIC_I2S_PORT I2S_NUM_1
|
#define MIC_I2S_PORT I2S_NUM_1
|
||||||
@@ -199,6 +199,7 @@ bool setupGPS()
|
|||||||
ver = SerialGPS.readStringUntil('\n');
|
ver = SerialGPS.readStringUntil('\n');
|
||||||
if (ver.startsWith("$GPTXT,01,01,02")) {
|
if (ver.startsWith("$GPTXT,01,01,02")) {
|
||||||
Serial.println("L76K GNSS init succeeded, using L76K GNSS Module\n");
|
Serial.println("L76K GNSS init succeeded, using L76K GNSS Module\n");
|
||||||
|
gps_model = "L76K";
|
||||||
result = true;
|
result = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1014,6 +1015,8 @@ void setup()
|
|||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
Serial.printf("Use baudrate : %u\n", baudrate[i]);
|
Serial.printf("Use baudrate : %u\n", baudrate[i]);
|
||||||
if (GPS_Recovery()) {
|
if (GPS_Recovery()) {
|
||||||
|
Serial.println("UBlox-M10Q GNSS init succeeded, using UBlox-M10Q GNSS Module\n");
|
||||||
|
gps_model = "UBlox-M10";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Serial.printf("Update baudrate : %u\n", baudrate[i]);
|
Serial.printf("Update baudrate : %u\n", baudrate[i]);
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ extern void setTxPower(int16_t dBm);
|
|||||||
extern void setSenderInterval(uint32_t interval_ms);
|
extern void setSenderInterval(uint32_t interval_ms);
|
||||||
extern bool enterSleep;
|
extern bool enterSleep;
|
||||||
|
|
||||||
|
extern String gps_model;
|
||||||
|
|
||||||
|
|
||||||
void lv_brightness_cb(lv_event_t *e)
|
void lv_brightness_cb(lv_event_t *e)
|
||||||
@@ -310,6 +311,7 @@ void setupUI(void)
|
|||||||
section = lv_menu_section_create(sub_gps_page);
|
section = lv_menu_section_create(sub_gps_page);
|
||||||
sub_section.push_back(section);
|
sub_section.push_back(section);
|
||||||
|
|
||||||
|
create_label(section, LV_SYMBOL_GPS, "Model", gps_model.c_str());
|
||||||
sub_gps_val.label_lat = create_label(section, LV_SYMBOL_GPS, "lat", "N.A");
|
sub_gps_val.label_lat = create_label(section, LV_SYMBOL_GPS, "lat", "N.A");
|
||||||
sub_gps_val.label_lng = create_label(section, LV_SYMBOL_GPS, "lng", "N.A");
|
sub_gps_val.label_lng = create_label(section, LV_SYMBOL_GPS, "lng", "N.A");
|
||||||
sub_gps_val.label_speed = create_label(section, LV_SYMBOL_SETTINGS, "Speed", "N.A");
|
sub_gps_val.label_speed = create_label(section, LV_SYMBOL_SETTINGS, "Speed", "N.A");
|
||||||
|
|||||||
Reference in New Issue
Block a user