mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
SRV_Channel: added RobotisServo protocol support
This commit is contained in:
parent
28970ed176
commit
d72f6598e0
@ -18,6 +18,7 @@
|
|||||||
#include <AP_RCMapper/AP_RCMapper.h>
|
#include <AP_RCMapper/AP_RCMapper.h>
|
||||||
#include <AP_Common/Bitmask.h>
|
#include <AP_Common/Bitmask.h>
|
||||||
#include <AP_Volz_Protocol/AP_Volz_Protocol.h>
|
#include <AP_Volz_Protocol/AP_Volz_Protocol.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>
|
||||||
|
|
||||||
@ -480,6 +481,10 @@ private:
|
|||||||
AP_SBusOut sbus;
|
AP_SBusOut sbus;
|
||||||
static AP_SBusOut *sbus_ptr;
|
static AP_SBusOut *sbus_ptr;
|
||||||
|
|
||||||
|
// support for Robotis servo protocol
|
||||||
|
AP_RobotisServo robotis;
|
||||||
|
static AP_RobotisServo *robotis_ptr;
|
||||||
|
|
||||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||||
// support for BLHeli protocol
|
// support for BLHeli protocol
|
||||||
AP_BLHeli blheli;
|
AP_BLHeli blheli;
|
||||||
|
@ -33,6 +33,7 @@ SRV_Channel *SRV_Channels::channels;
|
|||||||
SRV_Channels *SRV_Channels::instance;
|
SRV_Channels *SRV_Channels::instance;
|
||||||
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;
|
||||||
|
|
||||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||||
AP_BLHeli *SRV_Channels::blheli_ptr;
|
AP_BLHeli *SRV_Channels::blheli_ptr;
|
||||||
@ -141,6 +142,10 @@ const AP_Param::GroupInfo SRV_Channels::var_info[] = {
|
|||||||
AP_SUBGROUPINFO(blheli, "_BLH_", 21, SRV_Channels, AP_BLHeli),
|
AP_SUBGROUPINFO(blheli, "_BLH_", 21, SRV_Channels, AP_BLHeli),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @Group: _ROB_
|
||||||
|
// @Path: ../AP_RobotisServo/AP_RobotisServo.cpp
|
||||||
|
AP_SUBGROUPINFO(robotis, "_ROB_", 22, SRV_Channels, AP_RobotisServo),
|
||||||
|
|
||||||
AP_GROUPEND
|
AP_GROUPEND
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -162,6 +167,7 @@ SRV_Channels::SRV_Channels(void)
|
|||||||
|
|
||||||
volz_ptr = &volz;
|
volz_ptr = &volz;
|
||||||
sbus_ptr = &sbus;
|
sbus_ptr = &sbus;
|
||||||
|
robotis_ptr = &robotis;
|
||||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||||
blheli_ptr = &blheli;
|
blheli_ptr = &blheli;
|
||||||
#endif
|
#endif
|
||||||
@ -228,6 +234,9 @@ void SRV_Channels::push()
|
|||||||
// give sbus library a chance to update
|
// give sbus library a chance to update
|
||||||
sbus_ptr->update();
|
sbus_ptr->update();
|
||||||
|
|
||||||
|
// give robotis library a chance to update
|
||||||
|
robotis_ptr->update();
|
||||||
|
|
||||||
#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