Hi everyone!
I have the problem that when using RC_OVERRIDE_CHANNELS only the value for the throttle channel is applied. The messages are sent from an Arduino Due via UART to the TELEM2 port of a Pixhawk running ArduCopter V3.2.1. Messages like COMMAND_LONG and MAV_CMD_DO_SET_MODE work as expected.
This is my code to send a message:
uint8_t system_id = 255;
uint8_t component_id = 190;
uint8_t target_system_id = 1;
uint8_t target_component_all_components = 0;
[...]
void mavlink_rc_channels_override(uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8){
mavlink_message_t msg;
uint16_t len;
//mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
mavlink_msg_rc_channels_override_pack(system_id, component_id, &msg, target_system_id, target_component_all_components, c1, c2, c3, c4, c5, c6, c7, c8);
len = mavlink_msg_to_send_buffer(buf, &msg);
mav.write(buf, len);
mav.write(buf, len);
}
and this works fine:
mavlink_rc_channels_override(0,0,1500,0,0,0,0,0);
but this doesn’t:
mavlink_rc_channels_override(1450,0,1500,0,0,0,0,0);
Channel 1 seems to be ignored. When I send a message including values for channel 1 and 3 the change in throttle can be seen but not a change in roll. Though the MAV does not react to input from the remote on that channel anymore. Before I tried sending commands from MAVProxy using values of 1450/1550 for channel 1 and 2 to go left/right/forward/backward and it seemed to work just fine.
What am I missing?