mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-13 22:32:27 +00:00
GPS fix for M4
This commit is contained in:
@@ -896,14 +896,11 @@ void GPS::writePinEN(bool on)
|
||||
void GPS::writePinStandby(bool standby)
|
||||
{
|
||||
#ifdef PIN_GPS_STANDBY // Specifically the standby pin for L76B, L76K and clones
|
||||
|
||||
// Determine the new value for the pin
|
||||
// Normally: active HIGH for awake
|
||||
#ifdef PIN_GPS_STANDBY_INVERTED
|
||||
bool val = standby;
|
||||
#else
|
||||
bool val = !standby;
|
||||
#endif
|
||||
bool val;
|
||||
if (standby)
|
||||
val = GPS_STANDBY_ACTIVE;
|
||||
else
|
||||
val = !GPS_STANDBY_ACTIVE;
|
||||
|
||||
// Write and log
|
||||
pinMode(PIN_GPS_STANDBY, OUTPUT);
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
#define GPS_EN_ACTIVE 1
|
||||
#endif
|
||||
|
||||
// Allow defining the polarity of the STANDBY output. default is LOW for standby
|
||||
#ifndef GPS_STANDBY_ACTIVE
|
||||
#define GPS_STANDBY_ACTIVE LOW
|
||||
#endif
|
||||
|
||||
static constexpr uint32_t GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS = 10 * 1000UL;
|
||||
static constexpr uint32_t GPS_FIX_HOLD_MAX_MS = 20000;
|
||||
|
||||
|
||||
@@ -117,15 +117,17 @@ static const uint8_t A0 = PIN_A0;
|
||||
#define GPS_L76K
|
||||
#define GPS_BAUDRATE 9600
|
||||
#define PIN_GPS_EN (32 + 11)
|
||||
#define GPS_EN_ACTIVE 0
|
||||
#define PIN_GPS_REINIT (3)
|
||||
#define GPS_EN_ACTIVE LOW
|
||||
#define PIN_GPS_RESET (3)
|
||||
#define GPS_RESET_MODE HIGH
|
||||
#define PIN_GPS_STANDBY (28)
|
||||
#define GPS_STANDBY_ACTIVE HIGH
|
||||
#define GPS_TX_PIN (32 + 12)
|
||||
#define GPS_RX_PIN (32 + 14)
|
||||
#define GPS_THREAD_INTERVAL 50
|
||||
|
||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
||||
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user