Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
95 
96 #endif /* COPILOT_H */
97 
void copilot_periodic(void)
Periodic function.
unsigned short uint16_t
Definition: types.h:16
uint8_t used_disk
Definition: copilot.h:75
Extra datalink and telemetry using PPRZ protocol.
uint8_t used_mem
Definition: copilot.h:74
uint8_t snapshot_valid
Definition: copilot.h:67
float timestamp
Definition: copilot.h:56
bool send_cam_snapshot
bool send_cam_payload
void copilot_parse_move_wp_dl(uint8_t *buf)
If MOVE_WP from GCS.
float timestamp
Definition: copilot.h:73
bool send_copilot_status
uint8_t cam_state
Definition: copilot.h:65
uint8_t error_code
Definition: copilot.h:60
void copilot_init(void)
Init function.
void copilot_parse_cam_snapshot_dl(uint8_t *buf)
Message processing functions.
uint8_t used_mem
Definition: copilot.h:57
uint16_t cam_id
Definition: copilot.h:64
uint8_t status
Definition: copilot.h:76
Utility functions and macros to abstract some RTOS functionalities such as mutexes.
unsigned char uint8_t
Definition: types.h:14
PPRZ_MUTEX_DECL(copilot_cam_snapshot_mtx)
float array_temp
Definition: copilot.h:69
uint16_t snapshot_num
Definition: copilot.h:66
float lens_temp
Definition: copilot.h:68
uint8_t error_code
Definition: copilot.h:77
void copilot_parse_copilot_status_dl(uint8_t *buf)
copy COPILOT_STATUS message and mark it to be sent
uint8_t used_disk
Definition: copilot.h:58
void copilot_parse_cam_payload_dl(uint8_t *buf)
copy CAMERA_PAYLOAD message and mark it to be sent
uint8_t door_status
Definition: copilot.h:59