diff --git a/conf/airframes/BR/asctec_br.xml b/conf/airframes/BR/asctec_br.xml index 4f1ce88b6f..ef646b3f90 100644 --- a/conf/airframes/BR/asctec_br.xml +++ b/conf/airframes/BR/asctec_br.xml @@ -35,7 +35,7 @@ - + @@ -63,12 +63,12 @@ -
- - - - - +
+ + + + +
diff --git a/conf/airframes/BR/conf.xml b/conf/airframes/BR/conf.xml index 4a479ce003..edd4648d58 100644 --- a/conf/airframes/BR/conf.xml +++ b/conf/airframes/BR/conf.xml @@ -7,7 +7,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/rotorcraft_basic.xml" settings="settings/rotorcraft_basic.xml settings/control/stabilization_att_int.xml settings/modules/config_asctec_v2.xml" - settings_modules="modules/geo_mag.xml modules/air_data.xml modules/servo_switch.xml modules/gps_ubx_ucenter.xml" + settings_modules="modules/geo_mag.xml modules/air_data.xml modules/switch_servo.xml modules/gps_ubx_ucenter.xml" gui_color="white" /> diff --git a/conf/airframes/BR/mavtec4_br.xml b/conf/airframes/BR/mavtec4_br.xml index cdd1ab5941..c8602eb1bb 100644 --- a/conf/airframes/BR/mavtec4_br.xml +++ b/conf/airframes/BR/mavtec4_br.xml @@ -35,7 +35,7 @@ - + @@ -63,12 +63,12 @@
-
- - - - - +
+ + + + +
diff --git a/conf/airframes/CDW/cdw_conf.xml b/conf/airframes/CDW/cdw_conf.xml index 7d9dc606b0..36db34fdb5 100644 --- a/conf/airframes/CDW/cdw_conf.xml +++ b/conf/airframes/CDW/cdw_conf.xml @@ -29,7 +29,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/TUDELFT/tudelft_rotorcraft_survey_imav2015_competition.xml" settings="settings/rotorcraft_basic.xml settings/control/stabilization_att_int.xml settings/modules/config_asctec_v2.xml settings/control/rotorcraft_guidance.xml" - settings_modules="modules/servo_switch.xml modules/gps_ubx_ucenter.xml modules/nav_survey_rectangle_rotorcraft.xml modules/nav_survey_poly_rotorcraft.xml modules/geo_mag.xml" + settings_modules="modules/switch_servo.xml modules/gps_ubx_ucenter.xml modules/nav_survey_rectangle_rotorcraft.xml modules/nav_survey_poly_rotorcraft.xml modules/geo_mag.xml" gui_color="blue" /> - + @@ -65,12 +65,12 @@ -
- - - - - +
+ + + + +
diff --git a/conf/airframes/ENAC/conf_enac.xml b/conf/airframes/ENAC/conf_enac.xml index b9314ca17f..a95e601c32 100644 --- a/conf/airframes/ENAC/conf_enac.xml +++ b/conf/airframes/ENAC/conf_enac.xml @@ -62,7 +62,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/rotorcraft_basic.xml" settings="settings/rotorcraft_basic.xml settings/control/stabilization_att_int.xml settings/control/rotorcraft_guidance.xml " - settings_modules="modules/servo_switch.xml modules/rotorcraft_cam.xml" + settings_modules="modules/switch_servo.xml modules/rotorcraft_cam.xml" gui_color="#3cf2d51335a7" /> - + @@ -83,7 +83,7 @@ -
+
diff --git a/conf/airframes/TUDELFT/tudelft_asctec_freek.xml b/conf/airframes/TUDELFT/tudelft_asctec_freek.xml index a7767b3f53..822c763a53 100644 --- a/conf/airframes/TUDELFT/tudelft_asctec_freek.xml +++ b/conf/airframes/TUDELFT/tudelft_asctec_freek.xml @@ -37,7 +37,7 @@ - + @@ -66,12 +66,12 @@
-
- - - - - +
+ + + + +
diff --git a/conf/airframes/TUDELFT/tudelft_conf.xml b/conf/airframes/TUDELFT/tudelft_conf.xml index be77b2b51c..e128b89773 100644 --- a/conf/airframes/TUDELFT/tudelft_conf.xml +++ b/conf/airframes/TUDELFT/tudelft_conf.xml @@ -205,7 +205,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/TUDELFT/tudelft_rotorcraft_survey_imav2015_competition.xml" settings="settings/rotorcraft_basic.xml settings/control/stabilization_att_int.xml settings/modules/config_asctec_v2.xml settings/control/rotorcraft_guidance.xml" - settings_modules="modules/imu_common.xml modules/gps.xml modules/ahrs_float_mlkf.xml modules/servo_switch.xml modules/gps_ubx_ucenter.xml [modules/nav_survey_rectangle_rotorcraft.xml] [modules/nav_survey_poly_rotorcraft.xml] [modules/geo_mag.xml]" + settings_modules="modules/imu_common.xml modules/gps.xml modules/ahrs_float_mlkf.xml modules/switch_servo.xml modules/gps_ubx_ucenter.xml [modules/nav_survey_rectangle_rotorcraft.xml] [modules/nav_survey_poly_rotorcraft.xml] [modules/geo_mag.xml]" gui_color="#ffffd5c5aead" /> - + diff --git a/conf/airframes/TUDELFT/tudelft_mavtec4.xml b/conf/airframes/TUDELFT/tudelft_mavtec4.xml index 2dd74f49c4..417cd0ed94 100644 --- a/conf/airframes/TUDELFT/tudelft_mavtec4.xml +++ b/conf/airframes/TUDELFT/tudelft_mavtec4.xml @@ -38,7 +38,7 @@ - + @@ -66,12 +66,12 @@
-
- - - - - +
+ + + + +
diff --git a/conf/airframes/TUDELFT/tudelft_mavtec5.xml b/conf/airframes/TUDELFT/tudelft_mavtec5.xml index 5d46257828..3996af8c3d 100644 --- a/conf/airframes/TUDELFT/tudelft_mavtec5.xml +++ b/conf/airframes/TUDELFT/tudelft_mavtec5.xml @@ -37,7 +37,7 @@ - + @@ -69,12 +69,12 @@
-
- - - - - +
+ + + + +
diff --git a/conf/airframes/examples/quadrotor_navgo.xml b/conf/airframes/examples/quadrotor_navgo.xml index 9de6b9263a..03475141f7 100644 --- a/conf/airframes/examples/quadrotor_navgo.xml +++ b/conf/airframes/examples/quadrotor_navgo.xml @@ -3,7 +3,7 @@ - + @@ -231,12 +231,12 @@
-
- - - - - +
+ + + + +
diff --git a/conf/conf_example.xml b/conf/conf_example.xml index 95ec0e5a27..047afc7508 100644 --- a/conf/conf_example.xml +++ b/conf/conf_example.xml @@ -172,7 +172,7 @@ telemetry="telemetry/default_rotorcraft.xml" flight_plan="flight_plans/rotorcraft_basic.xml" settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_guidance.xml settings/control/stabilization_att_int.xml settings/nps.xml" - settings_modules="modules/servo_switch.xml modules/rotorcraft_cam.xml modules/digital_cam.xml modules/nav_survey_rectangle_rotorcraft.xml modules/imu_common.xml modules/gps.xml modules/ahrs_int_cmpl_quat.xml" + settings_modules="modules/switch_servo.xml modules/rotorcraft_cam.xml modules/digital_cam.xml modules/nav_survey_rectangle_rotorcraft.xml modules/imu_common.xml modules/gps.xml modules/ahrs_int_cmpl_quat.xml" gui_color="white" /> - - - - Servo switch - - - - - - - - - - - - - - -
- -
- - - - - - - - -
- diff --git a/conf/modules/switch_servo.xml b/conf/modules/switch_servo.xml new file mode 100644 index 0000000000..77c57dc964 --- /dev/null +++ b/conf/modules/switch_servo.xml @@ -0,0 +1,41 @@ + + + + + Swicht using a Servo + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ diff --git a/conf/modules/switch_uart.xml b/conf/modules/switch_uart.xml index f7863fa398..af22ecbe0d 100644 --- a/conf/modules/switch_uart.xml +++ b/conf/modules/switch_uart.xml @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/sw/airborne/modules/switching/servo_switch.c b/sw/airborne/modules/switching/switch_servo.c similarity index 69% rename from sw/airborne/modules/switching/servo_switch.c rename to sw/airborne/modules/switching/switch_servo.c index 9946d15811..7588d40b83 100644 --- a/sw/airborne/modules/switching/servo_switch.c +++ b/sw/airborne/modules/switching/switch_servo.c @@ -19,27 +19,27 @@ * Boston, MA 02111-1307, USA. */ -#include "switching/servo_switch.h" +#include "switching/switch_servo.h" #include "generated/airframe.h" #include "subsystems/actuators.h" -bool servo_switch_on; +bool switch_servo_on; // One level of macro stack to allow redefinition of the default servo -#define _ServoSwitch(_n, _v) ActuatorSet(_n, _v) -#define ServoSwitch(_n, _v) _ServoSwitch(_n, _v) +#define _SwitchServo(_n, _v) ActuatorSet(_n, _v) +#define SwitchServo(_n, _v) _SwitchServo(_n, _v) -void servo_switch_init(void) +void switch_servo_init(void) { - servo_switch_on = false; - servo_switch_periodic(); + switch_servo_on = false; + switch_servo_periodic(); } -void servo_switch_periodic(void) +void switch_servo_periodic(void) { - if (servo_switch_on == TRUE) { - ServoSwitch(SERVO_SWITCH_SERVO, SERVO_SWITCH_ON_VALUE); + if (switch_servo_on == TRUE) { + SwitchServo(SWITCH_SERVO_SERVO, SWITCH_SERVO_ON_VALUE); } else { - ServoSwitch(SERVO_SWITCH_SERVO, SERVO_SWITCH_OFF_VALUE); + SwitchServo(SWITCH_SERVO_SERVO, SWITCH_SERVO_OFF_VALUE); } } diff --git a/sw/airborne/modules/switching/servo_switch.h b/sw/airborne/modules/switching/switch_servo.h similarity index 62% rename from sw/airborne/modules/switching/servo_switch.h rename to sw/airborne/modules/switching/switch_servo.h index 9704e9af7d..909afb968c 100644 --- a/sw/airborne/modules/switching/servo_switch.h +++ b/sw/airborne/modules/switching/switch_servo.h @@ -19,32 +19,32 @@ * Boston, MA 02111-1307, USA. */ -#ifndef SERVO_SWITCH_H -#define SERVO_SWITCH_H +#ifndef SWITCH_SERVO_H +#define SWITCH_SERVO_H #include "std.h" #include "paparazzi.h" #include "generated/airframe.h" -extern bool servo_switch_on; -extern int16_t servo_switch_value; +extern bool switch_servo_on; +extern int16_t switch_servo_value; -#ifndef SERVO_SWITCH_ON_VALUE -#define SERVO_SWITCH_ON_VALUE 2000 +#ifndef SWITCH_SERVO_ON_VALUE +#define SWITCH_SERVO_ON_VALUE 2000 #endif -#ifndef SERVO_SWITCH_OFF_VALUE -#define SERVO_SWITCH_OFF_VALUE 1000 +#ifndef SWITCH_SERVO_OFF_VALUE +#define SWITCH_SERVO_OFF_VALUE 1000 #endif -#ifndef SERVO_SWITCH_SERVO -#define SERVO_SWITCH_SERVO SWITCH +#ifndef SWITCH_SERVO_SERVO +#define SWITCH_SERVO_SERVO SWITCH #endif -extern void servo_switch_init(void); -extern void servo_switch_periodic(void); +extern void switch_servo_init(void); +extern void switch_servo_periodic(void); -#define ServoSwitchOn() ({ servo_switch_on = true; false; }) -#define ServoSwitchOff() ({ servo_switch_on = false; false; }) +#define SwitchServoOn() ({ switch_servo_on = true; false; }) +#define SwitchServoOff() ({ switch_servo_on = false; false; }) -#endif //SERVO_SWITCH_H +#endif //SWITCH_SERVO_H