Updated start script, checking commander mishaps

This commit is contained in:
Lorenz Meier
2012-08-16 13:09:35 +02:00
parent e84d0f41fa
commit b30e443f28
3 changed files with 13 additions and 5 deletions
+4
View File
@@ -925,6 +925,10 @@ void handleMessage(mavlink_message_t *msg)
vcmd.source_component = msg->compid;
vcmd.confirmation = 1;
/* check if topic is advertised */
if (cmd_pub <= 0) {
cmd_pub = orb_advertise(ORB_ID(vehicle_command), &vcmd);
}
/* create command */
orb_publish(ORB_ID(vehicle_command), cmd_pub, &vcmd);
}