From 0e2f34e4f96918039c6ac9f286e9a28e9eb01042 Mon Sep 17 00:00:00 2001 From: Open UAS <> Date: Wed, 29 Mar 2017 23:22:55 +0200 Subject: [PATCH 01/14] Fixedwing for Pixracer --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 554 ++++++++++++++++++ .../OPENUAS/openuas_fixedwing_imu_rc.xml | 123 ++++ conf/userconf/OPENUAS/openuas_conf.xml | 11 + .../subsystems/radio_control/spektrum_arch.h | 18 + 4 files changed, 706 insertions(+) create mode 100644 conf/airframes/OPENUAS/openuas_eflite_t28.xml create mode 100644 conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml new file mode 100644 index 0000000000..be5ba288a4 --- /dev/null +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -0,0 +1,554 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ + +
+ + +
+ + + + + +
+ + +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + +
+ + +
+ +
\ No newline at end of file diff --git a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml new file mode 100644 index 0000000000..4683cc378c --- /dev/null +++ b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/userconf/OPENUAS/openuas_conf.xml b/conf/userconf/OPENUAS/openuas_conf.xml index 697f3ad9a3..63e9f6ddea 100644 --- a/conf/userconf/OPENUAS/openuas_conf.xml +++ b/conf/userconf/OPENUAS/openuas_conf.xml @@ -1,4 +1,15 @@ + Date: Fri, 31 Mar 2017 21:18:06 +0200 Subject: [PATCH 02/14] Some work.. --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 23 +++++++++++-------- .../subsystems/radio_control/spektrum_arch.h | 19 +-------------- sw/airborne/boards/px4fmu_4.0.h | 4 ++-- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index be5ba288a4..311d0e8ad2 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -39,6 +39,7 @@ NOTES: + @@ -61,7 +62,7 @@ NOTES: - + @@ -152,8 +153,8 @@ NOTES: - - + + @@ -268,11 +269,14 @@ NOTES: + + + @@ -477,9 +481,9 @@ NOTES: Handy if in auto1 for sidewind stabilized crabbing landing, also for steering if someting not OK with course gains in Autonomous flight TODO disable again after strong wind sidewind autolanding is 100% tuned Note that in auto2 mode the Flaps and Gears are after test then controlable by flightplan conditions e.g landng block extend gear and flaps --> - - - + + + @@ -487,9 +491,10 @@ NOTES: - - - + + + + diff --git a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h index bdec30b94b..8aceed4d13 100644 --- a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h +++ b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h @@ -52,33 +52,16 @@ #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 /* reverse some channels to suit Paparazzi conventions */ /* the maximum number of channels a Spektrum can transmit is 12 */ diff --git a/sw/airborne/boards/px4fmu_4.0.h b/sw/airborne/boards/px4fmu_4.0.h index c2b29ac07a..5614c0205e 100644 --- a/sw/airborne/boards/px4fmu_4.0.h +++ b/sw/airborne/boards/px4fmu_4.0.h @@ -260,9 +260,9 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #endif #if USE_ADC_2 -#define DefaultVoltageOfAdc(adc) (0.00827*adc) +#define DefaultVoltageOfAdc(adc) ((float(adc) * (0.012660247f))// (0.00827*adc) //0,012660247 #else -#define DefaultVoltageOfAdc(adc) (0.0021*adc) // scale internal vdd to 5V +#define DefaultVoltageOfAdc(adc) (0.003214815 * adc) // scale internal vdd to 5V #endif /* I2C mapping */ From ea96621d43c8a9f53fbe6b2897b47b2e7bd3e1a7 Mon Sep 17 00:00:00 2001 From: Developer Date: Sat, 1 Apr 2017 12:56:19 +0200 Subject: [PATCH 03/14] Toying with various settings --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 118 +++++++++++++----- conf/boards/px4fmu_4.0.makefile | 6 + .../OPENUAS/openuas_fixedwing_imu_rc.xml | 1 + conf/userconf/OPENUAS/openuas_conf.xml | 2 +- sw/airborne/boards/px4fmu_4.0.h | 47 ++++--- 5 files changed, 120 insertions(+), 54 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 311d0e8ad2..205d090f95 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -39,7 +39,7 @@ NOTES: - + @@ -94,6 +94,7 @@ NOTES: @@ -155,7 +156,8 @@ NOTES: - + + @@ -184,8 +186,9 @@ NOTES: --> - + - + + @@ -268,17 +273,19 @@ NOTES: - - + - - + --> + + + - + @@ -392,32 +399,44 @@ NOTES:
+ - - - + + + + - - - - + + + +
- - - + + + + + + + +
- - + +
@@ -431,9 +450,23 @@ NOTES:
- - - + + + + + @@ -471,7 +504,12 @@ NOTES: - + +
@@ -492,15 +530,19 @@ NOTES: - + - - + + + + - + @@ -554,6 +596,16 @@ NOTES:
+ + + +
+ +
+ + + +
\ No newline at end of file diff --git a/conf/boards/px4fmu_4.0.makefile b/conf/boards/px4fmu_4.0.makefile index 6cd756c5da..a9f32fc093 100644 --- a/conf/boards/px4fmu_4.0.makefile +++ b/conf/boards/px4fmu_4.0.makefile @@ -57,3 +57,9 @@ GPS_BAUD ?= B38400 # e.g. # ACTUATORS ?= actuators_pwm + +# +# default External Current and Volt Sensor configuration +# +# ADC_CURRENT_SENSOR ?= ADC_3 +# ADC_VOLTAGE_SENSOR ?= ADC_2 diff --git a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml index 4683cc378c..12ffdee871 100644 --- a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml +++ b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml @@ -3,6 +3,7 @@ + diff --git a/conf/userconf/OPENUAS/openuas_conf.xml b/conf/userconf/OPENUAS/openuas_conf.xml index 63e9f6ddea..9a68b5b5aa 100644 --- a/conf/userconf/OPENUAS/openuas_conf.xml +++ b/conf/userconf/OPENUAS/openuas_conf.xml @@ -18,7 +18,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/rotorcraft_basic.xml" settings="settings/rotorcraft_basic.xml settings/superbitrf.xml settings/nps.xml" - settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/air_data.xml modules/geo_mag.xml modules/gps_ubx_ucenter.xml" + settings_modules="modules/ahrs_int_cmpl_quat.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml modules/radio_control_superbitrf_rc.xml modules/air_data.xml modules/geo_mag.xml modules/gps_ubx_ucenter.xml" gui_color="#fffffe72b9fd" /> IN2 corresponds to channel 2) #define ADC_2 AD1_2 // ADC123 means it can be used by ADC 1 and 2 and 3 (the f4 supports 3 adc's), does not matter which. Each ADC can address 4 pins, so in this case we are using ADC 1, on its second pin. @@ -241,11 +245,11 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_2_GPIO_PIN GPIO2 #endif - -// external current sens +// Sense current via external sensor on ADC #ifndef USE_ADC_3 #define USE_ADC_3 1 #endif + #if USE_ADC_3 #define AD1_3_CHANNEL 3 // ADC123_IN3 #define ADC_3 AD1_3 @@ -255,27 +259,33 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define MilliAmpereOfAdc(adc)((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f) /* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ -#ifndef ADC_CHANNEL_VSUPPLY -#define ADC_CHANNEL_VSUPPLY ADC_2 -#endif +//#ifndef ADC_CHANNEL_VSUPPLY +#define ADC_CHANNEL_VSUPPLY ADC_1 +//#endif -#if USE_ADC_2 -#define DefaultVoltageOfAdc(adc) ((float(adc) * (0.012660247f))// (0.00827*adc) //0,012660247 -#else -#define DefaultVoltageOfAdc(adc) (0.003214815 * adc) // scale internal vdd to 5V -#endif + +//??FT = Five-volt tolerant. In order to sustain a voltage higher than VDD+0.3 the internal pull-up/pull-down resistors must be disabled. +//#define DefaultVoltageOfAdc(adc) (0.0045*adc) + +//Set stock values +//#if USE_ADC_2 +//#define DefaultVoltageOfAdc(adc) (0.0005f * (float)adc)//FIXME: Value... +//#else +#define DefaultVoltageOfAdc(adc) (0.004 * adc) // scale internal vdd to 5V +//#endif /* I2C mapping */ #define I2C1_GPIO_PORT GPIOB #define I2C1_GPIO_SCL GPIO8 #define I2C1_GPIO_SDA GPIO9 +//Onboard Barometer #ifndef USE_BARO_BOARD #define USE_BARO_BOARD 1 #endif /* Another Magnetometer on board a HMC5983 not the one in the IMU 9250*/ -//TODO +//TODO: #ifndef USE_MAGNETOMETER_B #define USE_MAGNETOMETER_B 0 #endif @@ -349,7 +359,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_4_OC_BIT 0 #endif -/* -ESC Servo 5 */ +/* -ESC or Servo 5 */ #if USE_PWM5 #define PWM_SERVO_5 4 #define PWM_SERVO_5_TIMER TIM4 @@ -362,7 +372,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_5_OC_BIT 0 #endif -/* -ESC Servo 6 */ +/* -ESC or Servo 6 */ #if USE_PWM6 #define PWM_SERVO_6 5 #define PWM_SERVO_6_TIMER TIM4 @@ -379,7 +389,6 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_TIM4_CHAN_MASK (PWM_SERVO_5_OC_BIT|PWM_SERVO_6_OC_BIT) /* Buzzer (A.k.a. Alarm) */ - #if USE_BUZZER #define PWM_BUZZER #define PWM_BUZZER_TIMER TIM2 @@ -393,6 +402,4 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_BUZZER_OC_BIT 0 #endif - - #endif /* CONFIG_PX4FMU_4_0_H */ From 8b803b1d047653bf3c94eefec596032b67910d40 Mon Sep 17 00:00:00 2001 From: Default Date: Sat, 1 Apr 2017 13:28:45 +0200 Subject: [PATCH 04/14] pre flight01 --- .gitignore | 4 +- conf/conf.xml | 1 + conf/control_panel.xml | 623 ++++++++++++++++++++++++++++++++ sw/ground_segment/tmtc/Makefile | 2 +- 4 files changed, 627 insertions(+), 3 deletions(-) create mode 120000 conf/conf.xml create mode 100644 conf/control_panel.xml diff --git a/.gitignore b/.gitignore index fd228d9706..715fe23c42 100644 --- a/.gitignore +++ b/.gitignore @@ -56,10 +56,10 @@ paparazzi.sublime-workspace /paparazzi # /conf/ -/conf/conf.xml +/conf/conf.xml~ /conf/conf.xml.20* /conf/conf_personal.xml.20* -/conf/control_panel.xml +/conf/control_panel.xml~ /conf/control_panel.xml.20* /conf/%gconf.xml /conf/maps_data/* diff --git a/conf/conf.xml b/conf/conf.xml new file mode 120000 index 0000000000..8b45de80fa --- /dev/null +++ b/conf/conf.xml @@ -0,0 +1 @@ +userconf/OPENUAS/openuas_conf.xml \ No newline at end of file diff --git a/conf/control_panel.xml b/conf/control_panel.xml new file mode 100644 index 0000000000..e427f8efeb --- /dev/null +++ b/conf/control_panel.xml @@ -0,0 +1,623 @@ + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/sw/ground_segment/tmtc/Makefile b/sw/ground_segment/tmtc/Makefile index 777114e62b..8770869cd7 100644 --- a/sw/ground_segment/tmtc/Makefile +++ b/sw/ground_segment/tmtc/Makefile @@ -38,7 +38,7 @@ SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_serv SERVERCMX = $(SERVERCMO:.cmo=.cmx) -all: link server messages settings ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea +all: link server messages settings ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea gpsd2ivy opt: server.opt From 6dcbbf546ffc185399727e93279cc8a43b08d8fe Mon Sep 17 00:00:00 2001 From: Default Date: Sat, 1 Apr 2017 14:39:51 +0200 Subject: [PATCH 05/14] First flight with Pixracer in fixedwing --- conf/control_panel.xml | 624 +------------ .../OPENUAS/openuas_control_panel.xml | 828 +++++++++--------- 2 files changed, 413 insertions(+), 1039 deletions(-) mode change 100644 => 120000 conf/control_panel.xml diff --git a/conf/control_panel.xml b/conf/control_panel.xml deleted file mode 100644 index e427f8efeb..0000000000 --- a/conf/control_panel.xml +++ /dev/null @@ -1,623 +0,0 @@ - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/conf/control_panel.xml b/conf/control_panel.xml new file mode 120000 index 0000000000..99dae21217 --- /dev/null +++ b/conf/control_panel.xml @@ -0,0 +1 @@ +userconf/OPENUAS/openuas_control_panel.xml \ No newline at end of file diff --git a/conf/userconf/OPENUAS/openuas_control_panel.xml b/conf/userconf/OPENUAS/openuas_control_panel.xml index 1bac15f671..18bd7c2ad4 100644 --- a/conf/userconf/OPENUAS/openuas_control_panel.xml +++ b/conf/userconf/OPENUAS/openuas_control_panel.xml @@ -1,4 +1,3 @@ -
@@ -8,7 +7,6 @@
-
@@ -55,8 +53,6 @@ - - @@ -69,60 +65,140 @@ - - -
- +
- - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -138,16 +214,112 @@ - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -158,7 +330,134 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -172,7 +471,55 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -220,67 +567,14 @@ - - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - @@ -291,262 +585,28 @@ - - - - - - - - - - - - - - - + + - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -565,11 +625,6 @@ - - - - - @@ -584,64 +639,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+ \ No newline at end of file From f77b469765c63d9664a3441c2a1c59c446514c46 Mon Sep 17 00:00:00 2001 From: Developer Date: Sat, 1 Apr 2017 19:05:55 +0200 Subject: [PATCH 06/14] some tuneing --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 113 +-- conf/control_panel.xml | 654 +++++++++++++++++- 2 files changed, 711 insertions(+), 56 deletions(-) mode change 120000 => 100644 conf/control_panel.xml diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 205d090f95..91b6359be1 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -37,6 +37,16 @@ NOTES: + + + + + + + + + + @@ -72,14 +82,12 @@ NOTES: - - - + - + @@ -125,24 +133,13 @@ NOTES: - + - + - - - - - - - - - - - - + @@ -155,7 +152,7 @@ NOTES: - + @@ -171,7 +168,7 @@ NOTES: - + @@ -466,16 +463,16 @@ NOTES: https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/modules/nav.c#L132 --> - - - - - - - - - - + + + + + + + + + +
@@ -483,18 +480,19 @@ NOTES: - + - - - - - - - + + + + + + + + @@ -504,8 +502,9 @@ NOTES: - - - +
- - - - - - - - - + + + + + + + + + + + + + + + - + - - - - + + diff --git a/conf/control_panel.xml b/conf/control_panel.xml deleted file mode 120000 index 99dae21217..0000000000 --- a/conf/control_panel.xml +++ /dev/null @@ -1 +0,0 @@ -userconf/OPENUAS/openuas_control_panel.xml \ No newline at end of file diff --git a/conf/control_panel.xml b/conf/control_panel.xml new file mode 100644 index 0000000000..6a3b2b20c0 --- /dev/null +++ b/conf/control_panel.xml @@ -0,0 +1,653 @@ + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file From c250594a48810c5d3db6f80b09ba37d8a2ec50a5 Mon Sep 17 00:00:00 2001 From: Developer Date: Sun, 2 Apr 2017 14:28:47 +0200 Subject: [PATCH 07/14] Added prameters to be able to test Classic AP mode --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 339 +++++++++++------- conf/userconf/OPENUAS/openuas_conf.xml | 8 +- 2 files changed, 222 insertions(+), 125 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 91b6359be1..90dfd76176 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -15,27 +15,31 @@ + RANGER: MAXBOTICS LV1 Ultrasonic sensor analog on RSSI pin NOTES: - + Using Enahanced Total Energy control as control loop + + Using Enahanced Total Energy control as control loop in Final AC + Servo pins point to tail of airframe + Engine battery voltage and amp values via separate sensor + Flashing the firmware is done via original PX4 bootloader... Simple, USB cable in, upload.. voila PPRZ aircraft on a Pixracer... + A GNSS device with ANOTHER magneto on it is used, external... on the board Replaced HMC8853 with HMC8953 to test benefit from temperature compensated values - + On I2C we have airspeed sensor and external magneto via a I2C splitboard, yuck... but pragmatic atm ;) + + On I2C we have airspeed sensor and external magneto via a I2C splitboard, I2C yuck... but pragmatic atm ;) + NO buzzer (yet..) - + SD SRTM not implemented (yet..) + + SD SRTM via onboard storage not implemented (yet..) + NO Sleep mode on (yet..) + + If testing "Classic" (as in not ETECS..) make sure to disable the settings/estimation/ac_char + Disable at first no airspeed tests + Use also flightplan Versatile if no airspeed sensor is ues and use + flightplan versatile_airspeed only with enabled airspeed sensor --> - + - @@ -46,10 +50,9 @@ NOTES: - + - @@ -63,8 +66,8 @@ NOTES: @@ -85,8 +88,9 @@ NOTES: - - + + + @@ -99,46 +103,48 @@ NOTES: - + + + + - + - - + - + + + + - + - + - + - - - - - - + + @@ -149,22 +155,37 @@ NOTES: - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + + @@ -262,9 +283,8 @@ NOTES: - - + + @@ -300,17 +320,16 @@ NOTES: - - + + lucky the tree axis are aligned already in hardware ;) --> + - + @@ -332,9 +351,8 @@ NOTES: -
- + @@ -343,7 +361,14 @@ NOTES: + + +
+ + +
+ @@ -351,8 +376,31 @@ NOTES: + + + + + + + + + + + + + + @@ -366,11 +414,13 @@ NOTES: - + + +
@@ -394,11 +444,10 @@ NOTES:
-
- @@ -406,6 +455,8 @@ NOTES: + + @@ -422,13 +473,10 @@ NOTES: --> - - - - - - - + + + +
@@ -446,10 +494,12 @@ NOTES:
+ +
- - + + - - + + @@ -475,53 +525,90 @@ NOTES:
+ + + +
- + + + - - - - - - - - - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - -
+ + + - - - - - - - - + + + +
+ + + + + + + + +
@@ -531,7 +618,7 @@ NOTES: - + @@ -545,42 +632,50 @@ NOTES:
-
- - +
+ + + + + - + + + + + - - + + + + - - - + + or fly a long range mission you define the wanted mode behaviour here. + If you do not define it, it defaults to flying to the flightplan HOME --> - - - + +
+ +
@@ -588,7 +683,8 @@ NOTES:
- + +
@@ -599,11 +695,12 @@ NOTES:
- - - + + +
+
diff --git a/conf/userconf/OPENUAS/openuas_conf.xml b/conf/userconf/OPENUAS/openuas_conf.xml index 9a68b5b5aa..004d1bc1db 100644 --- a/conf/userconf/OPENUAS/openuas_conf.xml +++ b/conf/userconf/OPENUAS/openuas_conf.xml @@ -5,9 +5,9 @@ airframe="airframes/OPENUAS/openuas_eflite_t28.xml" radio="radios/spektrum.xml" telemetry="telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml" - flight_plan="flight_plans/versatile_airspeed.xml" - settings="settings/fixedwing_basic.xml settings/estimation/ac_char.xml settings/control/ctl_energy.xml" - settings_modules="modules/nav_smooth.xml modules/nav_survey_poly_osam.xml modules/geo_mag.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_energy.xml modules/stabilization_attitude_fw.xml modules/ahrs_int_cmpl_quat.xml modules/tune_airspeed.xml modules/imu_common.xml" + flight_plan="flight_plans/versatile.xml" + settings="settings/fixedwing_basic.xml [settings/estimation/ac_char.xml] [settings/control/ctl_energy.xml]" + settings_modules="modules/nav_smooth.xml modules/nav_survey_poly_osam.xml modules/geo_mag.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_float_cmpl_quat.xml modules/ahrs_int_cmpl_quat.xml modules/imu_common.xml" gui_color="#ffffffffffff" /> Date: Sun, 2 Apr 2017 14:40:47 +0200 Subject: [PATCH 08/14] Some tweaks --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 90dfd76176..71fe290f00 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -303,7 +303,7 @@ NOTES: - + - - + +
From 99ebce7b5faa19b29df0cbda024c1e52a911f046 Mon Sep 17 00:00:00 2001 From: Developer Date: Mon, 3 Apr 2017 12:27:45 +0200 Subject: [PATCH 09/14] clean up a bit --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 12 +-- sw/airborne/boards/px4fmu_4.0.h | 86 ++++++++++--------- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 71fe290f00..647f2dda40 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -43,9 +43,9 @@ NOTES: - - - + + + @@ -155,8 +155,8 @@ NOTES: - - + + @@ -169,7 +169,7 @@ NOTES: - + diff --git a/sw/airborne/boards/px4fmu_4.0.h b/sw/airborne/boards/px4fmu_4.0.h index f60fc7158c..fe23b9a7ab 100644 --- a/sw/airborne/boards/px4fmu_4.0.h +++ b/sw/airborne/boards/px4fmu_4.0.h @@ -6,15 +6,15 @@ /* PX4FMU_V4 a.k.a. Pixracer board has a 24MHz external clock and 168MHz internal. */ /* STM32F4 STM32F427VIT6 */ -#define EXT_CLK 24000000 //OK -#define AHB_CLK 168000000 //OK +#define EXT_CLK 24000000 +#define AHB_CLK 168000000 //#define STM32F4 //to debug ADC on F4 does no work //#define ADC_SAMPLE_TIME ADC_SMPR_SMP_56CYC //to debug ADC on F4 does no work -/* On PCB Multicolor LED */ +/* On PCB there is a Multicolor LED */ + /* Red */ -//OK #ifndef USE_LED_1 #define USE_LED_1 1 #endif @@ -25,7 +25,6 @@ #define LED_1_AFIO_REMAP ((void)0) /* Green */ -//OK #ifndef USE_LED_2 #define USE_LED_2 1 #endif @@ -36,7 +35,6 @@ #define LED_2_AFIO_REMAP ((void)0) /* Blue */ -//OK #ifndef USE_LED_3 #define USE_LED_3 1 #endif @@ -52,6 +50,7 @@ /* UART SCHTUFFFF*/ /* -WiFi ESP Connector, it is just a serial port*/ +//TODO: Test #define UART1_GPIO_AF GPIO_AF7 #define UART1_GPIO_PORT_RX GPIOB #define UART1_GPIO_RX GPIO7 @@ -87,12 +86,12 @@ #define UART4_GPIO_PORT_TX GPIOA #define UART4_GPIO_TX GPIO0 -/* Spektrum (only rx)*/ +/* e.g. for a Spektrum satellite receiver rx only)*/ #define UART6_GPIO_AF GPIO_AF8 #define UART6_GPIO_PORT_RX GPIOC #define UART6_GPIO_RX GPIO7 -/* Serial Debugging Connector, not used with PPRZ, use JTAG, can be put to other good use */ +/* Serial Debugging Connector, not used with PPRZ as of now, use JTAG, can be put to other good use */ #define UART7_GPIO_AF GPIO_AF8 #define UART7_GPIO_PORT_RX GPIOE #define UART7_GPIO_RX GPIO7 @@ -100,6 +99,7 @@ #define UART7_GPIO_TX GPIO8 /* Connector -FRS FrSky */ +//TODO: Test #define UART8_GPIO_AF GPIO_AF8 #define UART8_GPIO_PORT_RX GPIOE #define UART8_GPIO_RX GPIO0 @@ -107,24 +107,23 @@ #define UART8_GPIO_TX GPIO1 /* Soft binding Spektrum */ -//ok +//TODO: Test and or FIXME: #define RADIO_CONTROL_POWER_PORT GPIOE #define RADIO_CONTROL_POWER_PIN GPIO4 //SPEKTRUM POWER #define RADIO_CONTROL_POWER_ON gpio_clear // yes, inverted #define RADIO_CONTROL_POWER_OFF gpio_set -//A sat +//A receiver on powered on 3.3v #define PERIPHERAL3V3_ENABLE_PORT GPIOC //VDD_3V3_PERIPHERAL_EN #define PERIPHERAL3V3_ENABLE_PIN GPIO5 #define PERIPHERAL3V3_ENABLE_ON gpio_set #define PERIPHERAL3V3_ENABLE_OFF gpio_clear /* Turn SBUS invert */ -//ok +//TODO: Test #define RC_POLARITY_GPIO_PORT GPIOC #define RC_POLARITY_GPIO_PIN GPIO13 -//ok #define SPEKTRUM_UART6_RCC RCC_USART6 #define SPEKTRUM_UART6_BANK GPIOC #define SPEKTRUM_UART6_PIN GPIO7 @@ -136,7 +135,6 @@ /* SPI */ /* SPI1 for MPU and extra accel/gyro/mag */ -// OK #define SPI1_GPIO_AF GPIO_AF5 #define SPI1_GPIO_PORT_MISO GPIOA #define SPI1_GPIO_MISO GPIO6 @@ -146,7 +144,6 @@ #define SPI1_GPIO_SCK GPIO5 /* SPI2 for FRAM, connects to BARO */ -// OK #define SPI2_GPIO_AF GPIO_AF5 #define SPI2_GPIO_PORT_MISO GPIOB #define SPI2_GPIO_MISO GPIO14 @@ -167,8 +164,9 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi * SPI slave pin declaration */ -//So use best speced sensors as second or ref the other or determine it on task type? +//So use best spec'd sensors as second or ref the other or determine it on task type? /* EXTRA ACC_GYRO_CS on SPI1 ICM 20609-G*/ +// TODO: Make it useful #define SPI_SELECT_SLAVE0_PORT GPIOC #define SPI_SELECT_SLAVE0_PIN GPIO15 @@ -177,17 +175,16 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define SPI_SELECT_SLAVE1_PORT GPIOE #define SPI_SELECT_SLAVE1_PIN GPIO15 -/* MDL +/* MDL */ +// FIXME: Test n fix of not working #define SPI_SELECT_SLAVE1_PORT GPIOE #define SPI_SELECT_SLAVE1_PIN GPIO15 */ /* MPU_9250_CS on SPI1 */ -//OK #define SPI_SELECT_SLAVE2_PORT GPIOC #define SPI_SELECT_SLAVE2_PIN GPIO2 /* MS5611 BARO_CS on SPI2 - FRAM*/ -//OK #define SPI_SELECT_SLAVE3_PORT GPIOD #define SPI_SELECT_SLAVE3_PIN GPIO7 @@ -196,11 +193,13 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define SPI_SELECT_SLAVE4_PIN GPIO10 /* SPI3 NSS on microSD connector */ +//FIXME: not tested //#define SPI_SELECT_SLAVE4_PORT GPIOA //#define SPI_SELECT_SLAVE4_PIN GPIO4 /* SDIO to microSD card connector */ +//FIXME: Fix and test #define SDIO_AF GPIO_AF12 #define SDIO_D0_PORT GPIOC #define SDIO_D0_PIN GPIO8 @@ -222,6 +221,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define USE_AD_TIM3 1 // Internal ADC for voltage level measurement +////FIXME: test and fix if still not working #ifndef USE_ADC_1 #define USE_ADC_1 1 #endif @@ -233,11 +233,11 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_1_GPIO_PIN GPIO4 #endif -// Sense voltage level via external sensor on ADC +// Per default for the board to sense voltage level via external sensor on ADC +//FIXME: test and fix if still not working #ifndef USE_ADC_2 #define USE_ADC_2 1 #endif - #if USE_ADC_2 #define AD1_2_CHANNEL 2 // ADC123_IN2 (--> IN2 corresponds to channel 2) #define ADC_2 AD1_2 // ADC123 means it can be used by ADC 1 and 2 and 3 (the f4 supports 3 adc's), does not matter which. Each ADC can address 4 pins, so in this case we are using ADC 1, on its second pin. @@ -245,34 +245,35 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_2_GPIO_PIN GPIO2 #endif -// Sense current via external sensor on ADC +// Per default for the board to sense current via external sensor on ADC #ifndef USE_ADC_3 #define USE_ADC_3 1 #endif - #if USE_ADC_3 #define AD1_3_CHANNEL 3 // ADC123_IN3 #define ADC_3 AD1_3 #define ADC_3_GPIO_PORT GPIOA #define ADC_3_GPIO_PIN GPIO3 #endif -#define MilliAmpereOfAdc(adc)((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f) +#define MilliAmpereOfAdc(adc)((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f) //TODO: test if valid -/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ -//#ifndef ADC_CHANNEL_VSUPPLY -#define ADC_CHANNEL_VSUPPLY ADC_1 -//#endif +/* Allow to define ADC_CHANNEL_VSUPPLY in the airframe file */ +#ifndef ADC_CHANNEL_VSUPPLY +#define ADC_CHANNEL_VSUPPLY ADC_2 +#endif +/* Allow to define another ADC for Current measurement in the airframe file */ +#ifndef ADC_CHANNEL_CURRENT +#define ADC_CHANNEL_CURRENT ADC_3 +#endif //??FT = Five-volt tolerant. In order to sustain a voltage higher than VDD+0.3 the internal pull-up/pull-down resistors must be disabled. -//#define DefaultVoltageOfAdc(adc) (0.0045*adc) - -//Set stock values -//#if USE_ADC_2 -//#define DefaultVoltageOfAdc(adc) (0.0005f * (float)adc)//FIXME: Value... -//#else -#define DefaultVoltageOfAdc(adc) (0.004 * adc) // scale internal vdd to 5V -//#endif +//FIXME: Determine best stock values +#if USE_ADC_2 +#define DefaultVoltageOfAdc(adc) (0.004f * (float)adc) // FIXME: Value scale for a common PowerBrick +#else +#define DefaultVoltageOfAdc(adc) (0.004f * (float)adc) // FIXME: Value scale internal vdd to 5V +#endif /* I2C mapping */ #define I2C1_GPIO_PORT GPIOB @@ -285,7 +286,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #endif /* Another Magnetometer on board a HMC5983 not the one in the IMU 9250*/ -//TODO: +//FIXME: better default option for use of maybe fuse data #ifndef USE_MAGNETOMETER_B #define USE_MAGNETOMETER_B 0 #endif @@ -307,7 +308,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define USE_PWM5 1 #define USE_PWM6 1 -/* -ESC Servo 1 */ +/* Servo 1 */ #if USE_PWM1 #define PWM_SERVO_1 0 #define PWM_SERVO_1_TIMER TIM1 @@ -320,7 +321,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_1_OC_BIT 0 #endif -/* -ESC Servo 2 */ +/* Servo 2 */ #if USE_PWM2 #define PWM_SERVO_2 1 #define PWM_SERVO_2_TIMER TIM1 @@ -333,7 +334,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_2_OC_BIT 0 #endif -/* -ESC Servo 3 */ +/* Servo 3 */ #if USE_PWM3 #define PWM_SERVO_3 2 //#define PWM_SERVO_3_IDX 2 #define PWM_SERVO_3_TIMER TIM1 @@ -346,7 +347,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_3_OC_BIT 0 #endif -/* -ESC Servo 4 */ +/* Servo 4 */ #if USE_PWM4 #define PWM_SERVO_4 3 #define PWM_SERVO_4_TIMER TIM1 @@ -359,7 +360,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_4_OC_BIT 0 #endif -/* -ESC or Servo 5 */ +/* Servo 5 */ #if USE_PWM5 #define PWM_SERVO_5 4 #define PWM_SERVO_5_TIMER TIM4 @@ -372,7 +373,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_5_OC_BIT 0 #endif -/* -ESC or Servo 6 */ +/* Servo 6 */ #if USE_PWM6 #define PWM_SERVO_6 5 #define PWM_SERVO_6_TIMER TIM4 @@ -389,6 +390,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_TIM4_CHAN_MASK (PWM_SERVO_5_OC_BIT|PWM_SERVO_6_OC_BIT) /* Buzzer (A.k.a. Alarm) */ +//TODO: Test #if USE_BUZZER #define PWM_BUZZER #define PWM_BUZZER_TIMER TIM2 From 716bc186ac32c2f90c4dd3dc437f84c5b3f7c7eb Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 4 Apr 2017 14:07:52 +0200 Subject: [PATCH 10/14] some work done --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 21 ++++++++++++++++--- conf/settings/OPENUAS/openuas_tuning_rc.xml | 4 ++-- conf/userconf/OPENUAS/openuas_conf.xml | 4 ++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 647f2dda40..7cc9f6a77f 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -336,6 +336,13 @@ NOTES: + + @@ -479,9 +486,17 @@ NOTES:
-
- - +
+ + +
diff --git a/conf/settings/OPENUAS/openuas_tuning_rc.xml b/conf/settings/OPENUAS/openuas_tuning_rc.xml index ae3a8efcf5..f49b059e0f 100644 --- a/conf/settings/OPENUAS/openuas_tuning_rc.xml +++ b/conf/settings/OPENUAS/openuas_tuning_rc.xml @@ -23,8 +23,8 @@ - - + + diff --git a/conf/userconf/OPENUAS/openuas_conf.xml b/conf/userconf/OPENUAS/openuas_conf.xml index 004d1bc1db..497814eb47 100644 --- a/conf/userconf/OPENUAS/openuas_conf.xml +++ b/conf/userconf/OPENUAS/openuas_conf.xml @@ -6,8 +6,8 @@ radio="radios/spektrum.xml" telemetry="telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml" flight_plan="flight_plans/versatile.xml" - settings="settings/fixedwing_basic.xml [settings/estimation/ac_char.xml] [settings/control/ctl_energy.xml]" - settings_modules="modules/nav_smooth.xml modules/nav_survey_poly_osam.xml modules/geo_mag.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_float_cmpl_quat.xml modules/ahrs_int_cmpl_quat.xml modules/imu_common.xml" + settings="settings/fixedwing_basic.xml [settings/estimation/ac_char.xml] [settings/control/ctl_energy.xml] settings/rc_settings_ins.xml [settings/control/tune_agr_climb.xml] [settings/control/ctl_energyadaptive.xml] settings/OPENUAS/openuas_tuning_rc.xml" + settings_modules="modules/nav_smooth.xml modules/nav_survey_poly_osam.xml modules/geo_mag.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_basic_fw.xml modules/stabilization_attitude_fw.xml modules/ahrs_float_cmpl_quat.xml [modules/ahrs_int_cmpl_quat.xml] modules/imu_common.xml" gui_color="#ffffffffffff" /> Date: Wed, 5 Apr 2017 01:46:09 +0200 Subject: [PATCH 11/14] added auto1 commands --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 24 +- conf/control_panel.xml | 654 +----------------- .../subsystems/radio_control/spektrum_arch.h | 5 +- sw/airborne/boards/px4fmu_4.0.h | 4 +- .../modules/switching/auto1_commands.c | 66 +- 5 files changed, 76 insertions(+), 677 deletions(-) mode change 100644 => 120000 conf/control_panel.xml diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index 7cc9f6a77f..f09d55ff10 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -4,7 +4,7 @@ + Pixracer http://arsovtech.com/?page_id=1590 * in Fixedwing (http://www.openuas.org/) + Airframe to test the PX4 Pixracer v1 firmware while developing... - E-Flite T28 Trojan fully equiped with Retractable gear and Flaps + E-Flite T28 Trojan fully equiped with Retractable gear and flap + Autopilot: PX4FMU 4.0 aka Pixracer v1.0 + Actuators: Regular digital servos + GPS: Ublox M8N GNSS @@ -75,7 +75,7 @@ NOTES: - + @@ -162,8 +162,8 @@ NOTES: - - + + @@ -266,7 +266,7 @@ NOTES: - + @@ -352,9 +352,9 @@ NOTES: - - - + + + @@ -369,7 +369,7 @@ NOTES: - +
@@ -395,7 +395,7 @@ NOTES: + Note that in auto2 mode the Flap and Gear are after test then controlable by flightplan conditions e.g landng block extend gear and flap --> @@ -444,7 +444,7 @@ NOTES: - + @@ -656,7 +656,7 @@ NOTES: - + diff --git a/conf/control_panel.xml b/conf/control_panel.xml deleted file mode 100644 index 6a3b2b20c0..0000000000 --- a/conf/control_panel.xml +++ /dev/null @@ -1,653 +0,0 @@ - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/conf/control_panel.xml b/conf/control_panel.xml new file mode 120000 index 0000000000..99dae21217 --- /dev/null +++ b/conf/control_panel.xml @@ -0,0 +1 @@ +userconf/OPENUAS/openuas_control_panel.xml \ No newline at end of file diff --git a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h index 8aceed4d13..753deeaabe 100644 --- a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h +++ b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h @@ -52,9 +52,12 @@ #ifndef RADIO_YAW #define RADIO_YAW 3 #endif - +#ifndef RADIO_GEAR #define RADIO_GEAR 4 +#endif +#ifndef RADIO_FLAP #define RADIO_FLAP 5 +#endif #define RADIO_AUX1 5 #define RADIO_AUX2 6 #define RADIO_AUX3 7 diff --git a/sw/airborne/boards/px4fmu_4.0.h b/sw/airborne/boards/px4fmu_4.0.h index fe23b9a7ab..8b57acda17 100644 --- a/sw/airborne/boards/px4fmu_4.0.h +++ b/sw/airborne/boards/px4fmu_4.0.h @@ -177,8 +177,8 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi /* MDL */ // FIXME: Test n fix of not working -#define SPI_SELECT_SLAVE1_PORT GPIOE -#define SPI_SELECT_SLAVE1_PIN GPIO15 */ +//#define SPI_SELECT_SLAVE1_PORT GPIOE +//#define SPI_SELECT_SLAVE1_PIN GPIO15 */ /* MPU_9250_CS on SPI1 */ #define SPI_SELECT_SLAVE2_PORT GPIOC diff --git a/sw/airborne/modules/switching/auto1_commands.c b/sw/airborne/modules/switching/auto1_commands.c index e9623c1370..90ec0d3cf0 100644 --- a/sw/airborne/modules/switching/auto1_commands.c +++ b/sw/airborne/modules/switching/auto1_commands.c @@ -28,12 +28,60 @@ void periodic_auto1_commands(void) { // Copy Radio commands in AUTO1 - if (pprz_mode == PPRZ_MODE_AUTO1) { -#ifdef COMMAND_HATCH -#ifndef RADIO_HATCH -#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel + if (autopilot_get_mode() == PPRZ_MODE_AUTO1) { +#ifdef COMMAND_GEAR +#ifndef RADIO_GEAR +#error auto1_commands COMMAND_GEAR needs RADIO_GEAR channel #endif - imcu_set_command(COMMAND_HATCH, imcu_get_radio(RADIO_HATCH)); + imcu_set_command(COMMAND_GEAR, imcu_get_radio(RADIO_GEAR)); +#endif +#ifdef COMMAND_FLAP +#ifndef RADIO_FLAP +#error auto1_commands COMMAND_FLAP needs RADIO_FLAP channel +#endif + imcu_set_command(COMMAND_FLAP, imcu_get_radio(RADIO_FLAP)); +#endif +#ifdef COMMAND_AUX1 +#ifndef RADIO_AUX1 +#error auto1_commands COMMAND_AUX1 needs RADIO_AUX1 channel +#endif + imcu_set_command(COMMAND_AUX1, imcu_get_radio(RADIO_AUX1)); +#endif +#ifdef COMMAND_AUX2 +#ifndef RADIO_AUX2 +#error auto1_commands COMMAND_AUX2 needs RADIO_AUX2 channel +#endif + imcu_set_command(COMMAND_AUX2, imcu_get_radio(RADIO_AUX2)); +#endif +#ifdef COMMAND_AUX3 +#ifndef RADIO_AUX3 +#error auto1_commands COMMAND_AUX1 needs RADIO_AUX3 channel +#endif + imcu_set_command(COMMAND_AUX3, imcu_get_radio(RADIO_AUX3)); +#endif +#ifdef COMMAND_AUX4 +#ifndef RADIO_AUX4 +#error auto1_commands COMMAND_AUX4 needs RADIO_AUX4 channel +#endif + imcu_set_command(COMMAND_AUX4, imcu_get_radio(RADIO_AUX4)); +#endif +#ifdef COMMAND_AUX5 +#ifndef RADIO_AUX5 +#error auto1_commands COMMAND_AUX5 needs RADIO_AUX5 channel +#endif + imcu_set_command(COMMAND_AUX5, imcu_get_radio(RADIO_AUX5)); +#endif +#ifdef COMMAND_AUX6 +#ifndef RADIO_AUX6 +#error auto1_commands COMMAND_AUX6 needs RADIO_AUX6 channel +#endif + imcu_set_command(COMMAND_AUX6, imcu_get_radio(RADIO_AUX6)); +#endif +#ifdef COMMAND_AUX7 +#ifndef RADIO_AUX7 +#error auto1_commands COMMAND_AUX7 needs RADIO_AUX7 channel +#endif + imcu_set_command(COMMAND_AUX7, imcu_get_radio(RADIO_AUX7)); #endif #ifdef COMMAND_BRAKE #ifndef RADIO_BRAKE @@ -41,11 +89,11 @@ void periodic_auto1_commands(void) #endif imcu_set_command(COMMAND_BRAKE, imcu_get_radio(RADIO_BRAKE)); #endif -#ifdef COMMAND_FLAPS -#ifndef RADIO_FLAPS -#error auto1_commands COMMAND_FLAPS needs RADIO_FLAPS channel +#ifdef COMMAND_HATCH +#ifndef RADIO_HATCH +#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel #endif - imcu_set_command(COMMAND_FLAPS, imcu_get_radio(RADIO_FLAPS)); + imcu_set_command(COMMAND_HATCH, imcu_get_radio(RADIO_HATCH)); #endif } } From bece5e197fa904bf5af3cd22ad0efac1683fce27 Mon Sep 17 00:00:00 2001 From: Developer Date: Thu, 6 Apr 2017 15:38:48 +0200 Subject: [PATCH 12/14] ehhh --- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 27 ++++++++++++- .../OPENUAS/openuas_fixedwing_imu_rc.xml | 38 +++++++++---------- sw/airborne/boards/px4fmu_4.0.h | 12 ++++-- sw/ext/opencv_bebop | 2 +- 4 files changed, 54 insertions(+), 25 deletions(-) diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml index f09d55ff10..f66ba5e9d4 100644 --- a/conf/airframes/OPENUAS/openuas_eflite_t28.xml +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -289,7 +289,32 @@ NOTES: - + + + + diff --git a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml index 12ffdee871..ea2fd26463 100644 --- a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml +++ b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml @@ -2,7 +2,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -66,22 +66,22 @@ - - - - - - - + + + + + + + - - - - - - + + + + + + - + @@ -99,14 +99,14 @@ - + - + diff --git a/sw/airborne/boards/px4fmu_4.0.h b/sw/airborne/boards/px4fmu_4.0.h index 8b57acda17..6f12336450 100644 --- a/sw/airborne/boards/px4fmu_4.0.h +++ b/sw/airborne/boards/px4fmu_4.0.h @@ -176,9 +176,9 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define SPI_SELECT_SLAVE1_PIN GPIO15 /* MDL */ -// FIXME: Test n fix of not working +// FIXME: Test n fix or emoveal //#define SPI_SELECT_SLAVE1_PORT GPIOE -//#define SPI_SELECT_SLAVE1_PIN GPIO15 */ +//#define SPI_SELECT_SLAVE1_PIN GPIO15 /* MPU_9250_CS on SPI1 */ #define SPI_SELECT_SLAVE2_PORT GPIOC @@ -194,8 +194,8 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi /* SPI3 NSS on microSD connector */ //FIXME: not tested -//#define SPI_SELECT_SLAVE4_PORT GPIOA -//#define SPI_SELECT_SLAVE4_PIN GPIO4 +//#define SPI_SELECT_SLAVE5_PORT GPIOA +//#define SPI_SELECT_SLAVE5_PIN GPIO4 /* SDIO to microSD card connector */ @@ -301,6 +301,10 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_USE_TIM1 1 #define PWM_USE_TIM4 1 + +//TODO: ifdef USE_SERVO6 for PPM out to e.g. servo extender board ... +// Basically a inter mcu Extra device;) + #define USE_PWM1 1 #define USE_PWM2 1 #define USE_PWM3 1 diff --git a/sw/ext/opencv_bebop b/sw/ext/opencv_bebop index 365cf9fe2c..4e8ced8085 160000 --- a/sw/ext/opencv_bebop +++ b/sw/ext/opencv_bebop @@ -1 +1 @@ -Subproject commit 365cf9fe2cf4abc04c5b982feb54d04caa19fefd +Subproject commit 4e8ced80856b60d887b16c8211e34aebae581808 From 2a1eea87aca85644a443dbc1b938152bcd90f229 Mon Sep 17 00:00:00 2001 From: Open UAS <> Date: Wed, 29 Mar 2017 23:22:55 +0200 Subject: [PATCH 13/14] Fixedwing for Pixracer --- .gitignore | 4 +- conf/airframes/OPENUAS/openuas_eflite_t28.xml | 751 ++++++++++++++++ conf/boards/px4fmu_4.0.makefile | 6 + conf/conf.xml | 1 + conf/control_panel.xml | 653 ++++++++++++++ conf/settings/OPENUAS/openuas_tuning_rc.xml | 4 +- .../OPENUAS/openuas_fixedwing_imu_rc.xml | 124 +++ conf/userconf/OPENUAS/openuas_conf.xml | 11 + .../OPENUAS/openuas_control_panel.xml | 828 +++++++++--------- .../subsystems/radio_control/spektrum_arch.h | 4 + sw/airborne/boards/px4fmu_4.0.h | 95 +- .../modules/switching/auto1_commands.c | 64 +- sw/ext/opencv_bebop | 2 +- sw/ground_segment/tmtc/Makefile | 2 +- 14 files changed, 2078 insertions(+), 471 deletions(-) create mode 100644 conf/airframes/OPENUAS/openuas_eflite_t28.xml create mode 120000 conf/conf.xml create mode 100644 conf/control_panel.xml create mode 100644 conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml diff --git a/.gitignore b/.gitignore index fd228d9706..715fe23c42 100644 --- a/.gitignore +++ b/.gitignore @@ -56,10 +56,10 @@ paparazzi.sublime-workspace /paparazzi # /conf/ -/conf/conf.xml +/conf/conf.xml~ /conf/conf.xml.20* /conf/conf_personal.xml.20* -/conf/control_panel.xml +/conf/control_panel.xml~ /conf/control_panel.xml.20* /conf/%gconf.xml /conf/maps_data/* diff --git a/conf/airframes/OPENUAS/openuas_eflite_t28.xml b/conf/airframes/OPENUAS/openuas_eflite_t28.xml new file mode 100644 index 0000000000..19ecdb6042 --- /dev/null +++ b/conf/airframes/OPENUAS/openuas_eflite_t28.xml @@ -0,0 +1,751 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + +
+ + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ +
+ + + +
+ + +
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ + +
+ + + +
+ + +
+ + + + + +
+ + +
+ + + + +
+ +
\ No newline at end of file diff --git a/conf/boards/px4fmu_4.0.makefile b/conf/boards/px4fmu_4.0.makefile index 6cd756c5da..a9f32fc093 100644 --- a/conf/boards/px4fmu_4.0.makefile +++ b/conf/boards/px4fmu_4.0.makefile @@ -57,3 +57,9 @@ GPS_BAUD ?= B38400 # e.g. # ACTUATORS ?= actuators_pwm + +# +# default External Current and Volt Sensor configuration +# +# ADC_CURRENT_SENSOR ?= ADC_3 +# ADC_VOLTAGE_SENSOR ?= ADC_2 diff --git a/conf/conf.xml b/conf/conf.xml new file mode 120000 index 0000000000..8b45de80fa --- /dev/null +++ b/conf/conf.xml @@ -0,0 +1 @@ +userconf/OPENUAS/openuas_conf.xml \ No newline at end of file diff --git a/conf/control_panel.xml b/conf/control_panel.xml new file mode 100644 index 0000000000..6a3b2b20c0 --- /dev/null +++ b/conf/control_panel.xml @@ -0,0 +1,653 @@ + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/conf/settings/OPENUAS/openuas_tuning_rc.xml b/conf/settings/OPENUAS/openuas_tuning_rc.xml index ae3a8efcf5..f49b059e0f 100644 --- a/conf/settings/OPENUAS/openuas_tuning_rc.xml +++ b/conf/settings/OPENUAS/openuas_tuning_rc.xml @@ -23,8 +23,8 @@ - - + + diff --git a/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml new file mode 100644 index 0000000000..ea2fd26463 --- /dev/null +++ b/conf/telemetry/OPENUAS/openuas_fixedwing_imu_rc.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/userconf/OPENUAS/openuas_conf.xml b/conf/userconf/OPENUAS/openuas_conf.xml index 2329cebe00..ae4488e193 100644 --- a/conf/userconf/OPENUAS/openuas_conf.xml +++ b/conf/userconf/OPENUAS/openuas_conf.xml @@ -1,4 +1,15 @@ +
@@ -8,7 +7,6 @@
-
@@ -55,8 +53,6 @@ - - @@ -69,60 +65,140 @@ - - -
- +
- - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -138,16 +214,112 @@ - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -158,7 +330,134 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -172,7 +471,55 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -220,67 +567,14 @@ - - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - @@ -291,262 +585,28 @@ - - - - - - - - - - - - - - - + + - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -565,11 +625,6 @@ - - - - - @@ -584,64 +639,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- + \ No newline at end of file diff --git a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h index 99971b0bda..753deeaabe 100644 --- a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h +++ b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h @@ -52,8 +52,12 @@ #ifndef RADIO_YAW #define RADIO_YAW 3 #endif +#ifndef RADIO_GEAR #define RADIO_GEAR 4 +#endif +#ifndef RADIO_FLAP #define RADIO_FLAP 5 +#endif #define RADIO_AUX1 5 #define RADIO_AUX2 6 #define RADIO_AUX3 7 diff --git a/sw/airborne/boards/px4fmu_4.0.h b/sw/airborne/boards/px4fmu_4.0.h index c2b29ac07a..6f12336450 100644 --- a/sw/airborne/boards/px4fmu_4.0.h +++ b/sw/airborne/boards/px4fmu_4.0.h @@ -6,12 +6,15 @@ /* PX4FMU_V4 a.k.a. Pixracer board has a 24MHz external clock and 168MHz internal. */ /* STM32F4 STM32F427VIT6 */ -#define EXT_CLK 24000000 //OK -#define AHB_CLK 168000000 //OK +#define EXT_CLK 24000000 +#define AHB_CLK 168000000 + +//#define STM32F4 //to debug ADC on F4 does no work +//#define ADC_SAMPLE_TIME ADC_SMPR_SMP_56CYC //to debug ADC on F4 does no work + +/* On PCB there is a Multicolor LED */ -/* On PCB Multicolor LED */ /* Red */ -//OK #ifndef USE_LED_1 #define USE_LED_1 1 #endif @@ -22,7 +25,6 @@ #define LED_1_AFIO_REMAP ((void)0) /* Green */ -//OK #ifndef USE_LED_2 #define USE_LED_2 1 #endif @@ -33,7 +35,6 @@ #define LED_2_AFIO_REMAP ((void)0) /* Blue */ -//OK #ifndef USE_LED_3 #define USE_LED_3 1 #endif @@ -49,6 +50,7 @@ /* UART SCHTUFFFF*/ /* -WiFi ESP Connector, it is just a serial port*/ +//TODO: Test #define UART1_GPIO_AF GPIO_AF7 #define UART1_GPIO_PORT_RX GPIOB #define UART1_GPIO_RX GPIO7 @@ -84,12 +86,12 @@ #define UART4_GPIO_PORT_TX GPIOA #define UART4_GPIO_TX GPIO0 -/* Spektrum (only rx)*/ +/* e.g. for a Spektrum satellite receiver rx only)*/ #define UART6_GPIO_AF GPIO_AF8 #define UART6_GPIO_PORT_RX GPIOC #define UART6_GPIO_RX GPIO7 -/* Serial Debugging Connector, not used with PPRZ, use JTAG, can be put to other good use */ +/* Serial Debugging Connector, not used with PPRZ as of now, use JTAG, can be put to other good use */ #define UART7_GPIO_AF GPIO_AF8 #define UART7_GPIO_PORT_RX GPIOE #define UART7_GPIO_RX GPIO7 @@ -97,6 +99,7 @@ #define UART7_GPIO_TX GPIO8 /* Connector -FRS FrSky */ +//TODO: Test #define UART8_GPIO_AF GPIO_AF8 #define UART8_GPIO_PORT_RX GPIOE #define UART8_GPIO_RX GPIO0 @@ -104,24 +107,23 @@ #define UART8_GPIO_TX GPIO1 /* Soft binding Spektrum */ -//ok +//TODO: Test and or FIXME: #define RADIO_CONTROL_POWER_PORT GPIOE #define RADIO_CONTROL_POWER_PIN GPIO4 //SPEKTRUM POWER #define RADIO_CONTROL_POWER_ON gpio_clear // yes, inverted #define RADIO_CONTROL_POWER_OFF gpio_set - +//A receiver on powered on 3.3v #define PERIPHERAL3V3_ENABLE_PORT GPIOC //VDD_3V3_PERIPHERAL_EN #define PERIPHERAL3V3_ENABLE_PIN GPIO5 #define PERIPHERAL3V3_ENABLE_ON gpio_set #define PERIPHERAL3V3_ENABLE_OFF gpio_clear /* Turn SBUS invert */ -//ok +//TODO: Test #define RC_POLARITY_GPIO_PORT GPIOC #define RC_POLARITY_GPIO_PIN GPIO13 -//ok #define SPEKTRUM_UART6_RCC RCC_USART6 #define SPEKTRUM_UART6_BANK GPIOC #define SPEKTRUM_UART6_PIN GPIO7 @@ -133,7 +135,6 @@ /* SPI */ /* SPI1 for MPU and extra accel/gyro/mag */ -// OK #define SPI1_GPIO_AF GPIO_AF5 #define SPI1_GPIO_PORT_MISO GPIOA #define SPI1_GPIO_MISO GPIO6 @@ -143,7 +144,6 @@ #define SPI1_GPIO_SCK GPIO5 /* SPI2 for FRAM, connects to BARO */ -// OK #define SPI2_GPIO_AF GPIO_AF5 #define SPI2_GPIO_PORT_MISO GPIOB #define SPI2_GPIO_MISO GPIO14 @@ -164,8 +164,9 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi * SPI slave pin declaration */ -//So use best speced sensors as second or ref the other or determine it on task type? +//So use best spec'd sensors as second or ref the other or determine it on task type? /* EXTRA ACC_GYRO_CS on SPI1 ICM 20609-G*/ +// TODO: Make it useful #define SPI_SELECT_SLAVE0_PORT GPIOC #define SPI_SELECT_SLAVE0_PIN GPIO15 @@ -174,17 +175,16 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define SPI_SELECT_SLAVE1_PORT GPIOE #define SPI_SELECT_SLAVE1_PIN GPIO15 -/* MDL -#define SPI_SELECT_SLAVE1_PORT GPIOE -#define SPI_SELECT_SLAVE1_PIN GPIO15 */ +/* MDL */ +// FIXME: Test n fix or emoveal +//#define SPI_SELECT_SLAVE1_PORT GPIOE +//#define SPI_SELECT_SLAVE1_PIN GPIO15 /* MPU_9250_CS on SPI1 */ -//OK #define SPI_SELECT_SLAVE2_PORT GPIOC #define SPI_SELECT_SLAVE2_PIN GPIO2 /* MS5611 BARO_CS on SPI2 - FRAM*/ -//OK #define SPI_SELECT_SLAVE3_PORT GPIOD #define SPI_SELECT_SLAVE3_PIN GPIO7 @@ -193,11 +193,13 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define SPI_SELECT_SLAVE4_PIN GPIO10 /* SPI3 NSS on microSD connector */ -//#define SPI_SELECT_SLAVE4_PORT GPIOA -//#define SPI_SELECT_SLAVE4_PIN GPIO4 +//FIXME: not tested +//#define SPI_SELECT_SLAVE5_PORT GPIOA +//#define SPI_SELECT_SLAVE5_PIN GPIO4 /* SDIO to microSD card connector */ +//FIXME: Fix and test #define SDIO_AF GPIO_AF12 #define SDIO_D0_PORT GPIOC #define SDIO_D0_PIN GPIO8 @@ -218,11 +220,12 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #endif #define USE_AD_TIM3 1 - -// Internal ADC for battery +// Internal ADC for voltage level measurement +////FIXME: test and fix if still not working #ifndef USE_ADC_1 #define USE_ADC_1 1 #endif + #if USE_ADC_1 #define AD1_1_CHANNEL 4 //ADC12_IN4 #define ADC_1 AD1_1 @@ -230,7 +233,8 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_1_GPIO_PIN GPIO4 #endif -// External ADC for battery +// Per default for the board to sense voltage level via external sensor on ADC +//FIXME: test and fix if still not working #ifndef USE_ADC_2 #define USE_ADC_2 1 #endif @@ -241,8 +245,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_2_GPIO_PIN GPIO2 #endif - -// external current sens +// Per default for the board to sense current via external sensor on ADC #ifndef USE_ADC_3 #define USE_ADC_3 1 #endif @@ -252,17 +255,24 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define ADC_3_GPIO_PORT GPIOA #define ADC_3_GPIO_PIN GPIO3 #endif -#define MilliAmpereOfAdc(adc)((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f) +#define MilliAmpereOfAdc(adc)((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f) //TODO: test if valid -/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +/* Allow to define ADC_CHANNEL_VSUPPLY in the airframe file */ #ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY ADC_2 #endif +/* Allow to define another ADC for Current measurement in the airframe file */ +#ifndef ADC_CHANNEL_CURRENT +#define ADC_CHANNEL_CURRENT ADC_3 +#endif + +//??FT = Five-volt tolerant. In order to sustain a voltage higher than VDD+0.3 the internal pull-up/pull-down resistors must be disabled. +//FIXME: Determine best stock values #if USE_ADC_2 -#define DefaultVoltageOfAdc(adc) (0.00827*adc) +#define DefaultVoltageOfAdc(adc) (0.004f * (float)adc) // FIXME: Value scale for a common PowerBrick #else -#define DefaultVoltageOfAdc(adc) (0.0021*adc) // scale internal vdd to 5V +#define DefaultVoltageOfAdc(adc) (0.004f * (float)adc) // FIXME: Value scale internal vdd to 5V #endif /* I2C mapping */ @@ -270,12 +280,13 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define I2C1_GPIO_SCL GPIO8 #define I2C1_GPIO_SDA GPIO9 +//Onboard Barometer #ifndef USE_BARO_BOARD #define USE_BARO_BOARD 1 #endif /* Another Magnetometer on board a HMC5983 not the one in the IMU 9250*/ -//TODO +//FIXME: better default option for use of maybe fuse data #ifndef USE_MAGNETOMETER_B #define USE_MAGNETOMETER_B 0 #endif @@ -290,6 +301,10 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_USE_TIM1 1 #define PWM_USE_TIM4 1 + +//TODO: ifdef USE_SERVO6 for PPM out to e.g. servo extender board ... +// Basically a inter mcu Extra device;) + #define USE_PWM1 1 #define USE_PWM2 1 #define USE_PWM3 1 @@ -297,7 +312,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define USE_PWM5 1 #define USE_PWM6 1 -/* -ESC Servo 1 */ +/* Servo 1 */ #if USE_PWM1 #define PWM_SERVO_1 0 #define PWM_SERVO_1_TIMER TIM1 @@ -310,7 +325,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_1_OC_BIT 0 #endif -/* -ESC Servo 2 */ +/* Servo 2 */ #if USE_PWM2 #define PWM_SERVO_2 1 #define PWM_SERVO_2_TIMER TIM1 @@ -323,7 +338,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_2_OC_BIT 0 #endif -/* -ESC Servo 3 */ +/* Servo 3 */ #if USE_PWM3 #define PWM_SERVO_3 2 //#define PWM_SERVO_3_IDX 2 #define PWM_SERVO_3_TIMER TIM1 @@ -336,7 +351,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_3_OC_BIT 0 #endif -/* -ESC Servo 4 */ +/* Servo 4 */ #if USE_PWM4 #define PWM_SERVO_4 3 #define PWM_SERVO_4_TIMER TIM1 @@ -349,7 +364,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_4_OC_BIT 0 #endif -/* -ESC Servo 5 */ +/* Servo 5 */ #if USE_PWM5 #define PWM_SERVO_5 4 #define PWM_SERVO_5_TIMER TIM4 @@ -362,7 +377,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_SERVO_5_OC_BIT 0 #endif -/* -ESC Servo 6 */ +/* Servo 6 */ #if USE_PWM6 #define PWM_SERVO_6 5 #define PWM_SERVO_6_TIMER TIM4 @@ -379,7 +394,7 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_TIM4_CHAN_MASK (PWM_SERVO_5_OC_BIT|PWM_SERVO_6_OC_BIT) /* Buzzer (A.k.a. Alarm) */ - +//TODO: Test #if USE_BUZZER #define PWM_BUZZER #define PWM_BUZZER_TIMER TIM2 @@ -393,6 +408,4 @@ When a read-operation of an RTD resistance data register occurs, DRDY returns hi #define PWM_BUZZER_OC_BIT 0 #endif - - #endif /* CONFIG_PX4FMU_4_0_H */ diff --git a/sw/airborne/modules/switching/auto1_commands.c b/sw/airborne/modules/switching/auto1_commands.c index 80a95ce7b1..91899fba8b 100644 --- a/sw/airborne/modules/switching/auto1_commands.c +++ b/sw/airborne/modules/switching/auto1_commands.c @@ -29,11 +29,59 @@ void periodic_auto1_commands(void) { // Copy Radio commands in AUTO1 if (autopilot_get_mode() == AP_MODE_AUTO1) { -#ifdef COMMAND_HATCH -#ifndef RADIO_HATCH -#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel +#ifdef COMMAND_GEAR +#ifndef RADIO_GEAR +#error auto1_commands COMMAND_GEAR needs RADIO_GEAR channel #endif - imcu_set_command(COMMAND_HATCH, imcu_get_radio(RADIO_HATCH)); + imcu_set_command(COMMAND_GEAR, imcu_get_radio(RADIO_GEAR)); +#endif +#ifdef COMMAND_FLAP +#ifndef RADIO_FLAP +#error auto1_commands COMMAND_FLAP needs RADIO_FLAP channel +#endif + imcu_set_command(COMMAND_FLAP, imcu_get_radio(RADIO_FLAP)); +#endif +#ifdef COMMAND_AUX1 +#ifndef RADIO_AUX1 +#error auto1_commands COMMAND_AUX1 needs RADIO_AUX1 channel +#endif + imcu_set_command(COMMAND_AUX1, imcu_get_radio(RADIO_AUX1)); +#endif +#ifdef COMMAND_AUX2 +#ifndef RADIO_AUX2 +#error auto1_commands COMMAND_AUX2 needs RADIO_AUX2 channel +#endif + imcu_set_command(COMMAND_AUX2, imcu_get_radio(RADIO_AUX2)); +#endif +#ifdef COMMAND_AUX3 +#ifndef RADIO_AUX3 +#error auto1_commands COMMAND_AUX1 needs RADIO_AUX3 channel +#endif + imcu_set_command(COMMAND_AUX3, imcu_get_radio(RADIO_AUX3)); +#endif +#ifdef COMMAND_AUX4 +#ifndef RADIO_AUX4 +#error auto1_commands COMMAND_AUX4 needs RADIO_AUX4 channel +#endif + imcu_set_command(COMMAND_AUX4, imcu_get_radio(RADIO_AUX4)); +#endif +#ifdef COMMAND_AUX5 +#ifndef RADIO_AUX5 +#error auto1_commands COMMAND_AUX5 needs RADIO_AUX5 channel +#endif + imcu_set_command(COMMAND_AUX5, imcu_get_radio(RADIO_AUX5)); +#endif +#ifdef COMMAND_AUX6 +#ifndef RADIO_AUX6 +#error auto1_commands COMMAND_AUX6 needs RADIO_AUX6 channel +#endif + imcu_set_command(COMMAND_AUX6, imcu_get_radio(RADIO_AUX6)); +#endif +#ifdef COMMAND_AUX7 +#ifndef RADIO_AUX7 +#error auto1_commands COMMAND_AUX7 needs RADIO_AUX7 channel +#endif + imcu_set_command(COMMAND_AUX7, imcu_get_radio(RADIO_AUX7)); #endif #ifdef COMMAND_BRAKE #ifndef RADIO_BRAKE @@ -41,11 +89,11 @@ void periodic_auto1_commands(void) #endif imcu_set_command(COMMAND_BRAKE, imcu_get_radio(RADIO_BRAKE)); #endif -#ifdef COMMAND_FLAPS -#ifndef RADIO_FLAPS -#error auto1_commands COMMAND_FLAPS needs RADIO_FLAPS channel +#ifdef COMMAND_HATCH +#ifndef RADIO_HATCH +#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel #endif - imcu_set_command(COMMAND_FLAPS, imcu_get_radio(RADIO_FLAPS)); + imcu_set_command(COMMAND_HATCH, imcu_get_radio(RADIO_HATCH)); #endif } } diff --git a/sw/ext/opencv_bebop b/sw/ext/opencv_bebop index 365cf9fe2c..4e8ced8085 160000 --- a/sw/ext/opencv_bebop +++ b/sw/ext/opencv_bebop @@ -1 +1 @@ -Subproject commit 365cf9fe2cf4abc04c5b982feb54d04caa19fefd +Subproject commit 4e8ced80856b60d887b16c8211e34aebae581808 diff --git a/sw/ground_segment/tmtc/Makefile b/sw/ground_segment/tmtc/Makefile index 777114e62b..8770869cd7 100644 --- a/sw/ground_segment/tmtc/Makefile +++ b/sw/ground_segment/tmtc/Makefile @@ -38,7 +38,7 @@ SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_serv SERVERCMX = $(SERVERCMO:.cmo=.cmx) -all: link server messages settings ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea +all: link server messages settings ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea gpsd2ivy opt: server.opt From d5cfaa5c31dd09b51b061fce91d41be953587a05 Mon Sep 17 00:00:00 2001 From: Open UAS <> Date: Tue, 30 May 2017 08:22:03 +0200 Subject: [PATCH 14/14] Refreshed from master --- conf/conf.xml | 311 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 310 insertions(+), 1 deletion(-) mode change 120000 => 100644 conf/conf.xml diff --git a/conf/conf.xml b/conf/conf.xml deleted file mode 120000 index 8b45de80fa..0000000000 --- a/conf/conf.xml +++ /dev/null @@ -1 +0,0 @@ -userconf/OPENUAS/openuas_conf.xml \ No newline at end of file diff --git a/conf/conf.xml b/conf/conf.xml new file mode 100644 index 0000000000..457bb9a3cc --- /dev/null +++ b/conf/conf.xml @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +