= set camera orientation (in degree CCW)
+ y -> yaw pitch rotatio (psi euler angle)
+ p -> pitch rotation (theta euler angle)
+ r -> roll rotation (phi euler angle)
+*/
+
+#if DC_CTRL_PARROT_MYKONOS_LOG
+#include "state.h"
+#include "subsystems/gps.h"
+#endif
+
+struct Dc_Ctrl_Parrot_Mykonos dc_ctrl_parrot_mykonos;
+
+void dc_ctrl_parrot_mykonos_init(void)
+{
+ // Call common DC init
+ dc_init();
+
+ dc_ctrl_parrot_mykonos.status = DC_CTRL_PARROT_MYKONOS_NONE;
+ dc_ctrl_parrot_mykonos.timer = 0;
+ dc_ctrl_parrot_mykonos.photo_nr = 0;
+ dc_ctrl_parrot_mykonos.autoshoot = 0;
+ dc_ctrl_parrot_mykonos.log_delay = 0;
+
+#ifndef SITL
+ int ret __attribute__((unused));
+ //ret = system("kk"); //No need kill original AP proceess since new AP is already running and that killed original process
+
+ //TIP: With media-ctl much more can be done for the parameters of the camera only basics are set.
+ ret = system("media-ctl -l \'\"mt9f002 0-0010\":0->\"avicam.0\":0[1]\'");
+ ret = system("media-ctl -l \'\"avicam_dummy_dev.0\":0->\"avicam.0\":0[0]\'");//No bottomcam, used internaly in AP
+
+ ret = system("prestart dxowrapperd");
+ ret = system("prestart pimp"); // pimp = Parrot IMaging Process
+ //ret = system("pimpctl list-cameras"); //TODO look for 1 or more then define a variable to use or not
+#if DC_CTRL_PARROT_MYKONOS_STREAM_AT_STARTUP
+ dc_ctrl_parrot_mykonos_command(DC_CTRL_PARROT_MYKONOS_STREAM_START);
+#endif
+
+#else
+ //Start your local processes so simulated flight with sim shooting can be perfromed
+ //E.g. using a tile map interface of a pre-recorded stream or a 3D generated image
+ //FIXME: make a complete example, he, it's opensouce and involves your work indeed...
+ //ret = system("whateveryouwantotstartlocallyaddithere");
+#endif
+}
+
+void dc_ctrl_parrot_mykonos_periodic(void)
+{
+ //Nice 'n ugly use of True/False
+ if (dc_ctrl_parrot_mykonos.timer) {
+ dc_ctrl_parrot_mykonos.timer--;
+ } else {
+ dc_ctrl_parrot_mykonos_command(DC_CTRL_PARROT_MYKONOS_SHOOT);
+ }
+ // test log delay if set
+ if (dc_ctrl_parrot_mykonos.log_delay) {
+#ifndef SITL
+ if (get_sys_time_msec() > dc_ctrl_parrot_mykonos.log_delay) { //FIXME: Could also happen in SITL...
+#endif
+#if DC_CTRL_PARROT_MYKONOS_LOG
+ dc_ctrl_parrot_mykonos_log_shot_position();
+#endif
+
+#if DC_CTRL_PARROT_MYKONOS_SYNC_SEND
+ dc_ctrl_parrot_mykonos_send_shot_position();
+#endif
+ // increment photo number
+ dc_ctrl_parrot_mykonos.photo_nr++;
+ // unset log delay
+ dc_ctrl_parrot_mykonos.log_delay = 0;
+#ifndef SITL
+ }
+#endif
+ }
+
+ // Common DC Periodic task
+ dc_periodic();
+}
+
+//FIXME muiltiple cams and same DC cam API do no go together,
+// so for the time being not used here, also one needs to add SITL options
+
+/* Command the Camera
+ * Intermidate function so the universal PPRZ Camra API can be used
+ * No need to change flightplan, script or otherwhise
+ * should work on both Fixedwing and Rotorcraft
+*/
+
+#ifdef SITL
+void dc_send_command(uint8_t cmd)
+{
+ //Nothing yet, empty framework here so sim compiles
+ switch (cmd) {
+ default:
+ break;
+ }
+}
+#endif
+
+
+/* Execute the Shoot, Record and Stream commands */
+void dc_ctrl_parrot_mykonos_command(enum dc_ctrl_parrot_mykonos_status cmd)
+{
+ int ret __attribute__((unused));
+
+ dc_ctrl_parrot_mykonos.status = cmd;
+ switch (cmd) {
+ case DC_CTRL_PARROT_MYKONOS_RECORD_START:
+#ifndef SITL
+ ret = system("pimpctl recording-start front");
+#else
+ //ret = system("addyourlocalsitlcommandshere");
+#endif
+ break;
+ case DC_CTRL_PARROT_MYKONOS_RECORD_STOP:
+ dc_ctrl_parrot_mykonos.timer = DC_CTRL_PARROT_MYKONOS_TIMER_OF_DELAY(DC_CTRL_PARROT_MYKONOS_RECORD_DELAY);
+#ifndef SITL
+ ret = system("pimpctl recording-stop front");
+#else
+ //ret = system("addyourlocalsitlcommandshere");
+#endif
+ break;
+ case DC_CTRL_PARROT_MYKONOS_SHOOT:
+#ifndef SITL
+ ret = system("pimpctl take-picture front");
+#else
+ //ret = system("addyourlocalsitlcommandshere");
+#endif
+
+ break;
+ case DC_CTRL_PARROT_MYKONOS_STREAM_START:
+ /*
+ * Note that while .0 as destination IP works multicasting it introduces latency.
+ To avoid this use the real target IP of the video viewer device e.g. the GCS
+ quick and dirty; get ip from latest lease: ./data/lib/misc/dhcp_eth0.leases
+ and look for the name of your host you want to target.
+
+ TIP: Example to view stream on Host PC:
+
+ gst-launch-1.0 udpsrc port=55004 ! "application/x-rtp, payload=96" ! rtph264depay ! avdec_h264 ! autovideosink
+
+ But there are many ways to Rome...
+
+ */
+#ifndef SITL
+ ret = system("pimpctl stream-start front 192.168.42.0 55004");//FIXME: Option to target only IP, for less delay
+#else
+//ret = system("addyourlocalsitlcommandshere");
+#endif
+ break;
+ case DC_CTRL_PARROT_MYKONOS_STREAM_STOP:
+#ifndef SITL
+ ret = system("pimpctl stream-stop front 192.168.42.0 55004");
+#else
+//ret = system("addyourlocalsitlcommandshere");
+#endif
+ break;
+ case DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_START:
+ dc_ctrl_parrot_mykonos.timer = DC_CTRL_PARROT_MYKONOS_TIMER_OF_DELAY(DC_CTRL_PARROT_MYKONOS_RECORD_DELAY);
+#ifndef SITL
+ ret = system("pimpctl take-picture front");
+#else
+//ret = system("addyourlocalsitlcommandshere");
+#endif
+ dc_ctrl_parrot_mykonos.log_delay = get_sys_time_msec() + DC_CTRL_PARROT_MYKONOS_LOG_DELAY;
+ dc_ctrl_parrot_mykonos.last_shot_pos = *stateGetPositionEnu_f();
+ break;
+ case DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_STOP:
+ //nix
+ break;
+ default:
+ break;
+ }
+}
+
+void dc_ctrl_parrot_mykonos_autoshoot(void)
+{
+// Wait a minimum time between two shots
+ if (dc_ctrl_parrot_mykonos.autoshoot) {
+ dc_ctrl_parrot_mykonos.autoshoot--;
+ } else {
+ // test distance if needed
+ // or take picture if first of the sequence
+#ifdef DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST
+ struct EnuCoor_f pos = *stateGetPositionEnu_f();
+ struct FloatVect2 d_pos;
+ d_pos.x = pos.x - dc_ctrl_parrot_mykonos.last_shot_pos.x;
+ d_pos.y = pos.y - dc_ctrl_parrot_mykonos.last_shot_pos.y;
+ if (VECT2_NORM2(d_pos) > (DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST * DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST)
+ || dc_ctrl_parrot_mykonos.status == DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_START) {
+#endif
+ // take a picture
+ dc_ctrl_parrot_mykonos_command(DC_CTRL_PARROT_MYKONOS_SHOOT);
+ // reset timer
+ dc_ctrl_parrot_mykonos.autoshoot = DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_TIMER_OF_DELAY(DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DELAY);
+#ifdef DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST
+ }
+#endif
+ }
+}
+
+void dc_ctrl_parrot_mykonos_autoshoot_start(void)
+{
+ // Start taking a picture immediately
+ dc_ctrl_parrot_mykonos.autoshoot = 0;
+ dc_ctrl_parrot_mykonos.status = DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_START;
+}
diff --git a/sw/airborne/modules/digital_cam/dc_ctrl_parrot_mykonos.h b/sw/airborne/modules/digital_cam/dc_ctrl_parrot_mykonos.h
new file mode 100644
index 0000000000..8961e2018c
--- /dev/null
+++ b/sw/airborne/modules/digital_cam/dc_ctrl_parrot_mykonos.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2018 OpenUAS
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING. If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+/** @file modules/digital_cam/dc_ctrl_parrot_mykonos.h
+ * @brief Digital video/photo recorder control for Parrot Mykonos Platform,
+ * For others that is: control the camera of the Disco and if one manages to
+ * add pimpctl onto a Bebop or Bebop2, should work also on those
+ *
+ * Provides the control of the Camera start and stop of video recording,
+ * Taking photos and switch video streaming on and off
+ * This module starts the camera in standby mode and triggers starting
+ * of recording or take a picture.
+ * Minimum time between two pictures is 1 second.
+ *
+ */
+
+#ifndef DC_CTRL_PARROT_MYKONOS_H
+#define DC_CTRL_PARROT_MYKONOS_H
+
+#include "std.h"
+#include "math/pprz_geodetic_float.h"
+
+// Include Standard Camera Control Interface
+// Note: Standard DC nneds to be unified and enhance for multicam support
+#include "dc.h"
+
+#include BOARD_CONFIG
+
+enum dc_ctrl_parrot_mykonos_status {
+ DC_CTRL_PARROT_MYKONOS_NONE,
+ DC_CTRL_PARROT_MYKONOS_RECORD_START,
+ DC_CTRL_PARROT_MYKONOS_RECORD_STOP,
+ DC_CTRL_PARROT_MYKONOS_SHOOT,
+ DC_CTRL_PARROT_MYKONOS_STREAM_START,
+ DC_CTRL_PARROT_MYKONOS_STREAM_STOP,
+ DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_START,
+ DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_STOP
+};
+
+struct Dc_Ctrl_Parrot_Mykonos {
+ enum dc_ctrl_parrot_mykonos_status status;
+ uint32_t timer;
+ int16_t photo_nr;
+ uint32_t autoshoot;
+ struct EnuCoor_f last_shot_pos;
+ uint32_t log_delay;
+};
+
+extern struct Dc_Ctrl_Parrot_Mykonos dc_ctrl_parrot_mykonos;
+
+extern void dc_ctrl_parrot_mykonos_init(void);
+extern void dc_ctrl_parrot_mykonos_periodic(void);
+extern void dc_ctrl_parrot_mykonos_autoshoot(void);
+extern void dc_ctrl_parrot_mykonos_autoshoot_start(void);
+extern void dc_ctrl_parrot_mykonos_command(enum dc_ctrl_parrot_mykonos_status cmd);
+
+// macro for setting handler
+#define dc_ctrl_parrot_mykonos_SendCmd(cmd) dc_ctrl_parrot_mykonos_command(cmd)
+
+#endif // DC_CTRL_PARROT_MYKONOS_H
diff --git a/sw/airborne/modules/nav/takeoff_detect.c b/sw/airborne/modules/nav/takeoff_detect.c
index 67c2257d9f..8066bd0f08 100644
--- a/sw/airborne/modules/nav/takeoff_detect.c
+++ b/sw/airborne/modules/nav/takeoff_detect.c
@@ -87,11 +87,19 @@ void takeoff_detect_periodic(void)
// Run detection state machine here
switch (takeoff_detect.state) {
case TO_DETECT_ARMED:
- // test for "nose up" + AP in AUTO2 (+ GPS OK ? FIXME)
- if (stateGetNedToBodyEulers_f()->theta > TAKEOFF_DETECT_LAUNCH_PITCH
- && autopilot_get_mode() == AP_MODE_AUTO2) {
+ // test for "nose up" + AP in AUTO2, optionally AUTO1 not default since risky if one does not know what it does
+ if (stateGetNedToBodyEulers_f()->theta > TAKEOFF_DETECT_LAUNCH_PITCH)
+ {
+#ifndef TAKEOFF_DETECT_ALSO_IN_AUTO1
+ if (autopilot_get_mode() != AP_MODE_AUTO2)
+#else
+ if ((autopilot_get_mode() != AP_MODE_AUTO2) || (autopilot_get_mode() != AP_MODE_AUTO1))
+#endif
+ {
takeoff_detect.timer++;
- } else {
+ }
+ }
+ else {
// else reset timer
takeoff_detect.timer = 0;
}
@@ -102,13 +110,21 @@ void takeoff_detect_periodic(void)
takeoff_detect.timer = 0;
}
break;
+
case TO_DETECT_LAUNCHING:
// abort if pitch goes below threshold while launching
- if (stateGetNedToBodyEulers_f()->theta < TAKEOFF_DETECT_ABORT_PITCH
- || autopilot_get_mode() != AP_MODE_AUTO2) {
- // back to ARMED state
- autopilot.launch = false;
- takeoff_detect.state = TO_DETECT_ARMED;
+ if (stateGetNedToBodyEulers_f()->theta < TAKEOFF_DETECT_ABORT_PITCH)
+ {
+#ifndef TAKEOFF_DETECT_ALSO_IN_AUTO1
+ if (autopilot_get_mode() != AP_MODE_AUTO2)
+#else
+ if ((autopilot_get_mode() != AP_MODE_AUTO2) || (autopilot_get_mode() != AP_MODE_AUTO1))
+#endif
+ {
+ // back to ARMED state
+ autopilot.launch = false;
+ takeoff_detect.state = TO_DETECT_ARMED;
+ }
}
// increment timer and disable detection after some time
takeoff_detect.timer++;
@@ -116,10 +132,12 @@ void takeoff_detect_periodic(void)
takeoff_detect.state = TO_DETECT_DISABLED;
}
break;
+
case TO_DETECT_DISABLED:
// stop periodic call
takeoff_detect_takeoff_detect_periodic_status = MODULES_STOP;
break;
+
default:
// No kidding ?!
takeoff_detect.state = TO_DETECT_DISABLED;
diff --git a/sw/airborne/modules/sonar/sonar_bebop.c b/sw/airborne/modules/sonar/sonar_bebop.c
index 428b488e10..46bd39c282 100644
--- a/sw/airborne/modules/sonar/sonar_bebop.c
+++ b/sw/airborne/modules/sonar/sonar_bebop.c
@@ -38,7 +38,7 @@
#include "mcu_periph/spi.h"
#include "subsystems/abi.h"
#include
-#include "subsystems/datalink/downlink.h"
+#include "subsystems/datalink/downlink.h"//FIXME, include only when link need
#include "filters/median_filter.h"
diff --git a/sw/airborne/subsystems/ahrs/ahrs_aligner.c b/sw/airborne/subsystems/ahrs/ahrs_aligner.c
index de8dfcc221..1b0919523a 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_aligner.c
+++ b/sw/airborne/subsystems/ahrs/ahrs_aligner.c
@@ -36,12 +36,14 @@
struct AhrsAligner ahrs_aligner;
-#define SAMPLES_NB 100
+#ifndef AHRS_ALIGNER_SAMPLES_NB
+#define AHRS_ALIGNER_SAMPLES_NB 100
+#endif
static struct Int32Rates gyro_sum;
static struct Int32Vect3 accel_sum;
static struct Int32Vect3 mag_sum;
-static int32_t ref_sensor_samples[SAMPLES_NB];
+static int32_t ref_sensor_samples[AHRS_ALIGNER_SAMPLES_NB];
static uint32_t samples_idx;
#ifndef AHRS_ALIGNER_IMU_ID
@@ -117,25 +119,25 @@ void ahrs_aligner_run(void)
RunOnceEvery(50, {LED_TOGGLE(AHRS_ALIGNER_LED);});
#endif
- if (samples_idx >= SAMPLES_NB) {
+ if (samples_idx >= AHRS_ALIGNER_SAMPLES_NB) {
int32_t avg_ref_sensor = accel_sum.z;
if (avg_ref_sensor >= 0) {
- avg_ref_sensor += SAMPLES_NB / 2;
+ avg_ref_sensor += AHRS_ALIGNER_SAMPLES_NB / 2;
} else {
- avg_ref_sensor -= SAMPLES_NB / 2;
+ avg_ref_sensor -= AHRS_ALIGNER_SAMPLES_NB / 2;
}
- avg_ref_sensor /= SAMPLES_NB;
+ avg_ref_sensor /= AHRS_ALIGNER_SAMPLES_NB;
ahrs_aligner.noise = 0;
int i;
- for (i = 0; i < SAMPLES_NB; i++) {
+ for (i = 0; i < AHRS_ALIGNER_SAMPLES_NB; i++) {
int32_t diff = ref_sensor_samples[i] - avg_ref_sensor;
ahrs_aligner.noise += abs(diff);
}
- RATES_SDIV(ahrs_aligner.lp_gyro, gyro_sum, SAMPLES_NB);
- VECT3_SDIV(ahrs_aligner.lp_accel, accel_sum, SAMPLES_NB);
- VECT3_SDIV(ahrs_aligner.lp_mag, mag_sum, SAMPLES_NB);
+ RATES_SDIV(ahrs_aligner.lp_gyro, gyro_sum, AHRS_ALIGNER_SAMPLES_NB);
+ VECT3_SDIV(ahrs_aligner.lp_accel, accel_sum, AHRS_ALIGNER_SAMPLES_NB);
+ VECT3_SDIV(ahrs_aligner.lp_mag, mag_sum, AHRS_ALIGNER_SAMPLES_NB);
INT_RATES_ZERO(gyro_sum);
INT_VECT3_ZERO(accel_sum);
diff --git a/sw/airborne/subsystems/imu/imu_disco.c b/sw/airborne/subsystems/imu/imu_disco.c
index 626d004201..25f75a1398 100644
--- a/sw/airborne/subsystems/imu/imu_disco.c
+++ b/sw/airborne/subsystems/imu/imu_disco.c
@@ -81,7 +81,7 @@ void imu_disco_init(void)
/**
* Handle all the periodic tasks of the Disco IMU components.
- * Read the MPU60x0 every periodic call and the HMC58XX every 10th call.
+ * Read the MPU60x0 every periodic call and the AKM8963 every 10th call.
*/
void imu_disco_periodic(void)
{
diff --git a/sw/airborne/subsystems/radio_control/spektrum_radio.h b/sw/airborne/subsystems/radio_control/spektrum_radio.h
index 0a3af0b489..50dac64118 100644
--- a/sw/airborne/subsystems/radio_control/spektrum_radio.h
+++ b/sw/airborne/subsystems/radio_control/spektrum_radio.h
@@ -28,16 +28,16 @@
#ifndef RADIO_CONTROL_SPEKTRUM_RADIO_H
#define RADIO_CONTROL_SPEKTRUM_RADIO_H
-/* Amount of spektrum channels */
+/* Amount of Spektrum channels */
#ifndef RADIO_CONTROL_NB_CHANNEL
#define RADIO_CONTROL_NB_CHANNEL 14
#endif
#if RADIO_CONTROL_NB_CHANNEL > 14
-#error "RADIO_CONTROL_NB_CHANNEL mustn't be higher than 14."
+#error "RADIO_CONTROL_NB_CHANNEL mustn't be higher than 14. X-Plus channel expansion is not (yet) usable"
#endif
-/* default channel assignments */
+/* Default channel assignments */
#ifndef RADIO_THROTTLE
#define RADIO_THROTTLE 0
#endif
@@ -50,19 +50,41 @@
#ifndef RADIO_YAW
#define RADIO_YAW 3
#endif
+#ifndef RADIO_GEAR
#define RADIO_GEAR 4
+#endif
+#ifndef RADIO_FLAP
#define RADIO_FLAP 5
+#endif
+#ifndef RADIO_AUX1
#define RADIO_AUX1 5
+#endif
+#ifndef RADIO_AUX2
#define RADIO_AUX2 6
+#endif
+#ifndef RADIO_AUX3
#define RADIO_AUX3 7
+#endif
+#ifndef RADIO_AUX4
#define RADIO_AUX4 8
+#endif
+#ifndef RADIO_AUX5
#define RADIO_AUX5 9
+#endif
+#ifndef RADIO_AUX6
#define RADIO_AUX6 10
+#endif
+#ifndef RADIO_AUX7
#define RADIO_AUX7 11
+#endif
+#ifndef RADIO_AUX8
#define RADIO_AUX8 12
+#endif
+#ifndef RADIO_AUX9
#define RADIO_AUX9 13
+#endif
-/* Default Mode channel is GEAR (number 5) */
+/* Default Mode channel is GEAR */
#ifndef RADIO_MODE
#define RADIO_MODE RADIO_GEAR
#endif
@@ -71,7 +93,7 @@
#ifndef RADIO_CONTROL_SPEKTRUM_SIGNS
//
#ifdef RADIO_CONTROL_SPEKTRUM_OLD_SIGNS
-#define RADIO_CONTROL_SPEKTRUM_SIGNS {1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1} // As most transmitters are sold
+#define RADIO_CONTROL_SPEKTRUM_SIGNS {1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1} // As most transmitters are sold and set per default
#else
#define RADIO_CONTROL_SPEKTRUM_SIGNS {1,1,1,1,1,1,1,1,1,1,1,1,1,1} // PPRZ sign convention
#endif
diff --git a/sw/airborne/subsystems/radio_control/superbitrf_rc.h b/sw/airborne/subsystems/radio_control/superbitrf_rc.h
index ae91df2f52..448a7cd24c 100644
--- a/sw/airborne/subsystems/radio_control/superbitrf_rc.h
+++ b/sw/airborne/subsystems/radio_control/superbitrf_rc.h
@@ -34,25 +34,55 @@
#endif
#if RADIO_CONTROL_NB_CHANNEL > 14
-#error "RADIO_CONTROL_NB_CHANNEL mustn't be higher than 14."
+#error "RADIO_CONTROL_NB_CHANNEL mustn't be higher than 14. X-Plus channel expansion is not (yet) usable"
#endif
-/* The channel ordering is always the same for DSM2 and DSMX */
+/* Default channel assignments */
+#ifndef RADIO_THROTTLE
#define RADIO_THROTTLE 0
+#endif
+#ifndef RADIO_ROLL
#define RADIO_ROLL 1
+#endif
+#ifndef RADIO_PITCH
#define RADIO_PITCH 2
+#endif
+#ifndef RADIO_YAW
#define RADIO_YAW 3
+#endif
+#ifndef RADIO_GEAR
#define RADIO_GEAR 4
+#endif
+#ifndef RADIO_FLAP
#define RADIO_FLAP 5
+#endif
+#ifndef RADIO_AUX1
#define RADIO_AUX1 5
+#endif
+#ifndef RADIO_AUX2
#define RADIO_AUX2 6
+#endif
+#ifndef RADIO_AUX3
#define RADIO_AUX3 7
+#endif
+#ifndef RADIO_AUX4
#define RADIO_AUX4 8
+#endif
+#ifndef RADIO_AUX5
#define RADIO_AUX5 9
+#endif
+#ifndef RADIO_AUX6
#define RADIO_AUX6 10
+#endif
+#ifndef RADIO_AUX7
#define RADIO_AUX7 11
+#endif
+#ifndef RADIO_AUX8
#define RADIO_AUX8 12
+#endif
+#ifndef RADIO_AUX9
#define RADIO_AUX9 13
+#endif
/* Map the MODE default to the gear switch */
#ifndef RADIO_MODE
diff --git a/sw/tools/parrot/parrot_utils.py b/sw/tools/parrot/parrot_utils.py
index 6c2ae8af99..daae1b63c2 100644
--- a/sw/tools/parrot/parrot_utils.py
+++ b/sw/tools/parrot/parrot_utils.py
@@ -109,7 +109,9 @@ class ParrotUtils:
print('Could not connect to the ' + self.uav_name + ' (address: ' + self.address + ')')
print('Check if the ' + self.uav_name + ' is turned on and the computer is connected over wifi or bluetooth.')
if self.address == '192.168.42.1':
- print("If you are using Bebop 1 or 2, don't forget pressing the power button 4 times after the Bebop has booted!")
+ print("If you are using Bebop 1 or 2, don't forget pressing the power button 4 times after the Bebop has booted!\n")
+ print("And if using Disco pressing the power button 2 times after aircraft powerup.")
+ print("Or run the buttonpress script to get rid of this buttonpress annoyance.")
exit(2)
# Close the telnet and ftp
@@ -274,7 +276,7 @@ class ParrotUtils:
if ((not v == ParrotVersion('0.0.0.0')) and ((v < ParrotVersion(min_ver)) or (v > ParrotVersion(max_ver)))):
print("Error: please upgrade your " + self.uav_name + " firmware to version between " + min_ver + " and " + max_ver + "!")
return
-
+
f = self.split_into_path_and_file(name)
# Upload the file