Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rc_intermcu.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Gautier Hattenberger <gautier.hattenberger@enac.fr>
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, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
29#include "pprzlink/intermcu_msg.h"
30#include "modules/core/abi.h"
31
37
39
41{
45 for (int i = 0; i < RC_IMCU_NB_CHANNEL; i++) {
46 rc_intermcu.values[i] = 0;
47 }
48}
49
50
52{
54 //rc_intermcu.status = DL_IMCU_RADIO_COMMANDS_status(imcu_msg_buf); TODO change status on FBW side to have RC status here
55 for (uint8_t i = 0; i < size; i++) {
57 radio_control.values[i] = rc_intermcu.values[i]; // for now a simple copy
58 }
59
65}
66
74
Main include for ABI (AirBorneInterface).
#define RADIO_CONTROL_INTERMCU_ID
uint16_t foo
Definition main_demo5.c:58
struct RadioControl radio_control
Generic interface for radio control modules.
uint8_t time_since_last_frame
#define RC_REALLY_LOST
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
uint8_t radio_ok_cpt
uint8_t frame_cpt
#define RC_OK
uint8_t nb_channel
void rc_intermcu_init(void)
RC init function.
Definition rc_intermcu.c:40
uint8_t frame_rate
Definition rc_intermcu.c:35
void rc_intermcu_parse_fbw_status(uint8_t *buf)
Definition rc_intermcu.c:67
static struct _rc_intermcu rc_intermcu
Definition rc_intermcu.c:38
uint8_t status
Definition rc_intermcu.c:34
void rc_intermcu_parse_msg(uint8_t *buf)
Decode intermcu message to get rc values and FBW status for RC status and frame rate TODO make a sing...
Definition rc_intermcu.c:51
uint16_t values[RC_IMCU_NB_CHANNEL]
Definition rc_intermcu.c:33
Radio control input via intermcu.
#define RC_IMCU_NB_CHANNEL
Definition rc_intermcu.h:45
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.