lol
This commit is contained in:
@@ -65,12 +65,19 @@ void MenuGPS::update() {
|
||||
|
||||
void MenuGPS::printPage() const {
|
||||
UBX_NAV_PVT_data_t* gpsData = this->navigation->getUbxData();
|
||||
uint8_t fixType = gpsData->fixType;
|
||||
uint8_t fixType = 0;
|
||||
if (gpsData)
|
||||
fixType = gpsData->fixType;
|
||||
|
||||
switch (this->currentPage) {
|
||||
case 0: {
|
||||
uint8_t siv = gpsData->numSV;
|
||||
uint32_t pDOP = gpsData->pDOP;
|
||||
uint8_t siv = 0;
|
||||
uint32_t pDOP = 0;
|
||||
if (fixType) {
|
||||
siv = gpsData->numSV;
|
||||
pDOP = gpsData->pDOP;
|
||||
}
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
lcd->setCursor(0, 0);
|
||||
@@ -93,8 +100,14 @@ void MenuGPS::printPage() const {
|
||||
break;
|
||||
|
||||
case 1: {
|
||||
int32_t lat = gpsData->lat;
|
||||
int32_t lng = gpsData->lon;
|
||||
int32_t lat = 0;
|
||||
int32_t lng = 0;
|
||||
|
||||
if (fixType) {
|
||||
lat = gpsData->lat;
|
||||
lng = gpsData->lon;
|
||||
}
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
lcd->setCursor(0, 0);
|
||||
@@ -117,7 +130,10 @@ void MenuGPS::printPage() const {
|
||||
break;
|
||||
|
||||
case 2: {
|
||||
uint32_t unixEpoch = gpsData->sec;
|
||||
uint32_t unixEpoch = 0;
|
||||
|
||||
if (fixType)
|
||||
unixEpoch = gpsData->sec;
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
@@ -155,7 +171,10 @@ void MenuGPS::printPage() const {
|
||||
break;
|
||||
|
||||
case 4: {
|
||||
uint32_t accuracy = gpsData->hAcc;
|
||||
uint32_t accuracy = 0;
|
||||
|
||||
if (fixType)
|
||||
accuracy = gpsData->hAcc;
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
|
||||
Reference in New Issue
Block a user