Browse Source

SRV_Channel: added support for Piccolo CAN ESCs

c415-sdk
Oliver Walters 5 years ago committed by Andrew Tridgell
parent
commit
431b07bba0
  1. 11
      libraries/SRV_Channel/SRV_Channels.cpp

11
libraries/SRV_Channel/SRV_Channels.cpp

@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
#include <AP_KDECAN/AP_KDECAN.h>
#endif
#include <AP_ToshibaCAN/AP_ToshibaCAN.h>
#include <AP_PiccoloCAN/AP_PiccoloCAN.h>
#endif
extern const AP_HAL::HAL& hal;
@ -281,6 +282,16 @@ void SRV_Channels::push() @@ -281,6 +282,16 @@ void SRV_Channels::push()
ap_tcan->update();
break;
}
#if HAL_PICCOLO_CAN_ENABLE
case AP_BoardConfig_CAN::Protocol_Type_PiccoloCAN: {
AP_PiccoloCAN *ap_pcan = AP_PiccoloCAN::get_pcan(i);
if (ap_pcan == nullptr) {
continue;
}
ap_pcan->update();
break;
}
#endif
case AP_BoardConfig_CAN::Protocol_Type_None:
default:
break;

Loading…
Cancel
Save