diff --git a/conf/airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml b/conf/airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml index feb16fc837..9ec48fc15f 100644 --- a/conf/airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml +++ b/conf/airframes/AGGIEAIR/aggieair_ark_quad_lisa_mx.xml @@ -16,7 +16,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -229,7 +229,7 @@ --> - + diff --git a/conf/airframes/AGGIEAIR/aggieair_iris_indi.xml b/conf/airframes/AGGIEAIR/aggieair_iris_indi.xml index 33f2cb52ca..f896d1876c 100644 --- a/conf/airframes/AGGIEAIR/aggieair_iris_indi.xml +++ b/conf/airframes/AGGIEAIR/aggieair_iris_indi.xml @@ -129,7 +129,7 @@ - + diff --git a/conf/airframes/AGGIEAIR/aggieair_rp3_lia.xml b/conf/airframes/AGGIEAIR/aggieair_rp3_lia.xml index a934a51135..6966596c44 100644 --- a/conf/airframes/AGGIEAIR/aggieair_rp3_lia.xml +++ b/conf/airframes/AGGIEAIR/aggieair_rp3_lia.xml @@ -46,7 +46,7 @@ RP3 Lisa MX - + @@ -144,7 +144,7 @@ RP3 Lisa MX
- + - + diff --git a/conf/airframes/AGGIEAIR/ark_hexa_1-8.xml b/conf/airframes/AGGIEAIR/ark_hexa_1-8.xml index 33cdeca6f4..43e86f7b9d 100644 --- a/conf/airframes/AGGIEAIR/ark_hexa_1-8.xml +++ b/conf/airframes/AGGIEAIR/ark_hexa_1-8.xml @@ -235,7 +235,7 @@ ARK RT - + diff --git a/conf/airframes/BR/ladybird_kit_bart_bluegiga_optitrack.xml b/conf/airframes/BR/ladybird_kit_bart_bluegiga_optitrack.xml index 587f425f82..81c6a5c3d4 100644 --- a/conf/airframes/BR/ladybird_kit_bart_bluegiga_optitrack.xml +++ b/conf/airframes/BR/ladybird_kit_bart_bluegiga_optitrack.xml @@ -224,7 +224,7 @@ - + diff --git a/conf/airframes/BR/ladybird_kit_indi_bart.xml b/conf/airframes/BR/ladybird_kit_indi_bart.xml index f69bd99837..9a6eac0292 100644 --- a/conf/airframes/BR/ladybird_kit_indi_bart.xml +++ b/conf/airframes/BR/ladybird_kit_indi_bart.xml @@ -125,7 +125,7 @@
- + diff --git a/conf/airframes/CDW/cdw_mavtec.xml b/conf/airframes/CDW/cdw_mavtec.xml index 33ac851dfe..54c15bc245 100644 --- a/conf/airframes/CDW/cdw_mavtec.xml +++ b/conf/airframes/CDW/cdw_mavtec.xml @@ -52,8 +52,8 @@ - - diff --git a/conf/airframes/ENAC/quadrotor/ard2_102.xml b/conf/airframes/ENAC/quadrotor/ard2_102.xml index 047c3c364f..74111fa3c4 100644 --- a/conf/airframes/ENAC/quadrotor/ard2_102.xml +++ b/conf/airframes/ENAC/quadrotor/ard2_102.xml @@ -17,7 +17,7 @@ - + diff --git a/conf/airframes/HOOPERFLY/hooperfly_racerpex_hexa_lisa_mx_20.xml b/conf/airframes/HOOPERFLY/hooperfly_racerpex_hexa_lisa_mx_20.xml index 5bf060fc32..761ff446ef 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_racerpex_hexa_lisa_mx_20.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_racerpex_hexa_lisa_mx_20.xml @@ -80,7 +80,7 @@ - +
@@ -193,7 +193,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_racerpex_octo_lisa_mx_20.xml b/conf/airframes/HOOPERFLY/hooperfly_racerpex_octo_lisa_mx_20.xml index 79ba880968..4b7ae11c0d 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_racerpex_octo_lisa_mx_20.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_racerpex_octo_lisa_mx_20.xml @@ -187,7 +187,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_racerpex_quad_lisa_mx_20.xml b/conf/airframes/HOOPERFLY/hooperfly_racerpex_quad_lisa_mx_20.xml index 418051365c..60f6501df2 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_racerpex_quad_lisa_mx_20.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_racerpex_quad_lisa_mx_20.xml @@ -189,7 +189,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_hexa_lisa_mx_20.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_hexa_lisa_mx_20.xml index 024e41bd0f..bf803864dd 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_hexa_lisa_mx_20.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_hexa_lisa_mx_20.xml @@ -193,7 +193,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0.xml index 0192440837..0666b59325 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0.xml @@ -42,7 +42,7 @@ - + @@ -184,7 +184,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2.xml index 665fb2dfaa..b85e0cd289 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2.xml @@ -158,7 +158,7 @@
-
+
diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_215.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_215.xml index fa57a44916..df5c1277c0 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_215.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_215.xml @@ -26,7 +26,7 @@ - +
diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_216.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_216.xml index d47ad35dec..9dac998c04 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_216.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_elle0_v1_2_216.xml @@ -26,7 +26,7 @@ - + diff --git a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_lisa_mx_20.xml b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_lisa_mx_20.xml index 04339d51ab..80590235fe 100644 --- a/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_lisa_mx_20.xml +++ b/conf/airframes/HOOPERFLY/hooperfly_teensyfly_quad_lisa_mx_20.xml @@ -37,7 +37,7 @@ - + @@ -189,7 +189,7 @@
-
+
diff --git a/conf/airframes/OPENUAS/openuas_ardrone2.xml b/conf/airframes/OPENUAS/openuas_ardrone2.xml index b8f1854f7a..d390a218ea 100644 --- a/conf/airframes/OPENUAS/openuas_ardrone2.xml +++ b/conf/airframes/OPENUAS/openuas_ardrone2.xml @@ -2,7 +2,7 @@ + --> @@ -69,7 +69,7 @@ - + @@ -241,11 +241,11 @@
- +
- - + + diff --git a/conf/airframes/OPENUAS/openuas_control_panel.xml b/conf/airframes/OPENUAS/openuas_control_panel.xml index 28ad12ef04..1bac15f671 100644 --- a/conf/airframes/OPENUAS/openuas_control_panel.xml +++ b/conf/airframes/OPENUAS/openuas_control_panel.xml @@ -8,7 +8,7 @@ - +
diff --git a/conf/airframes/OPENUAS/openuas_itsybitsy.xml b/conf/airframes/OPENUAS/openuas_itsybitsy.xml index 07099fe519..b1c2fa584e 100644 --- a/conf/airframes/OPENUAS/openuas_itsybitsy.xml +++ b/conf/airframes/OPENUAS/openuas_itsybitsy.xml @@ -34,7 +34,7 @@ - + diff --git a/conf/airframes/OPENUAS/openuas_psi.xml b/conf/airframes/OPENUAS/openuas_psi.xml index e4ee5df2e2..62824d9414 100644 --- a/conf/airframes/OPENUAS/openuas_psi.xml +++ b/conf/airframes/OPENUAS/openuas_psi.xml @@ -2,7 +2,7 @@ @@ -29,7 +29,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -49,8 +49,8 @@ - - + + diff --git a/conf/airframes/OPENUAS/openuas_taxiiii.xml b/conf/airframes/OPENUAS/openuas_taxiiii.xml index 904d04fed1..c24a06fb38 100644 --- a/conf/airframes/OPENUAS/openuas_taxiiii.xml +++ b/conf/airframes/OPENUAS/openuas_taxiiii.xml @@ -15,7 +15,7 @@ - + diff --git a/conf/airframes/TUDELFT/Bart_heliDD_INDI.xml b/conf/airframes/TUDELFT/Bart_heliDD_INDI.xml index 0398be636b..f33b5e9698 100644 --- a/conf/airframes/TUDELFT/Bart_heliDD_INDI.xml +++ b/conf/airframes/TUDELFT/Bart_heliDD_INDI.xml @@ -1,7 +1,7 @@ - diff --git a/conf/airframes/TUDELFT/Bart_heliDD_pid.xml b/conf/airframes/TUDELFT/Bart_heliDD_pid.xml index 609e831204..81804365e2 100644 --- a/conf/airframes/TUDELFT/Bart_heliDD_pid.xml +++ b/conf/airframes/TUDELFT/Bart_heliDD_pid.xml @@ -1,7 +1,7 @@ - diff --git a/conf/airframes/TUDELFT/calibrations/ladybird18.xml b/conf/airframes/TUDELFT/calibrations/ladybird18.xml index 4579c20e4e..3678e06ba0 100644 --- a/conf/airframes/TUDELFT/calibrations/ladybird18.xml +++ b/conf/airframes/TUDELFT/calibrations/ladybird18.xml @@ -3,7 +3,7 @@
- - - + + diff --git a/conf/airframes/TUDELFT/tudelft_course2016_bebop_avoider.xml b/conf/airframes/TUDELFT/tudelft_course2016_bebop_avoider.xml index 34ac7718a9..4b767aa8d8 100644 --- a/conf/airframes/TUDELFT/tudelft_course2016_bebop_avoider.xml +++ b/conf/airframes/TUDELFT/tudelft_course2016_bebop_avoider.xml @@ -62,7 +62,7 @@ - +
diff --git a/conf/airframes/TUDELFT/tudelft_course2016_control_panel.xml b/conf/airframes/TUDELFT/tudelft_course2016_control_panel.xml index bab145702f..3d8cef6bbf 100644 --- a/conf/airframes/TUDELFT/tudelft_course2016_control_panel.xml +++ b/conf/airframes/TUDELFT/tudelft_course2016_control_panel.xml @@ -87,6 +87,6 @@ - +
diff --git a/conf/airframes/TUDELFT/tudelft_ladylisa_bluegiga_stereoboard.xml b/conf/airframes/TUDELFT/tudelft_ladylisa_bluegiga_stereoboard.xml index 401741aefe..a980a4f501 100644 --- a/conf/airframes/TUDELFT/tudelft_ladylisa_bluegiga_stereoboard.xml +++ b/conf/airframes/TUDELFT/tudelft_ladylisa_bluegiga_stereoboard.xml @@ -240,7 +240,7 @@ - + diff --git a/conf/airframes/TUDELFT/tudelft_logo600.xml b/conf/airframes/TUDELFT/tudelft_logo600.xml index 82f8486825..08b630b338 100644 --- a/conf/airframes/TUDELFT/tudelft_logo600.xml +++ b/conf/airframes/TUDELFT/tudelft_logo600.xml @@ -8,7 +8,7 @@ 3) FBW saves time and adds safety not having to check every safety critical aspect after every AP update (safety critical code is in FBW). 4) VBAR (gyro's) can be mounted on the frame (=fast response) while the attitude filter (AP) can be on very soft dampers. -This logo600 basically flies with a VBAR. All rotor head parameters and tuning (except throttle curves) are in the VBAR using the VBAR setup program. Then, instead of connecting 2 satellite receivers, 2 uarts from a lisa-mx are connected to the VBAR instead. The lisa-mx then has both satellite receivers. This lisa-mx runs rotorcraft FBW code with spektrum as "actuator" which is actually sent to the VBAR RC inputs over uart. +This logo600 basically flies with a VBAR. All rotor head parameters and tuning (except throttle curves) are in the VBAR using the VBAR setup program. Then, instead of connecting 2 satellite receivers, 2 uarts from a lisa-mx are connected to the VBAR instead. The lisa-mx then has both satellite receivers. This lisa-mx runs rotorcraft FBW code with spektrum as "actuator" which is actually sent to the VBAR RC inputs over uart. - Note about FBW code: you must choose if you want the UAV to behave as a model aircraft which goes to failsafe on RC loss or make it a UAV with AUTO2 flight on RC-loss. The latter has the risk of fly-away, and adds safety critical aspects to the AP as well: so make sure your geofence and geofence rules are well tested. diff --git a/conf/airframes/TUDELFT/tudelft_rm_control_panel.xml b/conf/airframes/TUDELFT/tudelft_rm_control_panel.xml index 5394f6dc1f..e03999edb1 100644 --- a/conf/airframes/TUDELFT/tudelft_rm_control_panel.xml +++ b/conf/airframes/TUDELFT/tudelft_rm_control_panel.xml @@ -165,9 +165,9 @@ - + - + diff --git a/conf/airframes/TUDELFT/tudelft_walkera_genius_v2.xml b/conf/airframes/TUDELFT/tudelft_walkera_genius_v2.xml index 54f264c4d6..4094f533e0 100644 --- a/conf/airframes/TUDELFT/tudelft_walkera_genius_v2.xml +++ b/conf/airframes/TUDELFT/tudelft_walkera_genius_v2.xml @@ -51,7 +51,7 @@
- +
@@ -168,7 +168,7 @@ - + @@ -177,7 +177,7 @@ - +
diff --git a/conf/firmwares/subsystems/shared/nps_hitl.makefile b/conf/firmwares/subsystems/shared/nps_hitl.makefile index 4f8166186e..3000663340 100644 --- a/conf/firmwares/subsystems/shared/nps_hitl.makefile +++ b/conf/firmwares/subsystems/shared/nps_hitl.makefile @@ -8,7 +8,7 @@ nps.srcs += $(NPSDIR)/nps_main_hitl.c -# TODO: have this in ins_vectornav.xml +# TODO: have this in ins_vectornav.xml # will hopefully work better once nps and HITL are separate targets nps.srcs += $(NPSDIR)/nps_ins_vectornav.c diff --git a/conf/firmwares/test_chibios.makefile b/conf/firmwares/test_chibios.makefile index 3290e3f75b..ffc023bc96 100644 --- a/conf/firmwares/test_chibios.makefile +++ b/conf/firmwares/test_chibios.makefile @@ -96,7 +96,7 @@ test_sys_time_usleep.srcs += test/mcu_periph/chibios_test_sys_time_usleep.c # test gpio # test_sys_gpio.ARCHDIR = $(ARCH) -test_sys_gpio.CFLAGS += $(COMMON_TEST_CFLAGS) +test_sys_gpio.CFLAGS += $(COMMON_TEST_CFLAGS) test_sys_gpio.srcs += $(COMMON_TEST_SRCS) test_sys_gpio.srcs += test/mcu_periph/chibios_test_gpio.c @@ -104,7 +104,7 @@ test_sys_gpio.srcs += test/mcu_periph/chibios_test_gpio.c # test led # test_led.ARCHDIR = $(ARCH) -test_led.CFLAGS += $(COMMON_TEST_CFLAGS) +test_led.CFLAGS += $(COMMON_TEST_CFLAGS) test_led.srcs += $(COMMON_TEST_SRCS) test_led.srcs += test/chibios_test_led.c diff --git a/conf/flight_plans/OPENUAS/include_obc2014_mission.xml b/conf/flight_plans/OPENUAS/include_obc2014_mission.xml index 1bbb24481d..2b32e30e79 100644 --- a/conf/flight_plans/OPENUAS/include_obc2014_mission.xml +++ b/conf/flight_plans/OPENUAS/include_obc2014_mission.xml @@ -1,5 +1,5 @@ - @@ -59,7 +59,7 @@ Your safe aircraft operation is *your* responsibility - @@ -90,7 +90,7 @@ Altough Switching the mode to auto2/NAV from any other mode will reset nav_headi - + @@ -103,7 +103,7 @@ Altough Switching the mode to auto2/NAV from any other mode will reset nav_headi - + diff --git a/conf/flight_plans/OPENUAS/openuas_tuning_a_fresh_fixedwing.xml b/conf/flight_plans/OPENUAS/openuas_tuning_a_fresh_fixedwing.xml index c79879b2e9..8ed39af8f7 100644 --- a/conf/flight_plans/OPENUAS/openuas_tuning_a_fresh_fixedwing.xml +++ b/conf/flight_plans/OPENUAS/openuas_tuning_a_fresh_fixedwing.xml @@ -74,7 +74,7 @@ c. Observe the aircraft and data from ESTIMATOR:z_dot and DESIRED:climb. The air d. Activate the blocks Ascent Auto Pitch Tuning and Descent Auto Pitch Tuning and repeat C realizing the climb rate should be a minimum or maximum as set with V_CTL_ALTITUDE_MAX_CLIMB (optionally, change the nav_climb value with the notebook settings instead). e. Try changing between Loiter, Cruise and Dash throttle settings corresponding to V_CTL_AUTO_THROTTLE_(NOMINAL|MIN|MAX)_CRUISE_THROTTLE and ensure climb remains stable. Adjust gains if required as in C. f. Ensure the aircraft switched to manual control as it passes and gets further away from the pilot, at the pilot's discretion. Turn and line up for another pass, and switch to auto2. The previous block should still be active. -g. To help with tuning, a climb rate other than that specified in the current block could be induced by the pilot just prior to switching to auto2 to check various climb rate setpoint step changes. This also helps if one is nervous about allowing the autopilot to command a steep descent. One can descend manually and then switch to auto2 when the Level Auto Throttle Tuning block is active, which will cause the autopilot to stop the aircraft descending. If the aircraft does not seem to stabilize at the desired climb rate while in Loiter or Dash throttle modes (i.e always climbs or descends with a 0.0 climb setpoint), chances are the settings for V_CTL_AUTO_THROTTLE_(LOITER|DASH)_TRIM are set incorrectly. +g. To help with tuning, a climb rate other than that specified in the current block could be induced by the pilot just prior to switching to auto2 to check various climb rate setpoint step changes. This also helps if one is nervous about allowing the autopilot to command a steep descent. One can descend manually and then switch to auto2 when the Level Auto Throttle Tuning block is active, which will cause the autopilot to stop the aircraft descending. If the aircraft does not seem to stabilize at the desired climb rate while in Loiter or Dash throttle modes (i.e always climbs or descends with a 0.0 climb setpoint), chances are the settings for V_CTL_AUTO_THROTTLE_(LOITER|DASH)_TRIM are set incorrectly. The climb loop(s) should now be sufficiently tuned, unless one wishes to use the airspeed loops. If you plan to use airspeed, please tune the airspeed loop, which replaces the traditional Auto Throttle control loop. @@ -202,7 +202,7 @@ perhaps a few global alt exceptions? But where do they deroute to assuming the a nav_pitch = 0.0deg v_ctl_mode = V_CTL_MODE_AUTO_CLIMB v_ctl_climb_setpoint = 0.0 - --> + --> @@ -231,7 +231,7 @@ perhaps a few global alt exceptions? But where do they deroute to assuming the a nav_throttle_setpoint = 9600*(V_CTL_AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE) v_ctl_mode = V_CTL_MODE_AUTO_CLIMB v_ctl_climb_setpoint = 0.0 - --> + --> @@ -260,7 +260,7 @@ perhaps a few global alt exceptions? But where do they deroute to assuming the a nav_pitch = 0.0deg v_ctl_mode = V_CTL_MODE_AUTO_ALT nav_altitude = flight_altitude -> can be set in the flight params setting page - --> + --> @@ -290,7 +290,7 @@ perhaps a few global alt exceptions? But where do they deroute to assuming the a --> -
diff --git a/conf/flight_plans/rotorcraft_basic_superbitrf_from_hand.xml b/conf/flight_plans/rotorcraft_basic_superbitrf_from_hand.xml index 6a5e1dc609..5b5f006d3c 100644 --- a/conf/flight_plans/rotorcraft_basic_superbitrf_from_hand.xml +++ b/conf/flight_plans/rotorcraft_basic_superbitrf_from_hand.xml @@ -50,7 +50,7 @@ The goal of this flightplan is to have a safe, simple no-brainer flightplan for - @@ -76,7 +76,7 @@ The goal of this flightplan is to have a safe, simple no-brainer flightplan for - + diff --git a/conf/joystick/hobbyking.xml b/conf/joystick/hobbyking.xml index b778a15957..9700719dbd 100644 --- a/conf/joystick/hobbyking.xml +++ b/conf/joystick/hobbyking.xml @@ -1,9 +1,9 @@ - diff --git a/conf/joystick/nes_gamepad.xml b/conf/joystick/nes_gamepad.xml index 61f21e5543..a114969e24 100644 --- a/conf/joystick/nes_gamepad.xml +++ b/conf/joystick/nes_gamepad.xml @@ -41,11 +41,11 @@ TEST STICK DATA OUTPUT: Axis 0 : parameters = [-32768,32768] Axis 1 : parameters = [-32768,32768] Input device name: "2Axes 11Keys Game Pad" on SDL device "0" - buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 - buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 + buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 + buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 ... - + --> diff --git a/conf/joystick/snes_gamepad.xml b/conf/joystick/snes_gamepad.xml index 18733adc3a..159aa27fe3 100644 --- a/conf/joystick/snes_gamepad.xml +++ b/conf/joystick/snes_gamepad.xml @@ -47,11 +47,11 @@ TEST STICK DATA OUTPUT: Axis 0 : parameters = [-32768,32768] Axis 1 : parameters = [-32768,32768] Input device name: "2Axes 11Keys Game Pad" on SDL device "0" - buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 - buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 + buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 + buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 ... - + --> diff --git a/conf/modules/ahrs_vectornav.xml b/conf/modules/ahrs_vectornav.xml index 25537e8c24..21a5c7ba53 100644 --- a/conf/modules/ahrs_vectornav.xml +++ b/conf/modules/ahrs_vectornav.xml @@ -19,7 +19,7 @@ - + diff --git a/conf/modules/cv_detect_contour.xml b/conf/modules/cv_detect_contour.xml index 1c7365b24a..aecad43302 100644 --- a/conf/modules/cv_detect_contour.xml +++ b/conf/modules/cv_detect_contour.xml @@ -2,7 +2,7 @@ - A module that detects the contour of a dronerace obstacle. + A module that detects the contour of a dronerace obstacle. diff --git a/conf/modules/ins_vectornav.xml b/conf/modules/ins_vectornav.xml index 87ca37e68f..b3c534b727 100644 --- a/conf/modules/ins_vectornav.xml +++ b/conf/modules/ins_vectornav.xml @@ -48,7 +48,7 @@ endif - + - diff --git a/conf/modules/lidar_sf11.xml b/conf/modules/lidar_sf11.xml index 51ce26da9f..398c91b086 100644 --- a/conf/modules/lidar_sf11.xml +++ b/conf/modules/lidar_sf11.xml @@ -28,7 +28,7 @@
- diff --git a/conf/modules/nav_skid_landing.xml b/conf/modules/nav_skid_landing.xml index f8985063ca..586f3a74e6 100644 --- a/conf/modules/nav_skid_landing.xml +++ b/conf/modules/nav_skid_landing.xml @@ -10,7 +10,7 @@ 2) once low enough follow line to TD waypoint 3) once low enough flare - +
@@ -29,7 +29,7 @@
- + diff --git a/conf/modules/nav_survey_rectangle_rotorcraft.xml b/conf/modules/nav_survey_rectangle_rotorcraft.xml index b52bf90ebb..a255a73dd3 100644 --- a/conf/modules/nav_survey_rectangle_rotorcraft.xml +++ b/conf/modules/nav_survey_rectangle_rotorcraft.xml @@ -29,7 +29,7 @@ or using flightplan primitive - + diff --git a/conf/modules/orange_avoider.xml b/conf/modules/orange_avoider.xml index 5d48fbb42a..ee78f63aed 100644 --- a/conf/modules/orange_avoider.xml +++ b/conf/modules/orange_avoider.xml @@ -4,7 +4,7 @@ Avoid all objects that are orange! - This example module shows how you can use the camera stream and colorfilter to detect orange objects. + This example module shows how you can use the camera stream and colorfilter to detect orange objects. By adding this module to your flightplan and flying in the cyberzoo with the flightplan TUDELFT/tudelft_course2016_avoid_orange_cyberzoo.xml you will avoid every obstacle that is orange. diff --git a/conf/modules/pose_history.xml b/conf/modules/pose_history.xml index 45d5e91398..4c19c9c0d4 100644 --- a/conf/modules/pose_history.xml +++ b/conf/modules/pose_history.xml @@ -3,7 +3,7 @@ Ask this module for the pose the drone had closest to a given timestamp - +
diff --git a/conf/modules/px4_gimbal.xml b/conf/modules/px4_gimbal.xml index c95b89173f..54a0681eba 100644 --- a/conf/modules/px4_gimbal.xml +++ b/conf/modules/px4_gimbal.xml @@ -10,7 +10,7 @@
-
+
diff --git a/conf/modules/traffic_info.xml b/conf/modules/traffic_info.xml index f2f5588278..93ebce1e33 100644 --- a/conf/modules/traffic_info.xml +++ b/conf/modules/traffic_info.xml @@ -8,7 +8,7 @@ - + diff --git a/conf/modules/video_usb_logger.xml b/conf/modules/video_usb_logger.xml index ba496c5286..54d76e4c35 100644 --- a/conf/modules/video_usb_logger.xml +++ b/conf/modules/video_usb_logger.xml @@ -16,7 +16,7 @@
- + diff --git a/conf/radios/OPENUAS/openuas_R615X_cppm.xml b/conf/radios/OPENUAS/openuas_R615X_cppm.xml index 049f5544aa..0f07c304d0 100644 --- a/conf/radios/OPENUAS/openuas_R615X_cppm.xml +++ b/conf/radios/OPENUAS/openuas_R615X_cppm.xml @@ -16,7 +16,7 @@ -- min, max and sync are expressed in micro-seconds --> - - - - - - diff --git a/conf/simulator/jsbsim/aircraft/YardStik.xml b/conf/simulator/jsbsim/aircraft/YardStik.xml index e6a5b46d7c..e0ee045661 100644 --- a/conf/simulator/jsbsim/aircraft/YardStik.xml +++ b/conf/simulator/jsbsim/aircraft/YardStik.xml @@ -126,7 +126,7 @@ 1.0 - + 36.36 0 @@ -267,11 +267,11 @@ aero/alpha-rad - -1.5700 1.5000 - -0.2600 0.0560 - 0.0000 0.0280 - 0.2600 0.0560 - 1.5700 1.5000 + -1.5700 1.5000 + -0.2600 0.0560 + 0.0000 0.0280 + 0.2600 0.0560 + 1.5700 1.5000
@@ -293,11 +293,11 @@ aero/beta-rad - -1.5700 1.2300 - -0.2600 0.0500 - 0.0000 0.0000 - 0.2600 0.0500 - 1.5700 1.2300 + -1.5700 1.2300 + -0.2600 0.0500 + 0.0000 0.0000 + 0.2600 0.0500 + 1.5700 1.2300
@@ -334,10 +334,10 @@ aero/alpha-rad - -0.2000 -0.7500 - 0.0000 0.2500 - 0.2300 1.4000 - 0.6000 0.7100 + -0.2000 -0.7500 + 0.0000 0.2500 + 0.2300 1.4000 + 0.6000 0.7100
@@ -397,8 +397,8 @@ velocities/mach - 0.0000 0.1300 - 2.0000 0.0570 + 0.0000 0.1300 + 2.0000 0.0570
@@ -437,7 +437,7 @@ velocities/mach 0.0000 -0.5000 - 2.0000 -0.2750 + 2.0000 -0.2750 diff --git a/conf/telemetry/OPENUAS/openuas_barodebug_ardrone.xml b/conf/telemetry/OPENUAS/openuas_barodebug_ardrone.xml index 88cbb79708..4f322e3818 100644 --- a/conf/telemetry/OPENUAS/openuas_barodebug_ardrone.xml +++ b/conf/telemetry/OPENUAS/openuas_barodebug_ardrone.xml @@ -18,7 +18,7 @@ - + diff --git a/conf/telemetry/OPENUAS/openuas_barodebug_ardrone2.xml b/conf/telemetry/OPENUAS/openuas_barodebug_ardrone2.xml index f4b2da1719..6d6c6f2a9f 100644 --- a/conf/telemetry/OPENUAS/openuas_barodebug_ardrone2.xml +++ b/conf/telemetry/OPENUAS/openuas_barodebug_ardrone2.xml @@ -18,7 +18,7 @@ - + diff --git a/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone.xml b/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone.xml index ee952935b4..7edf09fb19 100644 --- a/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone.xml +++ b/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone.xml @@ -17,7 +17,7 @@ - + diff --git a/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone2.xml b/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone2.xml index ee952935b4..7edf09fb19 100644 --- a/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone2.xml +++ b/conf/telemetry/OPENUAS/openuas_magnetodebug_ardrone2.xml @@ -17,7 +17,7 @@ - + diff --git a/sw/airborne/arch/stm32/usb_ser_hw.c b/sw/airborne/arch/stm32/usb_ser_hw.c index 42654e4232..5031b86028 100644 --- a/sw/airborne/arch/stm32/usb_ser_hw.c +++ b/sw/airborne/arch/stm32/usb_ser_hw.c @@ -443,7 +443,7 @@ int VCOM_check_available(void) * VCOM_event() should be called from main/module event function */ void VCOM_event(void) -{ +{ if (tx_timeout == 1) { // send any remaining bytes that still hang arround in the tx fifo, after a timeout if (fifo_avail(&txfifo)) { VCOM_send_message(); diff --git a/sw/airborne/boards/lisa_mx/chibios/v2.1/board.h b/sw/airborne/boards/lisa_mx/chibios/v2.1/board.h index 9c4f6fdb66..ea2a607897 100644 --- a/sw/airborne/boards/lisa_mx/chibios/v2.1/board.h +++ b/sw/airborne/boards/lisa_mx/chibios/v2.1/board.h @@ -1327,7 +1327,7 @@ 0, \ 0 \ } - #endif /* USE_I2C1 */ + #endif /* USE_I2C1 */ #else /* !USE_SERVOS_7AND8 */ #define PWM_CONF_TIM3 1 #define PWM_CONF_TIM5 1 diff --git a/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.c b/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.c index 98a3bc258f..7c03cc7150 100644 --- a/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.c +++ b/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.c @@ -79,7 +79,7 @@ struct flow_t *opticFlowLK(struct image_t *new_img, struct image_t *old_img, str if(pyramid_level == 0) { // use the old code in this case: - return opticFlowLK_flat(new_img, old_img, points, points_cnt, half_window_size, subpixel_factor, max_iterations, step_threshold, max_points); + return opticFlowLK_flat(new_img, old_img, points, points_cnt, half_window_size, subpixel_factor, max_iterations, step_threshold, max_points); } // Allocate some memory for returning the vectors diff --git a/sw/airborne/modules/computer_vision/opticflow/size_divergence.c b/sw/airborne/modules/computer_vision/opticflow/size_divergence.c index ec25c41b2c..36931d6cb9 100644 --- a/sw/airborne/modules/computer_vision/opticflow/size_divergence.c +++ b/sw/airborne/modules/computer_vision/opticflow/size_divergence.c @@ -112,7 +112,7 @@ float get_size_divergence(struct flow_t *vectors, int count, int n_samples) dy = (float)vectors[i].pos.y + (float)vectors[i].flow_y - (float)vectors[j].pos.y - (float)vectors[j].flow_y; distance_2 = sqrt(dx * dx + dy * dy); - + // calculate divergence for this sample: divs[sample] = (distance_2 - distance_1) / distance_1; } diff --git a/sw/airborne/peripherals/lsm303d_spi.h b/sw/airborne/peripherals/lsm303d_spi.h index 49c6c1a2c5..6d4d68c017 100644 --- a/sw/airborne/peripherals/lsm303d_spi.h +++ b/sw/airborne/peripherals/lsm303d_spi.h @@ -51,7 +51,7 @@ struct Lsm303d_Spi { union { struct Int16Vect3 vect; ///< data vector in mag coordinate system int16_t value[3]; ///< data values accessible by channel index - } data_mag; + } data_mag; struct Lsm303dConfig conf; }; diff --git a/sw/ground_segment/joystick/gb2ivy.py b/sw/ground_segment/joystick/gb2ivy.py index d1530d9bfb..ff3a3f0d77 100755 --- a/sw/ground_segment/joystick/gb2ivy.py +++ b/sw/ground_segment/joystick/gb2ivy.py @@ -196,7 +196,7 @@ class SerialInterface(threading.Thread): # Parse incoming data c = self.ser.readline() if len(c) > 0: - # Callback function on new message + # Callback function on new message self.callback(c) except StopIteration: diff --git a/sw/ground_segment/python/guided_mode_example.py b/sw/ground_segment/python/guided_mode_example.py index 42717faa0e..8ad9923c4a 100755 --- a/sw/ground_segment/python/guided_mode_example.py +++ b/sw/ground_segment/python/guided_mode_example.py @@ -126,7 +126,7 @@ class Guidance(object): msg['yaw'] = yaw print("move at vel NED: %s" % msg) self._interface.send_raw_datalink(msg) - + def move_at_body_vel(self, forward=0.0, right=0.0, down=0.0, yaw=0.0): """ move at specified velocity in meters/sec with absolute heading (if already in GUIDED mode) diff --git a/sw/ground_segment/python/gvf/gvfframe.py b/sw/ground_segment/python/gvf/gvfframe.py index 19b3ba35ed..d12cf63470 100644 --- a/sw/ground_segment/python/gvf/gvfframe.py +++ b/sw/ground_segment/python/gvf/gvfframe.py @@ -14,7 +14,7 @@ PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abs sys.path.append(PPRZ_SRC + "/sw/lib/python") sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") from pprzlink.ivy import IvyMessagesInterface -from pprzlink.message import PprzMessage +from pprzlink.message import PprzMessage from settings_xml_parse import PaparazziACSettings WIDTH = 800 @@ -45,11 +45,11 @@ class GVFFrame(wx.Frame): # Frame self.canvas = FigureCanvas(self, -1, self.map_gvf.fig) self.Bind(wx.EVT_CLOSE, self.OnClose) - + self.redraw_timer = wx.Timer(self) - self.Bind(wx.EVT_TIMER, self.OnRedrawTimer, self.redraw_timer) + self.Bind(wx.EVT_TIMER, self.OnRedrawTimer, self.redraw_timer) self.redraw_timer.Start(100) - + # Ivy self.interface = IvyMessagesInterface("GVF") self.interface.subscribe(self.message_recv) @@ -76,14 +76,14 @@ class GVFFrame(wx.Frame): if int(ac_id) == self.ac_id: if msg.name == 'GPS': self.course = int(msg.get_field(3))*np.pi/1800 - + if msg.name == 'NAVIGATION': self.XY[0] = float(msg.get_field(2)) self.XY[1] = float(msg.get_field(3)) - + if msg.name == 'ATTITUDE': self.yaw = float(msg.get_field(1)) - + if msg.name == 'DL_VALUE' and \ self.indexes_are_good == len(self.list_of_indexes): if int(msg.get_field(0)) == int(self.ke_index): @@ -173,7 +173,7 @@ class map2d: def vehicle_patch(self, XY, yaw): Rot = np.array([[np.cos(yaw), np.sin(yaw)],[-np.sin(yaw), np.cos(yaw)]]) - + apex = 45*np.pi/180 # 30 degrees apex angle b = np.sqrt(2*(self.area/2000) / np.sin(apex)) a = b*np.sin(apex/2) @@ -191,7 +191,7 @@ class map2d: (XY[0]+z2[0], XY[1]+z2[1]), \ (XY[0]+z3[0], XY[1]+z3[1]), \ (0, 0)] - + codes = [Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY] path = Path(verts, codes) @@ -257,7 +257,7 @@ class traj_line: xtr = np.linspace(-200, 200, 400) - xl = xtr*np.sin(self.alpha) + a + xl = xtr*np.sin(self.alpha) + a yl = xtr*np.cos(self.alpha) + b self.traj_points = np.vstack((xl, yl)) @@ -279,10 +279,10 @@ class traj_line: ke = 1e-2*ke e = (self.mapgrad_X-self.a)*nx + (self.mapgrad_Y-self.b)*ny - + self.mapgrad_U = tx -ke*e*nx self.mapgrad_V = ty -ke*e*ny - + norm = np.sqrt(self.mapgrad_U**2 + self.mapgrad_V**2) self.mapgrad_U = self.mapgrad_U/norm @@ -303,7 +303,7 @@ class traj_ellipse: self.mapgrad_Y = [] self.mapgrad_U = [] self.mapgrad_V = [] - + i = 0 for t in self.float_range(0, 1, 0.005): self.traj_points[:, i] = self.param_point(t) @@ -338,10 +338,10 @@ class traj_ellipse: ty = -s*nx e = (Xel/self.a)**2 + (Yel/self.b)**2 - 1 - + self.mapgrad_U = tx -ke*e*nx self.mapgrad_V = ty -ke*e*ny - + norm = np.sqrt(self.mapgrad_U**2 + self.mapgrad_V**2) self.mapgrad_U = self.mapgrad_U/norm @@ -404,10 +404,10 @@ class traj_sin: ke = 1e-2*ke e = ys - self.A*np.sin(ang) - + self.mapgrad_U = tx -ke*e*nx self.mapgrad_V = ty -ke*e*ny - + norm = np.sqrt(self.mapgrad_U**2 + self.mapgrad_V**2) self.mapgrad_U = self.mapgrad_U/norm diff --git a/sw/lib/ocaml/gen_common.mli b/sw/lib/ocaml/gen_common.mli index 4df20ff41d..30f4f222f0 100644 --- a/sw/lib/ocaml/gen_common.mli +++ b/sw/lib/ocaml/gen_common.mli @@ -58,7 +58,7 @@ val get_module : Xml.xml -> bool_expr -> module_conf * Expand xml airframe file if it contains 'include' nodes *) val expand_includes : string -> Xml.xml -> Xml.xml - + (** [get_modules_of_airframe xml] * Returns a list of pair (modules ("load" node), targets) from airframe file *) val get_modules_of_airframe : ?target: string -> Xml.xml -> module_conf list diff --git a/sw/supervision/python/parser.py b/sw/supervision/python/parser.py index c5369b474d..b349d8e1e5 100644 --- a/sw/supervision/python/parser.py +++ b/sw/supervision/python/parser.py @@ -343,7 +343,7 @@ def load_cache(): cache = parse_cache_file("r", DEFAULT_CACHE_PATH) cache_file = CACHE_FILE - LOGGER.error("No cache file found ! Default cache '%s' loaded.", + LOGGER.error("No cache file found ! Default cache '%s' loaded.", DEFAULT_CACHE_PATH) print("No cache file found ! Default cache '%s' loaded." % DEFAULT_CACHE_PATH) diff --git a/sw/tools/bluegiga_usb_dongle/main.c b/sw/tools/bluegiga_usb_dongle/main.c index 1d2aa9be88..ad255ba431 100644 --- a/sw/tools/bluegiga_usb_dongle/main.c +++ b/sw/tools/bluegiga_usb_dongle/main.c @@ -576,7 +576,7 @@ void ble_evt_gap_scan_response(const struct ble_msg_gap_scan_response_evt_t *msg if (!cmp_addr(msg->sender.addr, connected_addr[i].addr)) return; } - + fprintf(stderr, "Trying to connect to "); print_bdaddr(msg->sender); fprintf(stderr, "\n"); //change_state(state_connecting); // connection interval unit 1.25ms @@ -1088,7 +1088,7 @@ int main(int argc, char *argv[]) // advertise interval scales 625us, min, max, channels (0x07 = 3, 0x03 = 2, 0x04 = 1) if (action == action_broadcast) ble_cmd_gap_set_adv_parameters(0x20, 0x28, 0x07); - + // Execute action if (action == action_scan || action == action_broadcast || action == action_broadcast_connect) { ble_cmd_gap_discover(gap_discover_generic); diff --git a/sw/tools/calibration/report_imu_scaled.py b/sw/tools/calibration/report_imu_scaled.py index 866d13d072..a337da0a7c 100755 --- a/sw/tools/calibration/report_imu_scaled.py +++ b/sw/tools/calibration/report_imu_scaled.py @@ -78,7 +78,7 @@ def main(): # options.end = 36000 # read scaled sensor measurements from log file - # TBD: Eventually populate the sensor attributes/values with data found in the messages.xml file + # TBD: Eventually populate the sensor attributes/values with data found in the messages.xml file sensor_names = [ "ACCEL", "GYRO", "MAG" ] sensor_attrs = [ [0.0009766, "m/s2", "ax", "ay", "az"], [0.0139882, "deg/s", "gp", "gq", "gr"], [0.0004883, "unit", "mx", "my", "mz"] ] @@ -96,7 +96,7 @@ def main(): #sys.exit(1) print("") - + # coefficient = calibration_utils.estimate_mag_current_relation(measurements) # print("") diff --git a/sw/tools/parrot/ardrone2.py b/sw/tools/parrot/ardrone2.py index 0d786cdeaa..ecc0d22b53 100755 --- a/sw/tools/parrot/ardrone2.py +++ b/sw/tools/parrot/ardrone2.py @@ -172,7 +172,7 @@ def ardrone2_status(): print('Motor hardware:\t\t' + read_from_config('motor1_hard', config_ini) + '\t' + read_from_config('motor2_hard', config_ini) + '\t' + read_from_config('motor3_hard', config_ini) + '\t' + read_from_config('motor4_hard', config_ini)) - + sleep(2.0) #Wait running process reporting back lag print('Currently running:\t' + parrot_utils.check_running(tn)) autorun = {'': 'Native', '0': 'Native', '1': 'Paparazzi'} diff --git a/sw/tools/sbus_fakerator/lib/channel.py b/sw/tools/sbus_fakerator/lib/channel.py index 2a8203cb45..439169572e 100644 --- a/sw/tools/sbus_fakerator/lib/channel.py +++ b/sw/tools/sbus_fakerator/lib/channel.py @@ -30,13 +30,13 @@ c_types = ["Bi-switch", "Tri-switch", "Trigger-switch", "Dial-360", "Dial-180", class Channel(Scale): ''' @var value: current value of Channel - + ''' def __init__(self, child, number, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.bind = "" self.number = number @@ -45,7 +45,7 @@ class Channel(Scale): kw['from_'] = 100 kw['variable'] = self.value Scale.__init__(self, cnf, kw) - + def add_value(self, val): ''' Add a number to val. To subtract, enter a negative number. @@ -53,16 +53,16 @@ class Channel(Scale): ''' self.value += val self.set(self.value) - + def rebind(self, key): self.bind = key - + def set_type(self, new_type): if new_type in c_types: self.c_type = new_type else: print "Type not known for {}".format(self.name) - + def repr_xml(self): c_root = etree.Element("Channel") c_root.attrib['key'] = self.bind @@ -77,13 +77,13 @@ class Channel(Scale): class bi_switch(Channel): - + __name__ = "bi_switch" - + def __init__(self, number, orientation, name, scale_length, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.value = IntVar(value=-100) self.state = 0 @@ -93,27 +93,27 @@ class bi_switch(Channel): self.name = name Channel.__init__(self, number, master, cnf, label=name, length = scale_length, orient = orientation, variable=self.value) self.set(-100) - - + + def add_value(self, num): self.state = (self.state + 1) % 2 if self.state == 0: self.value.set(-100) elif self.state == 1: self.value.set(100) - + def key_off(self): pass - - + + class tri_switch(Channel): - + __name__ = "tri_switch" - + def __init__(self, number, orientation, name, scale_length, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.value = IntVar(value=-100) self.state = 0 @@ -122,7 +122,7 @@ class tri_switch(Channel): self.c_type = "" self.name = name Channel.__init__(self, number, master, cnf, label = name, length = scale_length, resolution=100, orient = orientation, variable=self.value) - + def add_value(self, in_state): ''' @param val: value to add to Channel value @@ -130,7 +130,7 @@ class tri_switch(Channel): # 0=-100 # 1=0 # 2=100 - + if in_state > 0: if self.value.get() == -100: self.value.set(0) @@ -141,18 +141,18 @@ class tri_switch(Channel): self.value.set(0) elif self.value.get() == 0: self.value.set(-100) - + def key_off(self): pass - + class trigger_switch(Channel): - + __name__ = "trigger_switch" - + def __init__(self, number, orientation, name, scale_length, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.value = IntVar(value=-100) self.state = 0 @@ -161,7 +161,7 @@ class trigger_switch(Channel): self.c_type = "" self.name = name Channel.__init__(self, number, master, cnf, label = name, length = scale_length, orient=orientation, variable=self.value) - + def add_value(self, state): ''' @param state: state of the switch (i.e., flipped or not) @@ -177,12 +177,12 @@ class trigger_switch(Channel): self.add_value(-1) class dial(Channel): - + __name__ = "dial" def __init__(self, number, total_degrees, orientation, name, scale_length, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.value = DoubleVar(0) self.t_degrees = total_degrees @@ -192,36 +192,36 @@ class dial(Channel): self.c_type = "" self.name = name Channel.__init__(self, number, master, cnf, label = name, length = scale_length, orient = orientation, resolution=self.resolution, variable=self.value) - + def add_value(self, in_value): ''' @param state: state of the switch (i.e., flipped or not) ''' self.value.get() self.value.set((in_value * self.resolution) + self.value.get()) - + def key_off(self): pass - + class stick(Channel): __name__ = "stick" def __init__(self, number, orientation, name, scale_length, master=None, cnf={}, **kw): ''' Constructor - @param number: Channel number + @param number: Channel number ''' self.value = IntVar(0) self.bind = "" self.number = number self.c_type = "" Channel.__init__(self, number, master, cnf, orient = orientation, label = name, length = scale_length, variable=self.value) - + def add_value(self, value): ''' @param state: state of the switch (i.e., flipped or not) ''' self.value.set(self.value.get() + value) - + def key_off(self): pass diff --git a/sw/tools/sbus_fakerator/lib/controller.py b/sw/tools/sbus_fakerator/lib/controller.py index 6df4d7d9fa..c2c4f116d9 100644 --- a/sw/tools/sbus_fakerator/lib/controller.py +++ b/sw/tools/sbus_fakerator/lib/controller.py @@ -32,7 +32,7 @@ class Controller(tk.Frame): tk.Frame.__init__(self, parent, *args, width = 1000, height = 1000) self.num_of_channels = 0 self.channels = [] - + def add_channel(self, channel_type, *args, **kwargs): ''' @param orientation = tk.VERTICAL : Either tk.VERTICAL or tk.HORIZONTAL @@ -63,8 +63,8 @@ class Controller(tk.Frame): y = kwargs['y'] if 'length' in kwargs: length = kwargs['length'] - - + + #channel adding if channel_type.__name__ == 'bi_switch': self.channels.append(channel_type(self.num_of_channels, orientation, name, length, self)) @@ -100,14 +100,14 @@ class Controller(tk.Frame): if 'sub_key_binding' in kwargs: self.channels[self.num_of_channels].bind = kwargs['sub_key_binding'] _key_bindings_[kwargs['sub_key_binding']] = (self.num_of_channels, -1) - + self.channels[self.num_of_channels].pack() self.channels[self.num_of_channels].place(x = x, y=y) self.num_of_channels += 1 - - + + def add_value_of_channel(self, channel_no, *amount): - + if self.channels[channel_no].__name__ == 'bi_switch': self.channels[channel_no].add_value() elif self.channels[channel_no].__name__ == 'tri_switch': @@ -116,25 +116,25 @@ class Controller(tk.Frame): self.channels[channel_no].add_value(amount[0]) elif self.channels[channel_no].__name__ == 'dial': self.channels[channel_no].add_value(amount[0]) - + self.channels[channel_no].pack() - + def handle_button_press(self, key): if key in _key_bindings_: self.channels[_key_bindings_[key][0]].add_value(_key_bindings_[key][1]) else: print key, " not bound" - + def handle_button_release(self, key): if key in _key_bindings_: self.channels[_key_bindings_[key][0]].key_off() - + def generate_package(self): ''' - OldRange = (OldMax - OldMin) - NewRange = (NewMax - NewMin) + OldRange = (OldMax - OldMin) + NewRange = (NewMax - NewMin) NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin - + range of sbus control = 172 - 2047 ''' packet = [] diff --git a/sw/tools/sbus_fakerator/lib/sbus.py b/sw/tools/sbus_fakerator/lib/sbus.py index 9decf7df6a..9a46db836d 100644 --- a/sw/tools/sbus_fakerator/lib/sbus.py +++ b/sw/tools/sbus_fakerator/lib/sbus.py @@ -34,22 +34,22 @@ def sbus_decode(buff): bit_in_raw_buff = 0 channel = 0 bit_in_channel = 0 - + for c in range(SBUS_NB_CHANNEL * SBUS_BIT_PER_CHANNEL): if buff[byte_in_raw_buff] & (1 << bit_in_raw_buff): decoded[channel] |= (1 << bit_in_channel) - + bit_in_raw_buff += 1 bit_in_channel += 1 - + if(bit_in_raw_buff == SBUS_BIT_PER_BYTE): bit_in_raw_buff = 0 byte_in_raw_buff += 1 - + if(bit_in_channel == SBUS_BIT_PER_CHANNEL): bit_in_channel = 0 channel += 1 - + return decoded @@ -64,21 +64,21 @@ def sbus_encode(buff): for x in range(SBUS_NB_CHANNEL * SBUS_BIT_PER_CHANNEL): if int(buff[channel]) & (1 << bit_in_channel): decoded[cur_byte] |= (1 << bit_in_byte) - + bit_in_channel += 1 bit_in_byte += 1 - + if(bit_in_byte == SBUS_BIT_PER_BYTE): bit_in_byte = 0 cur_byte += 1 - + if(bit_in_channel == SBUS_BIT_PER_CHANNEL): bit_in_channel = 0 channel += 1 - + return [SBUS_START_BYTE] + decoded + [0, SBUS_END_BYTE] - + if __name__ == "__main__": control = [169, 84, 149, 170, 84, 197, 10, 86, 168, 138, 21, 172, 80, 21, 43, 88, 193, 10, 86, 168, 74, 85, 0, 0] print sbus_decode(control)