move SetServo makro to from setup_actuators actuators.h

This commit is contained in:
Felix Ruess
2010-09-25 12:39:22 +00:00
parent 7749ca640e
commit 589f04edd2
2 changed files with 6 additions and 5 deletions
+6 -1
View File
@@ -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 */
-4
View File
@@ -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);