gps: serial pin and configuration fixes (nrf52, meshadventurer, tracker_v1, heltec_tracker)
This commit is contained in:
1 parent
bd21096ce0
commit
a134188c62
11 files changed
+48
-72
No files matched your search
@@ -31,8 +31,8 @@ build_flags =
|
||||
-D USE_PIN_TFT=1
|
||||
-D PIN_VEXT_EN=3 ; Vext is connected to VDD which is also connected to OLED & GPS
|
||||
-D PIN_TFT_LEDA_CTL=21 ; LEDK (switches on/off via mosfet to create the ground)
|
||||
-D PIN_GPS_RX=33
|
||||
-D PIN_GPS_TX=34
|
||||
-D PIN_GPS_TX=33 ; GPS module TX -> MCU RX (GPIO33)
|
||||
-D PIN_GPS_RX=34 ; GPS module RX <- MCU TX (GPIO34)
|
||||
-D PIN_GPS_EN=35 ; N-ch MOSFET Q2 drives P-ch high-side switch → active HIGH (default)
|
||||
-D PIN_GPS_RESET=36
|
||||
-D PIN_GPS_RESET_ACTIVE=LOW
|
||||
|
||||
@@ -23,9 +23,14 @@ public:
|
||||
: NmeaGpsDriver(Serial1, PIN_GPS_TX, PIN_GPS_RX, GPS_RESET, GPS_EN,
|
||||
&board.periph_power) {}
|
||||
|
||||
void begin() override {
|
||||
NmeaGpsDriver::begin();
|
||||
sendNmeaSentence("$CFGSYS,h35155*68");
|
||||
void reset() override {
|
||||
NmeaGpsDriver::reset();
|
||||
// Send configuration after reset
|
||||
if (isActive()) {
|
||||
delay(250);
|
||||
sendNmeaSentence("$CFGSYS,h35155*68");
|
||||
// TODO: remove active wait (250ms is a lot)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -64,8 +69,7 @@ void HWTSensorManager::stop_gps() {
|
||||
}
|
||||
|
||||
bool HWTSensorManager::begin() {
|
||||
// init GPS port
|
||||
Serial1.begin(115200, SERIAL_8N1, PIN_GPS_RX, PIN_GPS_TX);
|
||||
// the GPS UART (pins, baud rate) is now configured by gps_driver when the GPS is started
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ build_flags =
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=false
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||
-D SX126X_RX_BOOSTED_GAIN=1
|
||||
-D PIN_GPS_RX=12
|
||||
-D PIN_GPS_TX=15
|
||||
-D PIN_GPS_TX=12 ; GPS module TX -> MCU RX (GPIO12)
|
||||
-D PIN_GPS_RX=15 ; GPS module RX <- MCU TX (GPIO15)
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
build_src_filter = ${esp32_base.build_src_filter}
|
||||
+<../variants/meshadventurer>
|
||||
|
||||
@@ -48,9 +48,7 @@ void MASensorManager::stop_gps() {
|
||||
}
|
||||
|
||||
bool MASensorManager::begin() {
|
||||
Serial1.setPins(PIN_GPS_RX, PIN_GPS_TX);
|
||||
Serial1.begin(9600);
|
||||
delay(500);
|
||||
// the GPS UART (pins, baud rate) is now configured by gps_driver when the GPS is started
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
class NanoG2UltraGpsDriver : public NmeaGpsDriver {
|
||||
public:
|
||||
NanoG2UltraGpsDriver(HardwareSerial& serial) : NmeaGpsDriver(serial) {
|
||||
NanoG2UltraGpsDriver(UART_TYPE& serial) : NmeaGpsDriver(serial) {
|
||||
pinMode(PIN_GPS_STANDBY, OUTPUT);
|
||||
digitalWrite(PIN_GPS_STANDBY, LOW);
|
||||
}
|
||||
|
||||
@@ -117,6 +117,8 @@
|
||||
#define GPS_RTC_INT (15) // P0.15
|
||||
#define GPS_RESETB (46) // P1.14
|
||||
|
||||
#define GPS_BAUDRATE 115200
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Temp+Lux Sensor
|
||||
|
||||
|
||||
Reference in new issue
Block a user