@@ -703,91 +703,6 @@ bool beginExternalTriggers()
703703 return (response);
704704}
705705
706- // Check if NEO-D9S is connected. Configure if available.
707- void beginLBand ()
708- {
709- if (settings.enablePointPerfectCorrections == false ) return ; // If user has turned off PointPerfect, skip everything
710-
711- if (i2cLBand.begin (Wire, 0x43 ) == false ) // Connect to the u-blox NEO-D9S using Wire port. The D9S default I2C address is 0x43 (not 0x42)
712- {
713- log_d (" L-Band not detected" );
714- return ;
715- }
716-
717- // Check the firmware version of the NEO-D9S. Based on Example21_ModuleInfo.
718- if (i2cLBand.getModuleInfo (1100 ) == true ) // Try to get the module info
719- {
720- // i2cLBand.minfo.extension[1] looks like 'FWVER=HPG 1.12'
721- strcpy (neoFirmwareVersion, i2cLBand.minfo .extension [1 ]);
722-
723- // Remove 'FWVER='. It's extraneous and = causes settings file parsing issues
724- char *ptr = strstr (neoFirmwareVersion, " FWVER=" );
725- if (ptr != NULL )
726- strcpy (neoFirmwareVersion, ptr + strlen (" FWVER=" ));
727-
728- printNEOInfo (); // Print module firmware version
729- }
730-
731- if (online.gnss == true )
732- {
733- i2cGNSS.checkUblox (); // Regularly poll to get latest data and any RTCM
734- i2cGNSS.checkCallbacks (); // Process any callbacks: ie, eventTriggerReceived
735- }
736-
737- // If we have a fix, check which frequency to use
738- if (fixType == 2 || fixType == 3 || fixType == 4 || fixType == 5 ) // 2D, 3D, 3D+DR, or Time
739- {
740- if ( (longitude > -125 && longitude < -67 ) && (latitude > -90 && latitude < 90 ))
741- {
742- log_d (" Setting L-Band to US" );
743- settings.LBandFreq = 1556290000 ; // We are in US band
744- }
745- else if ( (longitude > -25 && longitude < 70 ) && (latitude > -90 && latitude < 90 ))
746- {
747- log_d (" Setting L-Band to EU" );
748- settings.LBandFreq = 1545260000 ; // We are in EU band
749- }
750- else
751- {
752- Serial.println (" Unknown band area" );
753- settings.LBandFreq = 1556290000 ; // Default to US
754- }
755- recordSystemSettings ();
756- }
757- else
758- log_d (" No fix available for L-Band frequency determination" );
759-
760- bool response = true ;
761- response &= i2cLBand.setVal32 (UBLOX_CFG_PMP_CENTER_FREQUENCY, settings.LBandFreq ); // Default 1539812500 Hz
762- response &= i2cLBand.setVal16 (UBLOX_CFG_PMP_SEARCH_WINDOW, 2200 ); // Default 2200 Hz
763- response &= i2cLBand.setVal8 (UBLOX_CFG_PMP_USE_SERVICE_ID, 0 ); // Default 1
764- response &= i2cLBand.setVal16 (UBLOX_CFG_PMP_SERVICE_ID, 21845 ); // Default 50821
765- response &= i2cLBand.setVal16 (UBLOX_CFG_PMP_DATA_RATE, 2400 ); // Default 2400 bps
766- response &= i2cLBand.setVal8 (UBLOX_CFG_PMP_USE_DESCRAMBLER, 1 ); // Default 1
767- response &= i2cLBand.setVal16 (UBLOX_CFG_PMP_DESCRAMBLER_INIT, 26969 ); // Default 23560
768- response &= i2cLBand.setVal8 (UBLOX_CFG_PMP_USE_PRESCRAMBLING, 0 ); // Default 0
769- response &= i2cLBand.setVal64 (UBLOX_CFG_PMP_UNIQUE_WORD, 16238547128276412563ull );
770- response &= i2cLBand.setVal (UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1 ); // Ensure UBX-RXM-PMP is enabled on the I2C port
771- response &= i2cLBand.setVal (UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1 ); // Output UBX-RXM-PMP on UART1
772- response &= i2cLBand.setVal (UBLOX_CFG_UART2OUTPROT_UBX, 1 ); // Enable UBX output on UART2
773- response &= i2cLBand.setVal (UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1 ); // Output UBX-RXM-PMP on UART2
774- response &= i2cLBand.setVal32 (UBLOX_CFG_UART1_BAUDRATE, 38400 ); // match baudrate with ZED default
775- response &= i2cLBand.setVal32 (UBLOX_CFG_UART2_BAUDRATE, 38400 ); // match baudrate with ZED default
776-
777- if (response == false )
778- Serial.println (" L-Band failed to configure" );
779-
780- i2cLBand.softwareResetGNSSOnly (); // Do a restart
781-
782- i2cLBand.setRXMPMPmessageCallbackPtr (&pushRXMPMP); // Call pushRXMPMP when new PMP data arrives. Push it to the GNSS
783-
784- i2cGNSS.setRXMCORcallbackPtr (&checkRXMCOR); // Check if the PMP data is being decrypted successfully
785-
786- log_d (" L-Band online" );
787-
788- online.lband = true ;
789- }
790-
791706void beginIdleTasks ()
792707{
793708 if (settings.enablePrintIdleTime == true )
0 commit comments