|
|
|
@ -171,6 +171,12 @@ void AP_CRSF_Telem::process_rf_mode_changes()
@@ -171,6 +171,12 @@ void AP_CRSF_Telem::process_rf_mode_changes()
|
|
|
|
|
if (_telem_last_report_ms == 0 && !uart->is_dma_enabled()) { |
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "CRSF: running on non-DMA serial port"); |
|
|
|
|
} |
|
|
|
|
// note if option was set to show LQ in place of RSSI
|
|
|
|
|
bool current_lq_as_rssi_active = bool(rc().use_crsf_lq_as_rssi()); |
|
|
|
|
if(_telem_last_report_ms == 0 || _noted_lq_as_rssi_active != current_lq_as_rssi_active){ |
|
|
|
|
_noted_lq_as_rssi_active = current_lq_as_rssi_active; |
|
|
|
|
gcs().send_text(MAV_SEVERITY_INFO, "CRSF: RSSI now displays %s", current_lq_as_rssi_active ? " as LQ" : "normally"); |
|
|
|
|
} |
|
|
|
|
// report a change in RF mode or a chnage of more than 10Hz if we haven't done so in the last 5s
|
|
|
|
|
if ((now - _telem_last_report_ms > 5000) && |
|
|
|
|
(_telem_rf_mode != current_rf_mode || abs(int16_t(_telem_last_avg_rate) - int16_t(_scheduler.avg_packet_rate)) > 25)) { |
|
|
|
|