Firmware
Public Member Functions | Protected Member Functions | List of all members
vmount::InputTest Class Reference

class InputTest Send a single control command, configured via constructor arguments More...

#include <input_test.h>

Inheritance diagram for vmount::InputTest:
vmount::InputBase

Public Member Functions

 InputTest (float roll_deg, float pitch_deg, float yaw_deg)
 set to a fixed angle
 
bool finished ()
 check whether the test finished, and thus the main thread can quit
 
virtual int update (unsigned int timeout_ms, ControlData **control_data, bool already_active)
 Wait for an input update, with a timeout. More...
 

Protected Member Functions

virtual int update_impl (unsigned int timeout_ms, ControlData **control_data, bool already_active)
 
virtual int initialize ()
 
virtual void print_status ()
 report status to stdout
 
- Protected Member Functions inherited from vmount::InputBase
void control_data_set_lon_lat (double lon, double lat, float altitude, float roll_angle=0.f, float pitch_fixed_angle=-10.f)
 

Additional Inherited Members

- Protected Attributes inherited from vmount::InputBase
ControlData _control_data
 

Detailed Description

class InputTest Send a single control command, configured via constructor arguments

Member Function Documentation

§ update()

int vmount::InputTest::update ( unsigned int  timeout_ms,
ControlData **  control_data,
bool  already_active 
)
virtual

Wait for an input update, with a timeout.

Parameters
timeout_mstimeout in ms
control_dataunchanged on error. On success it is nullptr if no new data is available, otherwise set to an object. If it is set, the returned object will not be changed for subsequent calls to update() that return no new data (in other words: if (some) control_data values change, non-null will be returned).
already_activetrue if the mode was already active last time, false if it was not and "major" change is necessary such as big stick movement for RC.
Returns
0 on success, <0 otherwise

Reimplemented from vmount::InputBase.


The documentation for this class was generated from the following files: