-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rc_channels cleanup #984
rc_channels cleanup #984
Conversation
@@ -1200,8 +1200,8 @@ int sdlog2_thread_main(int argc, char *argv[]) | |||
if (copy_if_updated(ORB_ID(rc_channels), subs.rc_sub, &buf.rc)) { | |||
log_msg.msg_type = LOG_RC_MSG; | |||
/* Copy only the first 8 channels of 14 */ | |||
memcpy(log_msg.body.log_RC.channel, buf.rc.chan, sizeof(log_msg.body.log_RC.channel)); | |||
log_msg.body.log_RC.channel_count = buf.rc.chan_count; | |||
memcpy(log_msg.body.log_RC.channel, buf.rc.channels, sizeof(log_msg.body.log_RC.channel)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably log more than 8 channels and we probably should limit ourselves to int16 to save bandwidth. I would propose this layout:
channel 1-14
channel count
rssi value
This would cover 90% of all setups. Most setups have more than 8 channels, but logging all e.g. 18 is usually also not necessary (because these are the mapped channels and 14 mapped channels is usable).
@DrTon Merging as is - regarding your question: If we would move this code into a library call, we could execute it directly in the IO and FMU drivers. But the rework here is already quite useful. |
…C 2023 - sitl_gazebo-classic in PX4/Firmware (8feb662): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@9bfecb6 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...9bfecb6 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (8feb662): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@9bfecb6 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...9bfecb6 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (c903288): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (822d784): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (6535cc7): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (6535cc7): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (70178b6): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
… 2023 - sitl_gazebo-classic in PX4/Firmware (ebe152f): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
… 2023 - sitl_gazebo-classic in PX4/Firmware (c468266): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
… 2023 - sitl_gazebo-classic in PX4/Firmware (1707805): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
… 2023 - sitl_gazebo-classic in PX4/Firmware (f119cca): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
… 2023 - sitl_gazebo-classic in PX4/Firmware (f951055): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (f951055): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (f951055): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
…C 2023 - sitl_gazebo-classic in PX4/Firmware (f951055): PX4/PX4-SITL_gazebo-classic@2e3ed9b - sitl_gazebo-classic current upstream: PX4/PX4-SITL_gazebo-classic@0d53638 - Changes: PX4/PX4-SITL_gazebo-classic@2e3ed9b...0d53638 0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (PX4#985) 9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (PX4#984)
Now only topic cleanup, but I want also to optimize sensors app to avoid massive code duplication in RC channels handling. @LorenzMeier, any ideas how to do this better? Maybe move to separate app?
BTW, rc_channels topic is not used anywhere, only in sdlog2, but we can use rc_input or manual_control_setpoint here.