autosportlabs / RaceCapture-Pro_firmware

Firmware for RaceCapture-Pro Data Acquisition, control and Telemetry system for motorsports
GNU General Public License v3.0
66 stars 35 forks source link

add API functions to tx/rx can from app. resolves #1103 #1104

Closed brentpicasso closed 3 years ago

brentpicasso commented 3 years ago

This adds the ability to send or receive CAN messages from the API that the RC app uses.

This will allow the app to create views under Setup to customize TireX, AnalogX2, future ShiftX, etc.

APIs added: send CAN message: {"txCan": {"id": 123, "bus": 1, "ext": false, "timeout": 50, "data":[1,2,3,4,5,6,7,8]}}

configure CAN rx filter: {"rxCan": {"bus": 1, "lowid": 41474, "highid": 41574}}

request current CAN messages: {"rxCan": null}

response message (may have mulitple CAN messages): {"rxCan":{"msg":[{"bus":1,"id":41474,"data":[28,12,52,85,85,1,0,1]]}}

RodADavison commented 3 years ago

Nice feature. The code looks good to me.