Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
copilot.h
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  */
44 #ifndef COPILOT_H
45 #define COPILOT_H
46 
49 #include "pprz_mutex.h"
50 
51 PPRZ_MUTEX_DECL(copilot_cam_snapshot_mtx);
52 PPRZ_MUTEX_DECL(copilot_cam_payload_mtx);
53 PPRZ_MUTEX_DECL(copilot_status_mtx);
54 
55 struct CameraPayload {
56  float timestamp;
61 };
62 
68  float lens_temp;
69  float array_temp;
70 };
71 
72 struct CopilotStatus {
73  float timestamp;
78 };
79 
80 extern bool send_cam_snapshot;
81 extern bool send_cam_payload;
82 extern bool send_copilot_status;
83 
85 void copilot_init(void);
86 
88 void copilot_periodic(void);
89 
96 
97 #endif /* COPILOT_H */
98 
CameraSnapshot::snapshot_valid
uint8_t snapshot_valid
Definition: copilot.h:67
CameraPayload::timestamp
float timestamp
Definition: copilot.h:56
send_cam_snapshot
bool send_cam_snapshot
Definition: copilot_common.c:47
uint16_t
unsigned short uint16_t
Definition: types.h:16
CopilotStatus::error_code
uint8_t error_code
Definition: copilot.h:77
CopilotStatus::timestamp
float timestamp
Definition: copilot.h:73
CopilotStatus::used_mem
uint8_t used_mem
Definition: copilot.h:74
CopilotStatus::used_disk
uint8_t used_disk
Definition: copilot.h:75
CameraPayload::door_status
uint8_t door_status
Definition: copilot.h:59
copilot_parse_move_wp_dl
void copilot_parse_move_wp_dl(uint8_t *buf)
If MOVE_WP from GCS.
Definition: copilot_fixedwing.c:67
copilot_periodic
void copilot_periodic(void)
Periodic function.
Definition: copilot_common.c:76
send_cam_payload
bool send_cam_payload
Definition: copilot_common.c:48
extra_pprz_dl.h
send_copilot_status
bool send_copilot_status
Definition: copilot_common.c:49
copilot_parse_payload_command_dl
void copilot_parse_payload_command_dl(uint8_t *buf)
Pass through PAYLOAD_COMMAND message and send it as PAYLOAD msg over telemetry.
Definition: copilot_common.c:184
copilot_parse_cam_snapshot_dl
void copilot_parse_cam_snapshot_dl(uint8_t *buf)
Message processing functions.
Definition: copilot_common.c:127
CameraSnapshot::cam_state
uint8_t cam_state
Definition: copilot.h:65
CameraSnapshot
Definition: copilot.h:63
CameraPayload
Definition: copilot.h:55
CopilotStatus::status
uint8_t status
Definition: copilot.h:76
copilot_init
void copilot_init(void)
Init function.
Definition: copilot_common.c:60
uint8_t
unsigned char uint8_t
Definition: types.h:14
CameraPayload::error_code
uint8_t error_code
Definition: copilot.h:60
CameraSnapshot::cam_id
uint16_t cam_id
Definition: copilot.h:64
PPRZ_MUTEX_DECL
PPRZ_MUTEX_DECL(copilot_cam_snapshot_mtx)
CameraSnapshot::lens_temp
float lens_temp
Definition: copilot.h:68
copilot_parse_copilot_status_dl
void copilot_parse_copilot_status_dl(uint8_t *buf)
copy COPILOT_STATUS message and mark it to be sent
Definition: copilot_common.c:165
CameraSnapshot::array_temp
float array_temp
Definition: copilot.h:69
pprz_mutex.h
copilot_parse_cam_payload_dl
void copilot_parse_cam_payload_dl(uint8_t *buf)
copy CAMERA_PAYLOAD message and mark it to be sent
Definition: copilot_common.c:147
CameraPayload::used_mem
uint8_t used_mem
Definition: copilot.h:57
CameraPayload::used_disk
uint8_t used_disk
Definition: copilot.h:58
CameraSnapshot::snapshot_num
uint16_t snapshot_num
Definition: copilot.h:66
CopilotStatus
Definition: copilot.h:72