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
Copy file name to clipboardExpand all lines: Firmware/RTK_Surveyor/Begin.ino
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -497,3 +497,38 @@ void beginSystemState()
497
497
ButtonCheckTaskPriority,
498
498
&ButtonCheckTaskHandle); //Task handle
499
499
}
500
+
501
+
//Setup the timepulse output on the PPS pin for external triggering
502
+
//Setup TM2 time stamp input as need
503
+
voidbeginExternalTriggers()
504
+
{
505
+
UBX_CFG_TP5_data_t timePulseParameters;
506
+
507
+
if (i2cGNSS.getTimePulseParameters(&timePulseParameters) == false)
508
+
log_e("getTimePulseParameters failed!");
509
+
510
+
timePulseParameters.tpIdx = 0; // Select the TIMEPULSE pin
511
+
512
+
// While the module is _locking_ to GNSS time, turn off pulse
513
+
timePulseParameters.freqPeriod = 1000000; //Set the period between pulses in us
514
+
timePulseParameters.pulseLenRatio = 0; //Set the pulse length in us
515
+
516
+
// When the module is _locked_ to GNSS time, make it generate 1kHz
517
+
timePulseParameters.freqPeriodLock = settings.externalPulseTimeBetweenPulse_us; //Set the period between pulses is us
518
+
timePulseParameters.pulseLenRatioLock = settings.externalPulseLength_us; //Set the pulse length in us
519
+
520
+
timePulseParameters.flags.bits.active = settings.enableExternalPulse; //Make sure the active flag is set to enable the time pulse. (Set to 0 to disable.)
521
+
timePulseParameters.flags.bits.lockedOtherSet = 1; //Tell the module to use freqPeriod while locking and freqPeriodLock when locked to GNSS time
522
+
timePulseParameters.flags.bits.isFreq = 0; //Tell the module that we want to set the period
523
+
timePulseParameters.flags.bits.isLength = 1; //Tell the module that pulseLenRatio is a length (in us)
524
+
timePulseParameters.flags.bits.polarity = (uint8_t)settings.externalPulsePolarity; //Rising or failling edge type pulse
525
+
526
+
if (i2cGNSS.setTimePulseParameters(&timePulseParameters, 1000) == false)
527
+
log_e("setTimePulseParameters failed!");
528
+
529
+
if (settings.enableExternalHardwareEventLogging == true)
530
+
i2cGNSS.setAutoTIMTM2callback(&eventTriggerReceived); //Enable automatic TIM TM2 messages with callback to eventTriggerReceived
0 commit comments