Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion variants/heltec_t114/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ bool T114SensorManager::begin() {
Serial1.begin(9600);

// Try to detect if GPS is physically connected to determine if we should expose the setting
pinMode(VEXT_EN, OUTPUT);
pinMode(GPS_EN, OUTPUT);
digitalWrite(GPS_EN, HIGH); // Power on GPS
digitalWrite(VEXT_EN, HIGH); // Power on GPS
digitalWrite(GPS_EN, HIGH); // GPS_EN is GPS_WAKEUP

// Give GPS a moment to power up and send data
delay(1500);
Expand All @@ -75,9 +77,12 @@ bool T114SensorManager::begin() {
if (gps_detected) {
MESH_DEBUG_PRINTLN("GPS detected");
digitalWrite(GPS_EN, LOW); // Power off GPS until the setting is changed
// Keep Vext active, otherwise GPS jumps back on...
} else {
MESH_DEBUG_PRINTLN("No GPS detected");
digitalWrite(GPS_EN, LOW);
// No GPS found, Vext not needed
digitalWrite(VEXT_EN, LOW);
}

return true;
Expand Down
8 changes: 7 additions & 1 deletion variants/heltec_t114/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,14 @@
////////////////////////////////////////////////////////////////////////////////
// GPS

#define GPS_EN (21)
#define VEXT_EN (21)

#define GPS_RESET (38)
#define GPS_WAKE_UP (34)
#define GPS_PPS (36)

// Send GPS to sleep, Vext off still has GPS active
#define GPS_EN GPS_WAKE_UP

////////////////////////////////////////////////////////////////////////////////
// TFT
Expand Down