@@ -494,6 +494,11 @@ static const blackboxSimpleFieldDefinition_t blackboxSlowFields[] = {
494494 {"failsafePhase" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (TAG2_3S32 )},
495495 {"rxSignalReceived" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (TAG2_3S32 )},
496496 {"rxFlightChannelsValid" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (TAG2_3S32 )},
497+ {"rxActiveLink" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
498+ {"rxValidLinkMask" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
499+ {"rxSwitchReason" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
500+ {"rxSwitchTimeMs" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
501+ {"rxDualStatus" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
497502 {"rxUpdateRate" , -1 , UNSIGNED , PREDICT (PREVIOUS ), ENCODING (UNSIGNED_VB )},
498503
499504 {"hwHealthStatus" , -1 , UNSIGNED , PREDICT (0 ), ENCODING (UNSIGNED_VB )},
@@ -616,6 +621,11 @@ typedef struct blackboxSlowState_s {
616621 uint8_t failsafePhase ;
617622 bool rxSignalReceived ;
618623 bool rxFlightChannelsValid ;
624+ uint8_t rxActiveLink ;
625+ uint8_t rxValidLinkMask ;
626+ uint8_t rxSwitchReason ;
627+ uint32_t rxSwitchTimeMs ;
628+ uint8_t rxDualStatus ;
619629 int32_t hwHealthStatus ;
620630 uint16_t powerSupplyImpedance ;
621631 uint16_t sagCompensatedVBat ;
@@ -1397,6 +1407,11 @@ static void writeSlowFrame(void)
13971407 values [1 ] = slowHistory .rxSignalReceived ? 1 : 0 ;
13981408 values [2 ] = slowHistory .rxFlightChannelsValid ? 1 : 0 ;
13991409 blackboxWriteTag2_3S32 (values );
1410+ blackboxWriteUnsignedVB (slowHistory .rxActiveLink );
1411+ blackboxWriteUnsignedVB (slowHistory .rxValidLinkMask );
1412+ blackboxWriteUnsignedVB (slowHistory .rxSwitchReason );
1413+ blackboxWriteUnsignedVB (slowHistory .rxSwitchTimeMs );
1414+ blackboxWriteUnsignedVB (slowHistory .rxDualStatus );
14001415
14011416 blackboxWriteUnsignedVB (slowHistory .rxUpdateRate );
14021417
@@ -1474,6 +1489,11 @@ static void loadSlowState(blackboxSlowState_t *slow)
14741489 slow -> failsafePhase = failsafePhase ();
14751490 slow -> rxSignalReceived = rxIsReceivingSignal ();
14761491 slow -> rxFlightChannelsValid = rxAreFlightChannelsValid ();
1492+ slow -> rxActiveLink = rxGetActiveLink ();
1493+ slow -> rxValidLinkMask = rxGetValidLinkMask ();
1494+ slow -> rxSwitchReason = rxGetLastSwitchReason ();
1495+ slow -> rxSwitchTimeMs = rxGetLastSwitchTimeMs ();
1496+ slow -> rxDualStatus = rxGetDualRxStatus ();
14771497 slow -> rxUpdateRate = getRcUpdateFrequency ();
14781498 slow -> hwHealthStatus = (getHwGyroStatus () << 2 * 0 ) | // Pack hardware health status into a bit field.
14791499 (getHwAccelerometerStatus () << 2 * 1 ) | // Use raw hardwareSensorStatus_e values and pack them using 2 bits per value
@@ -2094,6 +2114,9 @@ static bool blackboxWriteSysinfo(void)
20942114 BLACKBOX_PRINT_HEADER_LINE ("mag_hardware" , "%d" , MAG_NONE );
20952115#endif
20962116 BLACKBOX_PRINT_HEADER_LINE ("serialrx_provider" , "%d" , rxConfig ()-> serialrx_provider );
2117+ BLACKBOX_PRINT_HEADER_LINE ("dual_rx_enabled" , "%d" , rxConfig ()-> dualRxEnabled );
2118+ BLACKBOX_PRINT_HEADER_LINE ("receiver_type_rx2" , "%d" , rxConfig ()-> receiverTypeSecondary );
2119+ BLACKBOX_PRINT_HEADER_LINE ("serialrx_provider_rx2" , "%d" , rxConfig ()-> serialrx_provider_secondary );
20972120 BLACKBOX_PRINT_HEADER_LINE ("motor_pwm_protocol" , "%d" , motorConfig ()-> motorPwmProtocol );
20982121 BLACKBOX_PRINT_HEADER_LINE ("motor_pwm_rate" , "%d" , getEscUpdateFrequency ());
20992122 BLACKBOX_PRINT_HEADER_LINE ("debug_mode" , "%d" , systemConfig ()-> debug_mode );
0 commit comments