mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-08-01 08:30:29 -07:00
Merge branch 'develop' of https://github.com/justcallmekoko/ESP32Marauder into unified-serial-pcaps
This commit is contained in:
@@ -12,6 +12,19 @@ HardwareSerial Serial2(GPS_SERIAL_INDEX);
|
||||
|
||||
void GpsInterface::begin() {
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
pinMode(26, OUTPUT);
|
||||
|
||||
delay(1);
|
||||
|
||||
analogWrite(26, 243);
|
||||
delay(1);
|
||||
|
||||
Serial.println("Activated GPS");
|
||||
delay(100);
|
||||
#endif
|
||||
|
||||
|
||||
Serial2.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
|
||||
|
||||
MicroNMEA::sendSentence(Serial2, "$PSTMSETPAR,1201,0x00000042");
|
||||
@@ -19,7 +32,7 @@ void GpsInterface::begin() {
|
||||
|
||||
MicroNMEA::sendSentence(Serial2, "$PSTMSRR");
|
||||
|
||||
delay(4000);
|
||||
delay(3900);
|
||||
|
||||
if (Serial2.available()) {
|
||||
Serial.println("GPS Attached Successfully");
|
||||
@@ -27,11 +40,17 @@ void GpsInterface::begin() {
|
||||
while (Serial2.available())
|
||||
Serial2.read();
|
||||
}
|
||||
else {
|
||||
this->gps_enabled = false;
|
||||
Serial.println("GPS Not Found");
|
||||
}
|
||||
|
||||
|
||||
this->type_flag=GPSTYPE_NATIVE; //enforce default
|
||||
this->disable_queue(); //init the queue, disabled, kill NULLs
|
||||
|
||||
nmea.setUnknownSentenceHandler(gps_nmea_notimp);
|
||||
|
||||
}
|
||||
|
||||
//passthrough for other objects
|
||||
|
||||
Reference in New Issue
Block a user