VSM C++ SDK
Vehicle Specific Modules SDK
repeat_servo_action.h
1 // Copyright (c) 2016, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
8 #ifndef _REPEAT_SERVO_ACTION_H_
9 #define _REPEAT_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 Repeat_servo_action: public Action {
21 
22 public:
28  Repeat_servo_action(const mavlink::ugcs::Pld_mission_item_ex& item) :
29  Action(Type::REPEAT_SERVO),
30  servo_id(item->param1),
31  pwm(item->param2),
32  count(item->param3),
33  period(item->param4)
34  {
35  ASSERT(item->command == mavlink::MAV_CMD::MAV_CMD_DO_REPEAT_SERVO);
36  }
37 
38  int servo_id;
39  int pwm;
40  int count;
41  int period;
42 };
43 
45 template<>
49 };
50 
51 } /* namespace vsm */
52 } /* namespace ugcs */
53 
54 #endif /* _REPEAT_SERVO_ACTION_H_*/
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27
Repeat servo movement between given PWM and 1500.
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
Repeat_servo_action type
Real type.
Definition: repeat_servo_action.h:48
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25
Set_servo action.
Definition: repeat_servo_action.h:19