MAVLink app: Introduce OSD mode

This commit is contained in:
Lorenz Meier 2015-06-06 22:06:48 +02:00
parent aec4f359ac
commit 6309aa612b
2 changed files with 14 additions and 2 deletions

View File

@ -1295,6 +1295,8 @@ Mavlink::task_main(int argc, char *argv[])
_mode = MAVLINK_MODE_ONBOARD;
} else if (strcmp(optarg, "onboard") == 0) {
_mode = MAVLINK_MODE_ONBOARD;
} else if (strcmp(optarg, "osd") == 0) {
_mode = MAVLINK_MODE_OSD;
}
break;
@ -1451,7 +1453,6 @@ Mavlink::task_main(int argc, char *argv[])
configure_stream("SYS_STATUS", 1.0f);
configure_stream("ATTITUDE", 50.0f);
configure_stream("HIGHRES_IMU", 50.0f);
configure_stream("VFR_HUD", 5.0f);
configure_stream("GPS_RAW_INT", 5.0f);
configure_stream("GLOBAL_POSITION_INT", 50.0f);
configure_stream("LOCAL_POSITION_NED", 30.0f);
@ -1468,6 +1469,16 @@ Mavlink::task_main(int argc, char *argv[])
configure_stream("ACTUATOR_CONTROL_TARGET0", 10.0f);
break;
case MAVLINK_MODE_OSD:
configure_stream("SYS_STATUS", 5.0f);
configure_stream("ATTITUDE", 30.0f);
configure_stream("GPS_RAW_INT", 1.0f);
configure_stream("GLOBAL_POSITION_INT", 10.0f);
configure_stream("ATTITUDE_TARGET", 10.0f);
configure_stream("BATTERY_STATUS", 1.0f);
configure_stream("SYSTEM_TIME", 1.0f);
break;
default:
break;
}

View File

@ -128,7 +128,8 @@ public:
enum MAVLINK_MODE {
MAVLINK_MODE_NORMAL = 0,
MAVLINK_MODE_CUSTOM,
MAVLINK_MODE_ONBOARD
MAVLINK_MODE_ONBOARD,
MAVLINK_MODE_OSD
};
void set_mode(enum MAVLINK_MODE);