You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we add NTRIP reception over Wifi to the ESP32 to aid in survey in time?
29
29
Test lots of bt switching from setup switch. Test for null handles: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos.html
30
30
(Done) Transmit battery level, RTK status, etc
31
-
32
-
Save settings to file
33
-
I should be able to start a base anytime and have it log
34
-
Test that we can log and do full BT + NTREIP reliably
35
-
Update repo
36
-
Clean up dirs
31
+
(Done) Save settings to file
37
32
38
33
Menu System:
39
-
Test system? Connection to GPS?
34
+
(Done) Log RAWX to SD
35
+
(Done) Display MAC address / broadcast name
36
+
(Done) Test menu
40
37
Enable various debug output over BT?
41
-
Display MAC address / broadcast name
42
38
Change broadcast name + MAC
43
39
Change max survey in time before cold start
44
-
Allow user to enter permanent coordinates.
45
-
Allow user to enable/disable detection of permanent base
40
+
Enter permanent coordinates
41
+
Enable/disable detection of permanent base
46
42
Set radius (5m default) for auto-detection of base
47
-
Set nav rate. 4Hz is fun but may drown BT connection. 1Hz seems to be more stable.
48
-
If more than 1Hz, turn off SV sentences.
43
+
Set update rate
49
44
*/
50
45
51
46
constint FIRMWARE_VERSION_MAJOR = 1;
52
-
constint FIRMWARE_VERSION_MINOR = 6;
47
+
constint FIRMWARE_VERSION_MINOR = 0;
48
+
49
+
//Define the RTK Surveyor board identifier:
50
+
// This is an int which is unique to this variant of the RTK Surveyor and which allows us
51
+
// to make sure that the settings in EEPROM are correct for this version of the RTK Surveyor
52
+
// (sizeOfSettings is not necessarily unique and we want to avoid problems when swapping from one variant to another)
unitMACAddress[5] += 2; //Convert MAC address to Bluetooth MAC (add 2): https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html#mac-address
if(online.microSD == true && settings.zedOutputLogging == true) startLogTime_minutes = 0; //Mark now as start of logging
268
+
335
269
//myGPS.enableDebugging(); //Enable debug messages over Serial (default)
336
270
}
337
271
@@ -412,6 +346,9 @@ void loop()
412
346
online.dataLogging = false;
413
347
}
414
348
349
+
//Convert current system time to minutes. This is used in F9PSerialReadTask() to see if we are within max log window.
350
+
systemTime_minutes = millis() / 1000L / 60;
351
+
415
352
delay(10); //A small delay prevents panic if no other I2C or functions are called
416
353
}
417
354
@@ -446,7 +383,7 @@ void updateDisplay()
446
383
//oled.setFontType(1);
447
384
oled.setFontType(0); //Set font to smallest
448
385
oled.setCursor(0, 4);
449
-
// oled.print(macAddress);
386
+
// oled.print(macAddress);
450
387
oled.print("O");
451
388
452
389
oled.display();
@@ -508,3 +445,100 @@ void beginDisplay()
508
445
oled.clear(ALL); // Clear the library's display buffer
509
446
}
510
447
}
448
+
449
+
//Connect to and configure ZED-F9P
450
+
voidbeginGNSS()
451
+
{
452
+
if (myGPS.begin() == false)
453
+
{
454
+
//Try again with power on delay
455
+
delay(1000); //Wait for ZED-F9P to power up before it can respond to ACK
456
+
if (myGPS.begin() == false)
457
+
{
458
+
Serial.println(F("u-blox GNSS not detected at default I2C address. Hard stop."));
459
+
blinkError(ERROR_NO_I2C);
460
+
}
461
+
}
462
+
463
+
//Check the firmware version of the ZED-F9P. Based on Example21_ModuleInfo.
464
+
// if (myGPS.getModuleInfo(1100) == true) // Try to get the module info
465
+
// {
466
+
// if (strcmp(myGPS.minfo.extension[1], latestZEDFirmware) != 0)
467
+
// {
468
+
// Serial.print("The ZED-F9P appears to have outdated firmware. Found: ");
469
+
// Serial.println(myGPS.minfo.extension[1]);
470
+
// Serial.print("The Surveyor works best with ");
471
+
// Serial.println(latestZEDFirmware);
472
+
// Serial.print("Please upgrade using u-center.");
473
+
// Serial.println();
474
+
// }
475
+
// else
476
+
// {
477
+
// Serial.println("ZED-F9P firmware is current");
478
+
// }
479
+
// }
480
+
481
+
bool response = configureUbloxModule();
482
+
if (response == false)
483
+
{
484
+
//Try once more
485
+
Serial.println(F("Failed to configure module. Trying again."));
486
+
delay(1000);
487
+
response = configureUbloxModule();
488
+
489
+
if (response == false)
490
+
{
491
+
Serial.println(F("Failed to configure module. Hard stop."));
492
+
blinkError(ERROR_GPS_CONFIG_FAIL);
493
+
}
494
+
}
495
+
Serial.println(F("GNSS configuration complete"));
496
+
}
497
+
498
+
//Get MAC, start radio
499
+
voidbeginBT()
500
+
{
501
+
//Get unit MAC address
502
+
esp_read_mac(unitMACAddress, ESP_MAC_WIFI_STA);
503
+
unitMACAddress[5] += 2; //Convert MAC address to Bluetooth MAC (add 2): https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html#mac-address
0 commit comments