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
2 changes: 2 additions & 0 deletions variants/heltec_tracker/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ build_flags =
-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 GPS_BAUD_RATE=115200
-D ENV_INCLUDE_GPS=1
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
Expand Down
11 changes: 5 additions & 6 deletions variants/heltec_tracker/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ WRAPPER_CLASS radio_driver(radio, board);

ESP32RTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);
MicroNMEALocationProvider nmea = MicroNMEALocationProvider(Serial1);
// v1 has no dedicated GPS reset/enable pins - power is shared via VEXT with display
MicroNMEALocationProvider nmea = MicroNMEALocationProvider(Serial1, &rtc_clock, -1, -1, &board.periph_power);
HWTSensorManager sensors = HWTSensorManager(nmea);

#ifdef DISPLAY_CLASS
Expand Down Expand Up @@ -58,18 +59,16 @@ mesh::LocalIdentity radio_new_identity() {

void HWTSensorManager::start_gps() {
if (!gps_active) {
board.periph_power.claim();

_location->begin(); // Claims periph_power via RefCountedDigitalPin
gps_active = true;
Serial1.println("$CFGSYS,h35155*68");
Serial1.println("$CFGSYS,h35155*68"); // Configure GPS for all constellations
}
}

void HWTSensorManager::stop_gps() {
if (gps_active) {
gps_active = false;

board.periph_power.release();
_location->stop(); // Releases periph_power via RefCountedDigitalPin
}
}

Expand Down
1 change: 1 addition & 0 deletions variants/heltec_tracker/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class HWTSensorManager : public SensorManager {
const char* getSettingName(int i) const override;
const char* getSettingValue(int i) const override;
bool setSettingValue(const char* name, const char* value) override;
LocationProvider* getLocationProvider() override { return _location; }
};

extern HeltecV3Board board;
Expand Down