AP_HAL_ChibiOS: enable DroneCAN scripting for CubeOrangePlus#31938
AP_HAL_ChibiOS: enable DroneCAN scripting for CubeOrangePlus#31938jvanderploeg wants to merge 1 commit into
Conversation
Adds HAL_ENABLE_DRONECAN_DRIVERS define to enable DroneCAN scripting bindings for Lua on CubeOrangePlus hardware. This allows Lua scripts to access DroneCAN functionality on this board.
|
(1) this feature is already built into that board and (2) if we've left something out it's usually for a good reason. Closing this one now. |
|
Hi @peterbarker - where is this feature already built in? Without adding this I'm unable to get CAN data via Lua scripting, specifically for a CAN enabled fuel tank. It wouldn't seem like this change should make much of a difference, but perhaps it would be better to add as a parameter instead? |
|
@jvanderploeg CAN is enabled on the CubeOrangePlus as CANx pin types are defined in the hwdef. That causes chibios_hwdef.py to define CAN data from Lua works for me on the same board. There are some restrictions on what you can access though. IIRC only 11-bit CAN messages will be forwarded to Lua if you are also using the standard DroneCAN handling. Access to DroneCAN messages needs this PR (merged into master May 2025). |
|
@rob-clarke - thanks for the response. I just pulled the latest master and compiled, and my Lua scripts appear to be working as expected. I guess I missed my opportunity to contribute when I was looking at this last year, although I thought I had forked after that PR you mention and it wasn't working then. Not sure what happened, but sorry for the confusion and thanks for the help |
Adds HAL_ENABLE_DRONECAN_DRIVERS define to enable DroneCAN scripting bindings for Lua on CubeOrangePlus hardware. This allows Lua scripts to access DroneCAN functionality on this board.