Commit
- actuators are now in signed int16 (need to check size again) (int32 ?) - servo_switch module replaces booz_drop - booz_pwm is now handled by actuators_direct
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
/* | ||
* $Id: $ | ||
* | ||
* Copyright (C) 2010 Flixr | ||
* | ||
* This file is part of paparazzi. | ||
|
@@ -23,10 +21,9 @@ | |
|
||
#include "servo_switch/servo_switch.h" | ||
#include "generated/airframe.h" | ||
#include "actuators.h" | ||
#include "firmwares/rotorcraft/commands.h" | ||
|
||
bool_t servo_switch_on; | ||
int16_t servo_switch_value; | ||
|
||
void servo_switch_init(void) { | ||
servo_switch_on = FALSE; | ||
|
@@ -35,7 +32,7 @@ void servo_switch_init(void) { | |
|
||
void servo_switch_periodic(void) { | ||
if (servo_switch_on == TRUE) | ||
SetServo(SERVO_SWITCH_SERVO, SERVO_SWITCH_ON_VALUE) | ||
commands[SERVO_SWITCH_SERVO] = SERVO_SWITCH_ON_VALUE; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gautierhattenberger
Author
Member
|
||
else | ||
SetServo(SERVO_SWITCH_SERVO, SERVO_SWITCH_OFF_VALUE) | ||
commands[SERVO_SWITCH_SERVO] = SERVO_SWITCH_OFF_VALUE; | ||
} |
Why change the servo_switch module to go via commands? It was meant to set a servo directly for ease of setup (without the need to define a command).
I don't see how going via commands is beneficial here, even if you change the command from somewhere else (e.g. radio_control), it would still be overwritten in the servo_switch_periodic.
Maybe make a separate command_switch module? Or does setting servos directly not work anymore now?