Fixed GPS UART implementation

pull/4/head
Sven Steudte 2018-06-28 02:01:17 +02:00
rodzic 54b9d1872f
commit e1c937bff5
2 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -49,12 +49,10 @@ bool gps_receive_byte(uint8_t *data) {
I2C_read8(UBLOX_MAX_ADDRESS, 0xFF, data);
return true;
}
#else
if((*data = sdGetTimeout(&SD5, TIME_IMMEDIATE)) != MSG_TIMEOUT) {
return true;
}
#endif
return false;
#else
return sdReadTimeout(&SD5, data, 1, TIME_IMMEDIATE);
#endif
}
/**

Wyświetl plik

@ -38,7 +38,8 @@ typedef enum {
#define UBLOX_MAX_ADDRESS 0x42
// You can either use I2C (TRUE) or UART (FALSE)
#define UBLOX_USE_I2C TRUE
#define UBLOX_USE_I2C FALSE
#define UBLOX_USE_UART TRUE
#define isGPSLocked(pos) ((pos)->type == 3 && (pos)->num_svs >= 4 && (pos)->fixOK == true)