PPR1 - GPS serial now works

pull/503/head
Kevin Hester 2020-10-25 17:07:54 +08:00
rodzic 1a8891c33d
commit 7597d5b3fd
5 zmienionych plików z 27 dodań i 13 usunięć

Wyświetl plik

@ -7,8 +7,13 @@
### PPR1 TODO ### PPR1 TODO
* fix usb - check latest tinyusb * fix usb - I think the problem is VBUS in HW
* Test GPS - try pulsing reset
* Test GPS - try pulsing reset - no joy. R19 is the resistor on the TX path from GPS to CPU
R17 is the resistor for V_BK GPS power (measured 3V - ok!), R20 is the resistor for the RX path from CPU to GPS. R18 for RESET (it is low and GPS reset is high - ok!)
* V_BK for the GPS should probably be supplied from something always on
* use S113 soft device 7.2.0
* properly test charge controller config and read battery/charge status * properly test charge controller config and read battery/charge status
* fix bluetooth * fix bluetooth
* fix LCD max contrast (currently too high, needs to be about 40?) * fix LCD max contrast (currently too high, needs to be about 40?)

Wyświetl plik

@ -25,6 +25,22 @@ uint8_t GPS::i2cAddress = 0;
GPS *gps; GPS *gps;
bool GPS::setupGPS()
{
if (_serial_gps) {
#ifdef GPS_RX_PIN
_serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);
#else
_serial_gps->begin(GPS_BAUDRATE);
#endif
#ifndef NO_ESP32
_serial_gps->setRxBufferSize(2048); // the default is 256
#endif
}
return true;
}
bool GPS::setup() bool GPS::setup()
{ {
// Master power for the GPS // Master power for the GPS

Wyświetl plik

@ -72,7 +72,7 @@ class GPS : private concurrency::OSThread
protected: protected:
/// Do gps chipset specific init, return true for success /// Do gps chipset specific init, return true for success
virtual bool setupGPS() = 0; virtual bool setupGPS();
/// If possible force the GPS into sleep/low power mode /// If possible force the GPS into sleep/low power mode
virtual void sleep(); virtual void sleep();

Wyświetl plik

@ -13,6 +13,8 @@ static int32_t toDegInt(RawDegrees d)
bool NMEAGPS::setupGPS() bool NMEAGPS::setupGPS()
{ {
GPS::setupGPS();
#ifdef PIN_GPS_PPS #ifdef PIN_GPS_PPS
// pulse per second // pulse per second
// FIXME - move into shared GPS code // FIXME - move into shared GPS code

Wyświetl plik

@ -29,16 +29,7 @@ bool UBloxGPS::tryConnect()
bool UBloxGPS::setupGPS() bool UBloxGPS::setupGPS()
{ {
if (_serial_gps) { GPS::setupGPS();
#ifdef GPS_RX_PIN
_serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);
#else
_serial_gps->begin(GPS_BAUDRATE);
#endif
#ifndef NO_ESP32
_serial_gps->setRxBufferSize(2048); // the default is 256
#endif
}
// uncomment to see debug info // uncomment to see debug info
// ublox.enableDebugging(Serial); // ublox.enableDebugging(Serial);