mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-03 13:55:45 +00:00
This commit is contained in:
commit
c4d13a436f
@ -244,6 +244,10 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
|||||||
logFoundDevice("BMP-388", (uint8_t)addr.address);
|
logFoundDevice("BMP-388", (uint8_t)addr.address);
|
||||||
type = BMP_3XX;
|
type = BMP_3XX;
|
||||||
break;
|
break;
|
||||||
|
case 0x60: // BMP-390 should be 0x60
|
||||||
|
logFoundDevice("BMP-390", (uint8_t)addr.address);
|
||||||
|
type = BMP_3XX;
|
||||||
|
break;
|
||||||
case 0x58: // BMP-280 should be 0x58
|
case 0x58: // BMP-280 should be 0x58
|
||||||
default:
|
default:
|
||||||
logFoundDevice("BMP-280", (uint8_t)addr.address);
|
logFoundDevice("BMP-280", (uint8_t)addr.address);
|
||||||
@ -521,4 +525,4 @@ void ScanI2CTwoWire::logFoundDevice(const char *device, uint8_t address)
|
|||||||
{
|
{
|
||||||
LOG_INFO("%s found at address 0x%x", device, address);
|
LOG_INFO("%s found at address 0x%x", device, address);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
@ -437,6 +437,10 @@ static const int serialSpeeds[3] = {9600, 115200, 38400};
|
|||||||
static const int rareSerialSpeeds[3] = {4800, 57600, GPS_BAUDRATE};
|
static const int rareSerialSpeeds[3] = {4800, 57600, GPS_BAUDRATE};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GPS_PROBETRIES
|
||||||
|
#define GPS_PROBETRIES 2
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Setup the GPS based on the model detected.
|
* @brief Setup the GPS based on the model detected.
|
||||||
* We detect the GPS by cycling through a set of baud rates, first common then rare.
|
* We detect the GPS by cycling through a set of baud rates, first common then rare.
|
||||||
@ -460,11 +464,7 @@ bool GPS::setup()
|
|||||||
digitalWrite(PIN_GPS_EN, HIGH);
|
digitalWrite(PIN_GPS_EN, HIGH);
|
||||||
delay(1000);
|
delay(1000);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TRACKER_T1000_E
|
if (probeTries < GPS_PROBETRIES) {
|
||||||
if (probeTries < 5) {
|
|
||||||
#else
|
|
||||||
if (probeTries < 2) {
|
|
||||||
#endif
|
|
||||||
LOG_DEBUG("Probe for GPS at %d", serialSpeeds[speedSelect]);
|
LOG_DEBUG("Probe for GPS at %d", serialSpeeds[speedSelect]);
|
||||||
gnssModel = probe(serialSpeeds[speedSelect]);
|
gnssModel = probe(serialSpeeds[speedSelect]);
|
||||||
if (gnssModel == GNSS_MODEL_UNKNOWN) {
|
if (gnssModel == GNSS_MODEL_UNKNOWN) {
|
||||||
@ -475,11 +475,7 @@ bool GPS::setup()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Rare Serial Speeds
|
// Rare Serial Speeds
|
||||||
#ifdef TRACKER_T1000_E
|
if (probeTries == GPS_PROBETRIES) {
|
||||||
if (probeTries == 5) {
|
|
||||||
#else
|
|
||||||
if (probeTries == 2) {
|
|
||||||
#endif
|
|
||||||
LOG_DEBUG("Probe for GPS at %d", rareSerialSpeeds[speedSelect]);
|
LOG_DEBUG("Probe for GPS at %d", rareSerialSpeeds[speedSelect]);
|
||||||
gnssModel = probe(rareSerialSpeeds[speedSelect]);
|
gnssModel = probe(rareSerialSpeeds[speedSelect]);
|
||||||
if (gnssModel == GNSS_MODEL_UNKNOWN) {
|
if (gnssModel == GNSS_MODEL_UNKNOWN) {
|
||||||
|
@ -111,6 +111,7 @@ extern "C" {
|
|||||||
#define GPS_TX_PIN PIN_SERIAL1_TX
|
#define GPS_TX_PIN PIN_SERIAL1_TX
|
||||||
|
|
||||||
#define GPS_BAUDRATE 115200
|
#define GPS_BAUDRATE 115200
|
||||||
|
#define GPS_PROBETRIES 5
|
||||||
|
|
||||||
#define PIN_GPS_EN (32 + 11) // P1.11
|
#define PIN_GPS_EN (32 + 11) // P1.11
|
||||||
#define GPS_EN_ACTIVE HIGH
|
#define GPS_EN_ACTIVE HIGH
|
||||||
|
Loading…
Reference in New Issue
Block a user