drivers/rc/crsf_rc: update standalone driver for CRSF and direct support for lq/rssi (#20084)

Co-authored-by: Chris Seto <chris1seto@gmail.com>
This commit is contained in:
chris1seto
2022-09-23 19:19:25 -04:00
committed by GitHub
co-authored by Chris Seto
parent 86cddc6a52
commit 77fdce9f3c
20 changed files with 1135 additions and 793 deletions
@@ -548,6 +548,9 @@ Syslink::handle_raw(syslink_message_t *sys)
rc.values[3] = cmd->thrust * 1000 / USHRT_MAX + 1000;
rc.values[4] = 1000; // Dummy channel as px4 needs at least 5
rc.link_quality = -1;
rc.rssi_dbm = NAN;
_rc_pub.publish(rc);
} else if (c->port == CRTP_PORT_MAVLINK) {
@@ -152,6 +152,9 @@ void NavioSysRCInput::Run()
data.timestamp_last_signal = timestamp_sample;
data.channel_count = CHANNELS;
data.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
data.link_quality = -1;
data.rssi_dbm = NAN;
data.timestamp = hrt_absolute_time();
_input_rc_pub.publish(data);