mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
SRV_Channel: add FETtec support
This commit is contained in:
parent
e9df0d5140
commit
f1ac606f98
@ -21,6 +21,7 @@
|
|||||||
#include <AP_RobotisServo/AP_RobotisServo.h>
|
#include <AP_RobotisServo/AP_RobotisServo.h>
|
||||||
#include <AP_SBusOut/AP_SBusOut.h>
|
#include <AP_SBusOut/AP_SBusOut.h>
|
||||||
#include <AP_BLHeli/AP_BLHeli.h>
|
#include <AP_BLHeli/AP_BLHeli.h>
|
||||||
|
#include <AP_FETtecOneWire/AP_FETtecOneWire.h>
|
||||||
|
|
||||||
#ifndef NUM_SERVO_CHANNELS
|
#ifndef NUM_SERVO_CHANNELS
|
||||||
#if defined(HAL_BUILD_AP_PERIPH) && defined(HAL_PWM_COUNT)
|
#if defined(HAL_BUILD_AP_PERIPH) && defined(HAL_PWM_COUNT)
|
||||||
@ -562,6 +563,11 @@ private:
|
|||||||
AP_BLHeli blheli;
|
AP_BLHeli blheli;
|
||||||
static AP_BLHeli *blheli_ptr;
|
static AP_BLHeli *blheli_ptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
|
AP_FETtecOneWire fetteconwire;
|
||||||
|
static AP_FETtecOneWire *fetteconwire_ptr;
|
||||||
|
#endif // HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
#endif // HAL_BUILD_AP_PERIPH
|
#endif // HAL_BUILD_AP_PERIPH
|
||||||
|
|
||||||
static uint16_t disabled_mask;
|
static uint16_t disabled_mask;
|
||||||
|
@ -47,6 +47,9 @@ SRV_Channels *SRV_Channels::_singleton;
|
|||||||
AP_Volz_Protocol *SRV_Channels::volz_ptr;
|
AP_Volz_Protocol *SRV_Channels::volz_ptr;
|
||||||
AP_SBusOut *SRV_Channels::sbus_ptr;
|
AP_SBusOut *SRV_Channels::sbus_ptr;
|
||||||
AP_RobotisServo *SRV_Channels::robotis_ptr;
|
AP_RobotisServo *SRV_Channels::robotis_ptr;
|
||||||
|
#if HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
|
AP_FETtecOneWire *SRV_Channels::fetteconwire_ptr;
|
||||||
|
#endif
|
||||||
#endif // HAL_BUILD_AP_PERIPH
|
#endif // HAL_BUILD_AP_PERIPH
|
||||||
|
|
||||||
uint16_t SRV_Channels::override_counter[NUM_SERVO_CHANNELS];
|
uint16_t SRV_Channels::override_counter[NUM_SERVO_CHANNELS];
|
||||||
@ -197,6 +200,13 @@ const AP_Param::GroupInfo SRV_Channels::var_info[] = {
|
|||||||
// @Group: _ROB_
|
// @Group: _ROB_
|
||||||
// @Path: ../AP_RobotisServo/AP_RobotisServo.cpp
|
// @Path: ../AP_RobotisServo/AP_RobotisServo.cpp
|
||||||
AP_SUBGROUPINFO(robotis, "_ROB_", 22, SRV_Channels, AP_RobotisServo),
|
AP_SUBGROUPINFO(robotis, "_ROB_", 22, SRV_Channels, AP_RobotisServo),
|
||||||
|
|
||||||
|
#if HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
|
// @Group: _FTW_
|
||||||
|
// @Path: ../AP_FETtecOneWire/AP_FETtecOneWire.cpp
|
||||||
|
AP_SUBGROUPINFO(fetteconwire, "_FTW_", 25, SRV_Channels, AP_FETtecOneWire),
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // HAL_BUILD_AP_PERIPH
|
#endif // HAL_BUILD_AP_PERIPH
|
||||||
|
|
||||||
// @Param: _DSHOT_RATE
|
// @Param: _DSHOT_RATE
|
||||||
@ -236,6 +246,9 @@ SRV_Channels::SRV_Channels(void)
|
|||||||
volz_ptr = &volz;
|
volz_ptr = &volz;
|
||||||
sbus_ptr = &sbus;
|
sbus_ptr = &sbus;
|
||||||
robotis_ptr = &robotis;
|
robotis_ptr = &robotis;
|
||||||
|
#if HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
|
fetteconwire_ptr = &fetteconwire;
|
||||||
|
#endif
|
||||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||||
blheli_ptr = &blheli;
|
blheli_ptr = &blheli;
|
||||||
#endif
|
#endif
|
||||||
@ -344,6 +357,10 @@ void SRV_Channels::push()
|
|||||||
// give robotis library a chance to update
|
// give robotis library a chance to update
|
||||||
robotis_ptr->update();
|
robotis_ptr->update();
|
||||||
|
|
||||||
|
#if HAL_AP_FETTEC_ONEWIRE_ENABLED
|
||||||
|
fetteconwire_ptr->update();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||||
// give blheli telemetry a chance to update
|
// give blheli telemetry a chance to update
|
||||||
blheli_ptr->update_telemetry();
|
blheli_ptr->update_telemetry();
|
||||||
|
Loading…
Reference in New Issue
Block a user