How can I know if the rc is connected. Also what is the meaning if these values:325188671, 306281519 and 17890335? How can I infer from this about rc connection is present?
I just want to know how to write a program that will tell me about
65536 MAV_SYS_STATUS_SENSOR_RC_RECEIVER 0x10000 RC receiver
What mavlink message should I send or receive, thats my main question?
What can be the structure of the program?
I am using STATUSTEXT message as of now to know about the failsafe or rc throttle. But its message frequency is 0.0 hz. I tried sending the command to chenge the frequency but I think it is not allowed to do so. What are the other ways that I can get to know rc connection status?
Are you still looking for a way to detect RC loss? If so maybe you can monitor the RC_CHANNELS_SCALED or RC_CHANNELS_RAW messages, if their values (for example the throttle channel) fall below the minimum you know the RC is lost.
These messages you should also be able to request at a higher rate.
I have set the throttle_fs_value to 950 and thr_failsafe to enabled. I am only getting RC_CHANNELS mavlink message. So, suppose I give full throttle, one of the channel shows 1985 and I immediately switch off the RC. Now this value is set for rest of the mavlink messages that I am getting. It does not go to near 1500 or below 1000 but stays at 1985 until I restart the RC.
What values should I set or where I can trigger or read values to check connection of RC with the PIXHAWK using MAVLink?
Interesting, I would have expected the throttle channel to drop.
If we go back to the previous idea to check SYS_STATUS, did it also not correctly reflect the RC state?
If you check the RC receiver flag, something like this:
onboard_control_sensor_health = 17890335
flag_rc_receiver = 0x10000
if (onboard_control_sensor_health & flag_rc_receiver) == flag_rc_receiver:
print("RC available")
else:
print("RC not available")
Maybe also check what the other fields (onboard_control_sensors_present and onboard_control_sensors_enabled) give.
(I donβt have a drone with me at the moment, otherwise I could also have tested it)