mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
bring back switch_pos_t
This commit is contained in:
@@ -189,8 +189,8 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Get switch position for specified function.
|
* Get switch position for specified function.
|
||||||
*/
|
*/
|
||||||
uint8_t get_rc_sw3pos_position(uint8_t func, float on_th, bool on_inv, float mid_th, bool mid_inv);
|
switch_pos_t get_rc_sw3pos_position(uint8_t func, float on_th, bool on_inv, float mid_th, bool mid_inv);
|
||||||
uint8_t get_rc_sw2pos_position(uint8_t func, float on_th, bool on_inv);
|
switch_pos_t get_rc_sw2pos_position(uint8_t func, float on_th, bool on_inv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update paramters from RC channels if the functionality is activated and the
|
* Update paramters from RC channels if the functionality is activated and the
|
||||||
@@ -1666,7 +1666,7 @@ Sensors::get_rc_value(uint8_t func, float min_value, float max_value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
switch_pos_t
|
||||||
Sensors::get_rc_sw3pos_position(uint8_t func, float on_th, bool on_inv, float mid_th, bool mid_inv)
|
Sensors::get_rc_sw3pos_position(uint8_t func, float on_th, bool on_inv, float mid_th, bool mid_inv)
|
||||||
{
|
{
|
||||||
if (_rc.function[func] >= 0) {
|
if (_rc.function[func] >= 0) {
|
||||||
@@ -1687,7 +1687,7 @@ Sensors::get_rc_sw3pos_position(uint8_t func, float on_th, bool on_inv, float mi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
switch_pos_t
|
||||||
Sensors::get_rc_sw2pos_position(uint8_t func, float on_th, bool on_inv)
|
Sensors::get_rc_sw2pos_position(uint8_t func, float on_th, bool on_inv)
|
||||||
{
|
{
|
||||||
if (_rc.function[func] >= 0) {
|
if (_rc.function[func] >= 0) {
|
||||||
|
|||||||
@@ -314,5 +314,6 @@ typedef uint8_t arming_state_t;
|
|||||||
typedef uint8_t main_state_t;
|
typedef uint8_t main_state_t;
|
||||||
typedef uint8_t hil_state_t;
|
typedef uint8_t hil_state_t;
|
||||||
typedef uint8_t navigation_state_t;
|
typedef uint8_t navigation_state_t;
|
||||||
|
typedef uint8_t switch_pos_t;
|
||||||
|
|
||||||
#endif /* _UORB_UORB_H */
|
#endif /* _UORB_UORB_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user