Paparazzi UAS  v7.0_unstable
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 
float lens_temp
Definition: copilot.h:68
uint8_t door_status
Definition: copilot.h:59
uint16_t snapshot_num
Definition: copilot.h:66
void copilot_init(void)
Init function.
void copilot_parse_cam_snapshot_dl(uint8_t *buf)
Message processing functions.
uint8_t used_disk
Definition: copilot.h:75
bool send_cam_payload
void copilot_parse_cam_payload_dl(uint8_t *buf)
copy CAMERA_PAYLOAD message and mark it to be sent
bool send_cam_snapshot
uint8_t used_disk
Definition: copilot.h:58
uint8_t snapshot_valid
Definition: copilot.h:67
void copilot_parse_payload_command_dl(uint8_t *buf)
Pass through PAYLOAD_COMMAND message and send it as PAYLOAD msg over telemetry.
void copilot_parse_copilot_status_dl(uint8_t *buf)
copy COPILOT_STATUS message and mark it to be sent
uint8_t cam_state
Definition: copilot.h:65
float array_temp
Definition: copilot.h:69
uint8_t used_mem
Definition: copilot.h:74
uint8_t error_code
Definition: copilot.h:77
uint8_t used_mem
Definition: copilot.h:57
uint8_t error_code
Definition: copilot.h:60
uint8_t status
Definition: copilot.h:76
void copilot_parse_move_wp_dl(uint8_t *buf)
If MOVE_WP from GCS.
float timestamp
Definition: copilot.h:56
PPRZ_MUTEX_DECL(copilot_cam_snapshot_mtx)
bool send_copilot_status
uint16_t cam_id
Definition: copilot.h:64
float timestamp
Definition: copilot.h:73
void copilot_periodic(void)
Periodic function.
Extra datalink and telemetry using PPRZ protocol.
Utility functions and macros to abstract some RTOS functionalities such as mutexes.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98