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