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 "modules/actuators/actuators_t4_arch.h"
29
30#include "modules/core/abi.h"
31
32#ifndef ACTUATORS_T4_REFRESH_FREQUENCY
33#define ACTUATORS_T4_REFRESH_FREQUENCY 200;
34#endif
35
36#ifndef ACTUATORS_T4_NUM_MAX_SERVOS
37#define ACTUATORS_T4_NUM_MAX_SERVOS 12
38#endif
39
40#ifndef ACTUATORS_T4_NUM_MAX_ESCS
41#define ACTUATORS_T4_NUM_MAX_ESCS 4
42#endif
43
48
50
53
55 /* Arm ESCs and servos by default, Note that only armed servo directly provide force needed for e.g. landing gear */
56 //TODO: Add option set or check is disarmed / is armed as a default value per actuator
59
60 /* comm_refresh_frequency [Hz] */
62}
63
65 /*
66 For developers wanting to improve here note that:
67 DRIVER_NO: <servo no="DRIVER_NO"/> and SERVO_IDX: defined order in AF config
68 actuators_t4_values[driver_no] = actuators[servo_idx].val;
69 get_servo_min_T4(_idx);
70 get_servo_max_T4(_idx);
71 get_servo_idx_T4(_idx_driver); returns servo idx
72 */
73
74 /* Yes, indeed it could well be that we waste two bytes here, feel free to improve
75 Servos connected to pin outputs 1~10 (Serial Bus),
76 Note that connector 0 does not exist on a T4 actuators board,
77 indeed we waste two bytes here, feel free to improve.
78 */
89
90 /* PWM Servos (or ESCs) connected to pin outputs 11~12 (PWM) */
93
94 /* DShot capable ESC's connected to pin outputs 13~16 (DShot) */
99
100 // Send ABI message
102}
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.