PX4 Firmware
PX4 Autopilot Software http://px4.io
manual_control_setpoint.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright (C) 2013-2016 PX4 Development Team. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name PX4 nor the names of its contributors may be
16  * used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  ****************************************************************************/
33 
34 /* Auto-generated by genmsg_cpp from file manual_control_setpoint.msg */
35 
36 
37 #pragma once
38 
39 
40 #include <uORB/uORB.h>
41 
42 
43 #ifndef __cplusplus
44 #define MANUAL_CONTROL_SETPOINT_SWITCH_POS_NONE 0
45 #define MANUAL_CONTROL_SETPOINT_SWITCH_POS_ON 1
46 #define MANUAL_CONTROL_SETPOINT_SWITCH_POS_MIDDLE 2
47 #define MANUAL_CONTROL_SETPOINT_SWITCH_POS_OFF 3
48 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_NONE 0
49 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_1 1
50 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_2 2
51 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_3 3
52 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_4 4
53 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_5 5
54 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_6 6
55 #define MANUAL_CONTROL_SETPOINT_MODE_SLOT_NUM 6
56 #define MANUAL_CONTROL_SETPOINT_SOURCE_RC 1
57 #define MANUAL_CONTROL_SETPOINT_SOURCE_MAVLINK_0 2
58 #define MANUAL_CONTROL_SETPOINT_SOURCE_MAVLINK_1 3
59 #define MANUAL_CONTROL_SETPOINT_SOURCE_MAVLINK_2 4
60 #define MANUAL_CONTROL_SETPOINT_SOURCE_MAVLINK_3 5
61 
62 #endif
63 
64 
65 #ifdef __cplusplus
67 #else
69 #endif
70  uint64_t timestamp;
71  float x;
72  float y;
73  float z;
74  float r;
75  float flaps;
76  float aux1;
77  float aux2;
78  float aux3;
79  float aux4;
80  float aux5;
81  float aux6;
82  uint8_t mode_switch;
83  uint8_t return_switch;
85  uint8_t posctl_switch;
86  uint8_t loiter_switch;
87  uint8_t acro_switch;
88  uint8_t offboard_switch;
89  uint8_t kill_switch;
90  uint8_t arm_switch;
92  uint8_t gear_switch;
93  uint8_t mode_slot;
94  uint8_t data_source;
95  uint8_t stab_switch;
96  uint8_t man_switch;
97  uint8_t _padding0[5]; // required for logger
98 
99 
100 #ifdef __cplusplus
101  static constexpr uint8_t SWITCH_POS_NONE = 0;
102  static constexpr uint8_t SWITCH_POS_ON = 1;
103  static constexpr uint8_t SWITCH_POS_MIDDLE = 2;
104  static constexpr uint8_t SWITCH_POS_OFF = 3;
105  static constexpr uint8_t MODE_SLOT_NONE = 0;
106  static constexpr uint8_t MODE_SLOT_1 = 1;
107  static constexpr uint8_t MODE_SLOT_2 = 2;
108  static constexpr uint8_t MODE_SLOT_3 = 3;
109  static constexpr uint8_t MODE_SLOT_4 = 4;
110  static constexpr uint8_t MODE_SLOT_5 = 5;
111  static constexpr uint8_t MODE_SLOT_6 = 6;
112  static constexpr uint8_t MODE_SLOT_NUM = 6;
113  static constexpr uint8_t SOURCE_RC = 1;
114  static constexpr uint8_t SOURCE_MAVLINK_0 = 2;
115  static constexpr uint8_t SOURCE_MAVLINK_1 = 3;
116  static constexpr uint8_t SOURCE_MAVLINK_2 = 4;
117  static constexpr uint8_t SOURCE_MAVLINK_3 = 5;
118 
119 #endif
120 };
121 
122 /* register this as object request broker structure */
123 ORB_DECLARE(manual_control_setpoint);
124 
125 
126 #ifdef __cplusplus
127 void print_message(const manual_control_setpoint_s& message);
128 #endif
API for the uORB lightweight object broker.
Definition: I2C.hpp:51
ORB_DECLARE(manual_control_setpoint)