mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-17 00:26:37 +00:00
Fix GPS and LEDs on ThinkNode M3
GPS support was implemented incorrectly for the ThinkNode M3. The reset pin was being driven when it should be left floating for this unit. The enable pin also wasn't being picked up by `MicroNMEALocationProvider` because of a mismatch in constant naming conventions. I did a general cleanup of the GPS and ThinkNode M3 bring-up code so that constant names line up and "*_ACTIVE" constants are used consistently vs hardcoding `HIGH`/`LOW`. After making these changes, serial data immediately starts streaming in from the NMEA on boot and GPS detection just works. LED handling was also not quite right for the ThinkNode M3. The LoRa TX LED was being driven high to turn it on when it should actually be driven low. I changed the code to use the `LED_STATE_ON` constant and also added a little code to the shutdown path to properly make sure that all LEDs are turned off. Tested and confirmed working on real hardware. Resolves both #1864 and #2879.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#define EXT_CHRG_DETECT (32) // P1.3
|
||||
#define EXT_PWR_DETECT (31) // P0.5
|
||||
|
||||
#define PIN_VBAT_READ (5)
|
||||
#define PIN_VBAT_READ (5)
|
||||
#define AREF_VOLTAGE (2.4f)
|
||||
#define ADC_MULTIPLIER (2.0) //(1.75f)
|
||||
// 2.0 gives more coherent value, 4.2V when charged, needs tweaking
|
||||
@@ -92,18 +92,19 @@
|
||||
// GPS
|
||||
|
||||
#define HAS_GPS 1
|
||||
#define PIN_GPS_RX (22)
|
||||
#define PIN_GPS_RX (22)
|
||||
#define PIN_GPS_TX (20)
|
||||
|
||||
#define PIN_GPS_POWER (14)
|
||||
#define PIN_GPS_EN (21) // STANDBY
|
||||
#define PIN_GPS_RESET (25) // REINIT
|
||||
#define GPS_RESET_ACTIVE LOW
|
||||
#define GPS_POWER_ACTIVE HIGH
|
||||
#define GPS_EN_ACTIVE HIGH
|
||||
#define GPS_RESET (-1)
|
||||
#define GPS_BAUDRATE 9600
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Buzzer
|
||||
|
||||
#define BUZZER_EN (37) // P1.5
|
||||
#define BUZZER_PIN (25) // P0.25
|
||||
#define BUZZER_PIN (25) // P0.25
|
||||
|
||||
Reference in New Issue
Block a user