VSM C++ SDK
Vehicle Specific Modules SDK
set_servo_action.h
Go to the documentation of this file.
1 // Copyright (c) 2016, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
8 #ifndef _SET_SERVO_ACTION_H_
9 #define _SET_SERVO_ACTION_H_
10 
11 #include <ugcs/vsm/action.h>
12 #include <ugcs/vsm/mavlink.h>
13 
14 namespace ugcs {
15 namespace vsm {
16 
19 class Set_servo_action: public Action {
21 
22 public:
28  Set_servo_action(const mavlink::ugcs::Pld_mission_item_ex& item) :
29  Action(Type::SET_SERVO),
30  servo_id(item->param1),
31  pwm(item->param2)
32  {
33  ASSERT(item->command == mavlink::MAV_CMD::MAV_CMD_DO_SET_SERVO);
34  }
35 
36  int servo_id;
37  int pwm;
38 };
39 
41 template<>
45 };
46 
47 } /* namespace vsm */
48 } /* namespace ugcs */
49 
50 #endif /* _SET_SERVO_ACTION_H_*/
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27
Set_servo action.
Definition: set_servo_action.h:19
Type
Types of vehicle actions as part of task (mission).
Definition: action.h:30
Generic action.
Definition: action.h:22
#define ASSERT(x)
No action in release.
Definition: debug.h:68
Generic action.
Map Action type enum value to specific Action type class.
Definition: action.h:117
Set_servo_action type
Real type.
Definition: set_servo_action.h:44
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25