mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 17:49:49 +08:00
move SetServo makro to from setup_actuators actuators.h
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user