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
copilot_common.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 2017 Michal Podhradsky <http://github.com/podhrmic>
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 *
21 */
46
50
54
58
74
117
143
161
179
185{
186#if FORWARD_PAYLOAD
187MESSAGE("Forwarding PAYLOAD_COMMAND messages.")
188 // Check if message was for us
189 if (DL_PAYLOAD_COMMAND_ac_id(buf) == AC_ID) {
191
192 if (buf == extra_dl_buffer) {
193 // Message came from extra_dl, forward to GCS via telemetry
196 }
197
198 if (buf == dl_buffer) {
199 // Message came from GCS/Telemetry, forward to extra_dl
202 }
203 }
204#endif /* FORWARD_PAYLOAD */
205}
int pprz_mtx_unlock(pprz_mutex_t *mtx)
int pprz_mtx_init(pprz_mutex_t *mtx)
int pprz_mtx_lock(pprz_mutex_t *mtx)
Mission Computer module, interfacing the mission computer (also known as Copilot),...
float lens_temp
Definition copilot.h:69
uint8_t door_status
Definition copilot.h:60
uint16_t snapshot_num
Definition copilot.h:67
uint8_t used_disk
Definition copilot.h:76
uint8_t used_disk
Definition copilot.h:59
uint8_t snapshot_valid
Definition copilot.h:68
uint8_t cam_state
Definition copilot.h:66
float array_temp
Definition copilot.h:70
uint8_t used_mem
Definition copilot.h:75
uint8_t error_code
Definition copilot.h:78
uint8_t used_mem
Definition copilot.h:58
uint8_t error_code
Definition copilot.h:61
uint8_t status
Definition copilot.h:77
float timestamp
Definition copilot.h:57
uint16_t cam_id
Definition copilot.h:65
float timestamp
Definition copilot.h:74
struct CameraPayload cam_payload
void copilot_init(void)
Init function.
pprz_mutex_t copilot_cam_snapshot_mtx
struct CopilotStatus copilot_status
void copilot_parse_cam_snapshot_dl(uint8_t *buf)
copy CAMERA_SNAPSHOT message and mark it to be sent
pprz_mutex_t copilot_status_mtx
bool send_cam_payload
pprz_mutex_t copilot_cam_payload_mtx
void copilot_parse_cam_payload_dl(uint8_t *buf)
copy CAMERA_PAYLOAD message and mark it to be sent
bool send_cam_snapshot
void copilot_parse_payload_command_dl(uint8_t *buf)
Pass through PAYLOAD_COMMAND message and send it as PAYLOAD msg over telemetry.
struct CameraSnapshot cam_snapshot
void copilot_parse_copilot_status_dl(uint8_t *buf)
copy COPILOT_STATUS message and mark it to be sent
bool send_copilot_status
void copilot_periodic(void)
Periodic function.
struct pprz_transport extra_pprz_tp
uint8_t extra_dl_buffer[MSG_SIZE]
uint8_t dl_buffer[MSG_SIZE]
Definition main_demo5.c:63
uint16_t foo
Definition main_demo5.c:58
Periodic telemetry system header (includes downlink utility and generated code).
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.