mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 23:26:45 -08:00
Detect GPS module
This commit is contained in:
@@ -17,8 +17,12 @@ void GpsInterface::begin() {
|
||||
|
||||
delay(4000);
|
||||
|
||||
while (Serial2.available())
|
||||
Serial2.read();
|
||||
if (Serial2.available()) {
|
||||
Serial.println("GPS Attached Successfully");
|
||||
this->gps_enabled = true;
|
||||
while (Serial2.available())
|
||||
Serial2.read();
|
||||
}
|
||||
}
|
||||
|
||||
void GpsInterface::showGPSInfo() {
|
||||
@@ -82,6 +86,10 @@ bool GpsInterface::getFixStatus() {
|
||||
return this->good_fix;
|
||||
}
|
||||
|
||||
bool GpsInterface::getGpsModuleStatus() {
|
||||
return this->gps_enabled;
|
||||
}
|
||||
|
||||
void GpsInterface::main() {
|
||||
while (Serial2.available()) {
|
||||
//Fetch the character one by one
|
||||
|
||||
Reference in New Issue
Block a user