I'm trying to activate follow yaw mode using Serial API, my approach is this : - I set yaw and pitch to 0 using CONTROL_MODE_ANGLE cmd_sbgc.mode = SBGC_CONTROL_MODE_ANGLE; cmd_sbgc.anglePITCH = SBGC_DEGREE_TO_ANGLE(0); cmd_sbgc.angleYAW = SBGC_DEGREE_TO_ANGLE(0); SBGC_cmd_control_send(cmd_sbgc, sbgc_parser);
- Set parameters to function SBGC_cmd_set_adj_vars_send SBGC_cmd_set_adj_vars_var_t ajd_vars[] = { {ADJ_VAR_FOLLOW_SPEED_YAW, 255}, {ADJ_VAR_FOLLOW_LPF_YAW, 10}, {ADJ_VAR_FOLLOW_EXPO_RATE, 60}, {ADJ_VAR_FOLLOW_DEADBAND, 5}, {ADJ_VAR_RC_FOLLOW_YAW, 1} }; SBGC_cmd_set_adj_vars_send(ajd_vars, 5, sbgc_parser);
- Let the pitch free to move, using joystick cmd_sbgc.mode = SBGC_CONTROL_MODE_RC; cmd_sbgc.anglePITCH = anglePITCH; SBGC_cmd_control_send(cmd_sbgc, sbgc_parser);
With this code, the yaw is blocked and the pitch too. I've read in previous discussions that CMD_SET_VARS and CMD_CONTROL are concurrent and it's better to use MODE_RC however I don't seem to get any results… My questions : - Am I setting the right parameters to activate follow yaw ? - How can I use MODE_RC ?