new mode for fake gps

This commit is contained in:
ChristophTobler 2015-11-17 16:38:11 +01:00
parent 83c8161cdb
commit dfdf7dce4d
3 changed files with 13 additions and 1 deletions

View File

@ -564,6 +564,10 @@ then
then
mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000
fi
if param compare SYS_COMPANION 257600
then
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
fi
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1

View File

@ -1523,6 +1523,9 @@ Mavlink::task_main(int argc, char *argv[])
} else if (strcmp(myoptarg, "osd") == 0) {
_mode = MAVLINK_MODE_OSD;
} else if (strcmp(myoptarg, "magic") == 0) {
_mode = MAVLINK_MODE_MAGIC;
} else if (strcmp(myoptarg, "config") == 0) {
_mode = MAVLINK_MODE_CONFIG;
}
@ -1709,7 +1712,7 @@ Mavlink::task_main(int argc, char *argv[])
configure_stream("SYSTEM_TIME", 1.0f);
configure_stream("TIMESYNC", 10.0f);
configure_stream("ACTUATOR_CONTROL_TARGET0", 10.0f);
/* camera trigger is rate limited at the source, do not limit here */
//camera trigger is rate limited at the source, do not limit here
configure_stream("CAMERA_TRIGGER", 500.0f);
configure_stream("EXTENDED_SYS_STATE", 2.0f);
break;
@ -1729,6 +1732,10 @@ Mavlink::task_main(int argc, char *argv[])
configure_stream("EXTENDED_SYS_STATE", 1.0f);
break;
case MAVLINK_MODE_MAGIC:
//stream nothing
break;
case MAVLINK_MODE_CONFIG:
// Enable a number of interesting streams we want via USB
configure_stream("SYS_STATUS", 1.0f);

View File

@ -149,6 +149,7 @@ public:
MAVLINK_MODE_CUSTOM,
MAVLINK_MODE_ONBOARD,
MAVLINK_MODE_OSD,
MAVLINK_MODE_MAGIC,
MAVLINK_MODE_CONFIG
};