gps now over spi
This commit is contained in:
@@ -64,12 +64,12 @@ void MenuGPS::update() {
|
||||
}
|
||||
|
||||
void MenuGPS::printPage() const {
|
||||
uint8_t fixType = gps->getFixType();
|
||||
uint8_t fixType = this->gps->getFixType();
|
||||
|
||||
switch (this->currentPage) {
|
||||
case 0: {
|
||||
uint8_t siv = gps->getSIV();
|
||||
uint16_t hdop = gps->getHorizontalDOP();
|
||||
uint8_t siv = this->gps->getSIV();
|
||||
uint16_t hdop = this->gps->getHorizontalDOP();
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
lcd->setCursor(0, 0);
|
||||
@@ -88,12 +88,12 @@ void MenuGPS::printPage() const {
|
||||
<< " HDOP: " << (int) hdop << std::endl;
|
||||
else
|
||||
std::cout << "Data isn't valid or no GPS signal" << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: {
|
||||
int32_t lat = gps->getLatitude();
|
||||
int32_t lng = gps->getLongitude();
|
||||
int32_t lat = this->gps->getLatitude();
|
||||
int32_t lng = this->gps->getLongitude();
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
lcd->setCursor(0, 0);
|
||||
@@ -112,11 +112,11 @@ void MenuGPS::printPage() const {
|
||||
<< " Lng: " << lng << std::endl;
|
||||
else
|
||||
std::cout << "Data isn't valid or NO GPS signal" << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: {
|
||||
uint32_t unixEpoch = gps->getUnixEpoch();
|
||||
uint32_t unixEpoch = this->gps->getUnixEpoch();
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
@@ -126,7 +126,7 @@ void MenuGPS::printPage() const {
|
||||
lcd->printf("-> %u", unixEpoch);
|
||||
}
|
||||
std::cout << "Unix Epoch: " << (int) unixEpoch << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: {
|
||||
@@ -150,9 +150,24 @@ void MenuGPS::printPage() const {
|
||||
std::cout << "NTRIP Client is enabled." << std::endl;
|
||||
else
|
||||
std::cout << "NTRIP Client is disabled" << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: {
|
||||
uint32_t accuracy = this->gps->getHorizontalAccuracy();
|
||||
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
lcd->setCursor(0, 0);
|
||||
lcd->printf("Hrizntl Accuracy");
|
||||
lcd->setCursor(0, 1);
|
||||
lcd->printf("-> %u", accuracy);
|
||||
}
|
||||
std::cout << "Horizontal Accuracy Estimate: " << (int) accuracy << std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (this->lcd) {
|
||||
lcd->clear();
|
||||
|
||||
Reference in New Issue
Block a user