diff --git a/sw/airborne/actuators.h b/sw/airborne/actuators.h index 54eb473582..1908caeccf 100644 --- a/sw/airborne/actuators.h +++ b/sw/airborne/actuators.h @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with paparazzi; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Boston, MA 02111-1307, USA. * */ @@ -43,6 +43,11 @@ extern uint16_t actuators[SERVOS_NB]; #include ACTUATORS +#define SetServo(x, v) { \ + Actuator(x) = SERVOS_TICS_OF_USEC(ChopServo(v,700,2400)); \ + actuators[x] = v; \ + } + #endif /* ACTUATORS */ #endif /* ACTUATORS_H */ diff --git a/sw/airborne/setup_actuators.c b/sw/airborne/setup_actuators.c index 635929ded7..c9c2299c87 100644 --- a/sw/airborne/setup_actuators.c +++ b/sw/airborne/setup_actuators.c @@ -15,10 +15,6 @@ #define IdOfMsg(x) (x[1]) -#define SetServo(x, v) { \ - Actuator(x) = SERVOS_TICS_OF_USEC(ChopServo(v,700,2400)); \ - actuators[x] = v; \ - } void dl_parse_msg( void ) { uint8_t msg_id = IdOfMsg(dl_buffer);