vmount: refactor to auto-select between all inputs

It is not convenient having to change a parameter to change a gimbal
from RC input to mavlink input mode or back. This refactor changes the
behaviour to use whatever is available, RC or mavlink commands.

Once a mavlink command is followed, control can be taken back using RC,
however, this requires a clear stick change.
This commit is contained in:
Julian Oes
2017-04-10 15:13:06 +02:00
committed by Beat Küng
parent 809fec8c05
commit caf69b290a
10 changed files with 193 additions and 180 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2016 PX4 Development Team. All rights reserved.
* Copyright (c) 2016-2017 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -57,7 +57,7 @@ bool InputTest::finished()
return true; /* only a single-shot test (for now) */
}
int InputTest::update(unsigned int timeout_ms, ControlData **control_data)
int InputTest::update(unsigned int timeout_ms, ControlData **control_data, bool already_active)
{
//we directly override the update() here, since we don't need the initialization from the base class