”Amend mymesh.h to Meck v0.3 || ‘target.h’ - Added #include "variant.h" at the top to ensure HAS_GPS is always defined before the conditional includes || target.cpp - Added debug output to verify HAS_GPS is defined at compile and runtime || ‘TDeckBoard.h’ - Added #include "variant.h" for pin definitions || Added #include "variant.h" to ‘main.cpp’ to ensure HAS_GPS is defined || Added code to ‘main.cpp’ to enable GPS by default after sensors.begin() as longpress not currently functional for gps toggle || Changed battery icon size in ‘uitask.cpp’ from 24 to 22 width and 10 to 8 height.”

This commit is contained in:
pelgraine
2026-01-28 19:38:01 +11:00
parent e95746b676
commit cfd2d51f79
8 changed files with 78 additions and 7 deletions
+16
View File
@@ -31,6 +31,22 @@ void TDeckBoard::begin() {
Serial.println("TDeckBoard::begin() - LoRa power enabled");
#endif
// Enable GPS module power and initialize Serial2
#if HAS_GPS
#ifdef PIN_GPS_EN
pinMode(PIN_GPS_EN, OUTPUT);
digitalWrite(PIN_GPS_EN, GPS_EN_ACTIVE); // GPS_EN_ACTIVE is 1 (HIGH)
delay(100); // Allow GPS to power up
Serial.println("TDeckBoard::begin() - GPS power enabled");
#endif
// Initialize Serial2 for GPS with correct pins
Serial2.begin(GPS_BAUDRATE, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);
Serial.print("TDeckBoard::begin() - GPS Serial2 initialized at ");
Serial.print(GPS_BAUDRATE);
Serial.println(" baud");
#endif
// Configure user button
pinMode(PIN_USER_BTN, INPUT);