Add Heltec T114 GPS support and fix T114 FW

This commit is contained in:
jacob.eva 2025-02-24 11:22:44 +00:00
parent 0f29d1b65e
commit 1d79b1e8a9
No known key found for this signature in database
GPG key ID: 0B92E083BBCCAA1E
6 changed files with 85 additions and 5 deletions

View file

@ -46,7 +46,7 @@
SPIClass interface_spi[1] = {
// SX1262
SPIClass(
NRF_SPIM3,
NRF_SPIM1,
interface_pins[0][3],
interface_pins[0][1],
interface_pins[0][2]
@ -132,8 +132,14 @@ void setup() {
pinMode(PIN_LED_GREEN, OUTPUT);
pinMode(PIN_LED_BLUE, OUTPUT);
delay(200);
#elif BOARD_MODEL == BOARD_HELTEC_T114
delay(200);
pinMode(PIN_VEXT_EN, OUTPUT);
digitalWrite(PIN_VEXT_EN, HIGH);
delay(100);
#endif
if (!eeprom_begin()) { Serial.write("EEPROM initialisation failed.\r\n"); }
#endif
@ -208,6 +214,11 @@ void setup() {
fifo_init(&packet_rdy_interfaces, packet_rdy_interfaces_buf, MAX_INTERFACES);
#if HAS_GPS
// init GPS
gps_s.begin(GPS_BAUD_RATE);
#endif
// add call to init_channel_stats here? \todo
// Create and configure interface objects
@ -1545,7 +1556,7 @@ void loop() {
process_serial();
#if HAS_DISPLAY
#if DISPLAY == OLED
#if DISPLAY == OLED || DISPLAY == TFT || DISPLAY == ADAFRUIT_TFT
if (disp_ready) update_display();
#elif DISPLAY == EINK_BW || DISPLAY == EINK_3C
// Display refreshes take so long on e-paper displays that they can disrupt
@ -1577,6 +1588,20 @@ void loop() {
input_read();
#endif
#if HAS_GPS
while (gps_s.available() > 0) {
if (gps.encode(gps_s.read()) && millis() - last_gps >= GPS_INTERVAL) {
kiss_indicate_location();
last_gps = millis();
}
}
if (millis() > 5000 && gps.charsProcessed() < 10) {
while (true) {
Serial.println(F("No GPS detected: check wiring."));
}
}
#endif
if (memory_low) {
#if PLATFORM == PLATFORM_ESP32
if (esp_get_free_heap_size() < 8192) {