void GCS_MAVLINK::send_afs_message(MAV_SEVERITY severity, uint8_t timeout, AFS_SOLUTIONS *solutions, const prog_char_t *str, ...)
{
for (uint8_t i=0; i<MAVLINK_COMM_NUM_BUFFERS; i++) {
if ((1U<<i) & mavlink_active) {
mavlink_channel_t chan = (mavlink_channel_t)(MAVLINK_COMM_0+i);
if (comm_get_txspace(chan) >= MAVLINK_NUM_NON_PAYLOAD_BYTES + MAVLINK_MSG_ID_STATUSTEXT_LEN) {
char msg2[50];
va_list arg_list;
va_start(arg_list, str);
hal.util->vsnprintf_P((char *)msg2, sizeof(msg2), str, arg_list);
va_end(arg_list);
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, PSTR("Sending AFS message...")); // Debug
mavlink_msg_afs_message_send(chan,
1, // ID that must be included with reply
severity,
timeout,
msg2,
(const uint8_t*)solutions);
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, PSTR("AFS message sent")); // Debug
}
}
}
}--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Try raising the severity. Then revert to the old method and see if that works.
Karl,
You’re using Copter and some fairly recent version of the code (i.e. “Copter-3.4-dev”)?
I guess the first thing is to ensure that at least some known-to-be-working messages are getting through to your GCS. So for examples, you should be able to disable the GPS (in SITL you can set SIM_GPS_TYPE=0) and then try to arm in Loiter and it should fail and you should see one of the following messages (which come from arming_checks.cpp):
PreArm: Waiting for Nav Checks
PreArm: Need 3D Fix
PreArm: High GPS HDOP
I somehow vaguely recall that there’s an issue with text messages over UDP at least with mission planner. It’s a vague memory and I don’t know why it would be a problem nor where the issue is/was.
It’s an interesting thing you’re doing and makes a lot of sense. If it were me I’d probably implement it by creating a new FAILSAFE flight mode and then add new behaviours to all the existing failsafe parameters (i.e. FS_EKF_ACTION, FS_BATT_ENABLE, etc) to allow the user to specify that the desired action is to switch into this new flight mode. That new flight mode would then implement doing whatever more complex action you want. I’d probably also implement new mavlink messages to handle whatever back-and-forth communication between the flight controller and the GCS is required.
-Randy
--
APM: PreArm: AHRS not healthy!
APM: PreArm: Bad GPS Position
100.0, Pcz : 9.99999997475e-07}
5078: ATTITUDE {time_boot_ms : 1294188, roll : 0.438226550817, pitch : 0.0074303
0617014, yaw : 1.10801875591, rollspeed : 0.00536821922287, pitchspeed : 0.09197
95036316, yawspeed : 0.195034593344}
100: BAD_DATA {unknown MAVLink message ID 198, data:['fe', '3a', 'c3', '1', '1',
'c6', '1', '2', 'a', '43', '72', '69', '74', '69', '63', '61', '6c', '20', '73'
, '61', '66', '65', '74', '79', '20', '69', '73', '73', '75', '65', '3a', '20',
'47', '50', '53', '20', '73', '69', '67', '6e', '61', '6c', '20', '6c', '6f', '7
3', '74', '2e', '0', 'a8', 'a0', '4c', '0', '80', 'a1', '4b', '0', '10', '0', '0
', '0', '0', '0', '1', '65', 'ef']}
2: CAMERA_FEEDBACK {time_usec : 1455292337035000, target_system : 0, cam_idx : 0
, img_idx : 0, lat : 465175852, lng : 65729872, alt_msl : 510.940002441, alt_rel
: 137.559997559, roll : 3.15000009537, pitch : -0.180000007153, yaw : 261.60000
6104, foc_len : 0.0, flags : 0}pos_vert_variance : 0.0307541135699, compass_vari
2: COMMAND_ACK {command : 11, result : 0}ce : 0.171113982797}stom_mode : 11, sys