Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators_t4_arch.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 The Paparazzi Team
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
27#include <stdio.h>
28#include "modules/actuators/actuators_t4_arch.h"
30
31#include "modules/core/abi.h"
32
33#ifndef ACTUATORS_T4_REFRESH_FREQUENCY
34#define ACTUATORS_T4_REFRESH_FREQUENCY 200;
35#endif
36
37#ifndef ACTUATORS_T4_NUM_MAX_SERVOS
38#define ACTUATORS_T4_NUM_MAX_SERVOS 12
39#endif
40
41#ifndef ACTUATORS_T4_NUM_MAX_ESCS
42#define ACTUATORS_T4_NUM_MAX_ESCS 4
43#endif
44
49
51
54
56 /* Arm ESCs and servos by default, Note that only armed servo directly provide force needed for e.g. landing gear */
57 //TODO: Add option set or check is disarmed / is armed as a default value per actuator
60
61 /* comm_refresh_frequency [Hz] */
63}
64
66 /*
67 For developers wanting to improve here note that:
68 DRIVER_NO: <servo no="DRIVER_NO"/> and SERVO_IDX: defined order in AF config
69 actuators_t4_values[driver_no] = actuators[servo_idx].val;
70 get_servo_min_T4(_idx);
71 get_servo_max_T4(_idx);
72 get_servo_idx_T4(_idx_driver); returns servo idx
73 */
74
75 /* Yes, indeed it could well be that we waste two bytes here, feel free to improve
76 Servos connected to pin outputs 1~10 (Serial Bus),
77 Note that connector 0 does not exist on a T4 actuators board,
78 indeed we waste two bytes here, feel free to improve.
79 */
90
91 /* PWM Servos (or ESCs) connected to pin outputs 11~12 (PWM) */
94
95 /* DShot capable ESC's connected to pin outputs 13~16 (DShot) */
100
101 // Send ABI message
103}
Main include for ABI (AirBorneInterface).
Uses a T4 Actuators Board as fly by wire system. This Board can control serial bus servos,...
int32_t actuators_t4_values[ACTUATORS_T4_NB]
Print the configuration variables from the header.
void actuators_t4_commit(void)
float actuators_t4_extra_data_out_local[255]
struct ActuatorsT4Out actuators_t4_out_local
#define ACTUATORS_T4_NUM_MAX_ESCS
#define ACTUATORS_T4_NUM_MAX_SERVOS
#define ACTUATORS_T4_REFRESH_FREQUENCY
void actuators_t4_arch_init(void)
Arch dependent init file.
#define ACTUATORS_T4_NB
uint16_t foo
Definition main_demo5.c:58
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.