Skip to content

Commit

Permalink
DroneCan: update from dsdl
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Jul 12, 2023
1 parent 332cc54 commit a521dda
Show file tree
Hide file tree
Showing 250 changed files with 4,723 additions and 147 deletions.
12 changes: 9 additions & 3 deletions ExtLibs/DroneCAN/DroneCAN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public static bool testconversion<T>(T input, byte bitlength, bool signed, byte
private Stream sr;
DateTime uptime = DateTime.Now;

public byte TransferID
{
get { return transferID; }
set { transferID = value; }
}

/// <summary>
/// Read a line from the underlying stream
/// </summary>
Expand Down Expand Up @@ -1326,18 +1332,18 @@ public void WriteToStreamSLCAN(string slcan)
{
var lines = slcan.Split(new[] { '\r' }, StringSplitOptions.RemoveEmptyEntries);

lines = lines.Select((x, i) => new {index = i, value = x})
/*lines = lines.Select((x, i) => new {index = i, value = x})
.GroupBy(x => x.index / 10)
.Select(x => x.Select(v => v.value).Aggregate((i, j) => i + "\r" + j)).ToArray();

*/
foreach (var line in lines)
{
lock (sr_lock)
{
if (sr.CanWrite)
{
sr.Write(ASCIIEncoding.ASCII.GetBytes(line + '\r'), 0, line.Length + 1);

sr.Flush();
try
{
logfilesemaphore.Wait();
Expand Down
6 changes: 5 additions & 1 deletion ExtLibs/DroneCAN/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

python3 -m pip install dronecan empy pexpect --user

python3 ./canard_dsdlc/canard_dsdlc.py dsdl/dronecan dsdl/com dsdl/ardupilot dsdl/cuav dsdl/uavcan dsdl/mppt out
python3 -m pip install --upgrade dronecan

cd canard_dsdlc

python3 canard_dsdlc.py ../dsdl/dronecan ../dsdl/com ../dsdl/ardupilot ../dsdl/cuav ../dsdl/uavcan ../dsdl/mppt ../out

pause
19 changes: 11 additions & 8 deletions ExtLibs/DroneCAN/canard_dsdlc/canard_dsdlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def build_message(msg_name):
if __name__ == '__main__':
print("start main")
if buildlist is not None:
print("buildlist is not None")
while True:
new_buildlist = set(buildlist)
for msg_name in buildlist:
Expand All @@ -90,15 +91,15 @@ def build_message(msg_name):

buildlist = new_buildlist

#from multiprocessing import Pool
from multiprocessing import Pool

#pool = Pool(2)
pool = Pool(8)
builtlist = set()
if buildlist is not None:
for msg_name in buildlist:
builtlist.add(msg_name)
#pool.apply_async(build_message, (msg_name,))
build_message(msg_name)
pool.apply_async(build_message, (msg_name,))
#build_message(msg_name)
msg = message_dict[msg_name]
print (dir(msg))
if not msg.default_dtid is None and msg.kind == msg.KIND_MESSAGE:
Expand All @@ -108,10 +109,12 @@ def build_message(msg_name):
message_names_enum += '\t(typeof(%s_req), %s, 0x%08X, (b,s) => %s_req.ByteArrayToDroneCANMsg(b,s)),\n' % (msg.full_name.replace('.','_'), msg.default_dtid, msg.get_data_type_signature(),msg.full_name.replace('.','_'))
message_names_enum += '\t(typeof(%s_res), %s, 0x%08X, (b,s) => %s_res.ByteArrayToDroneCANMsg(b,s)),\n' % (msg.full_name.replace('.','_'), msg.default_dtid, msg.get_data_type_signature(),msg.full_name.replace('.','_'))
else:
print("buildlist is None")
print(f'{os.getpid()}: {os.getcwd()}')
for msg_name in [msg.full_name for msg in messages]:
print ('building %s' % (msg_name,))
builtlist.add(msg_name)
#pool.apply_async(build_message, (msg_name,))
#builtlist.add(msg_name)
pool.apply_async(build_message, (msg_name,))
build_message(msg_name)
msg = message_dict[msg_name]
print (dir(msg))
Expand All @@ -122,8 +125,8 @@ def build_message(msg_name):
message_names_enum += '\t(typeof(%s_req), %s, 0x%08X, (b,s,fd) => %s_req.ByteArrayToDroneCANMsg(b,s,fd)),\n' % (msg.full_name.replace('.','_'), msg.default_dtid, msg.get_data_type_signature(),msg.full_name.replace('.','_'))
message_names_enum += '\t(typeof(%s_res), %s, 0x%08X, (b,s,fd) => %s_res.ByteArrayToDroneCANMsg(b,s,fd)),\n' % (msg.full_name.replace('.','_'), msg.default_dtid, msg.get_data_type_signature(),msg.full_name.replace('.','_'))

#pool.close()
#pool.join()
pool.close()
pool.join()

assert buildlist is None or not buildlist-builtlist, "%s not built" % (buildlist-builtlist,)

Expand Down
36 changes: 36 additions & 0 deletions ExtLibs/DroneCAN/canard_dsdlc/messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
namespace DroneCAN {
public partial class DroneCAN {
public static (Type type,UInt16 msgid, ulong crcseed, Func<Byte[],int, bool, object> convert)[] MSG_INFO = {
(typeof(dronecan_protocol_Stats), 342, 0x763AE3B8A986F8D1, (b,s,fd) => dronecan_protocol_Stats.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_protocol_CanStats), 343, 0xCE080CAE3CA33C75, (b,s,fd) => dronecan_protocol_CanStats.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_remoteid_BasicID), 20030, 0x5B1C624A8E4FC533, (b,s,fd) => dronecan_remoteid_BasicID.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_remoteid_Location), 20031, 0xEAA3A2C5BCB14CAA, (b,s,fd) => dronecan_remoteid_Location.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_remoteid_SelfID), 20032, 0x59BE81DC4C06A185, (b,s,fd) => dronecan_remoteid_SelfID.ByteArrayToDroneCANMsg(b,s,fd)),
Expand All @@ -11,8 +13,41 @@ public static (Type type,UInt16 msgid, ulong crcseed, Func<Byte[],int, bool, obj
(typeof(dronecan_remoteid_SecureCommand_req), 64, 0x126A47C9C17A8BD7, (b,s,fd) => dronecan_remoteid_SecureCommand_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_remoteid_SecureCommand_res), 64, 0x126A47C9C17A8BD7, (b,s,fd) => dronecan_remoteid_SecureCommand_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_sensors_hygrometer_Hygrometer), 1032, 0xCEB308892BF163E8, (b,s,fd) => dronecan_sensors_hygrometer_Hygrometer.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(dronecan_sensors_rc_RCInput), 1140, 0x771555E596AAB4CF, (b,s,fd) => dronecan_sensors_rc_RCInput.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hex_equipment_flow_Measurement), 20200, 0x6A908866BCB49C18, (b,s,fd) => com_hex_equipment_flow_Measurement.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_himark_servo_ServoCmd), 2018, 0x5D09E48551CE9194, (b,s,fd) => com_himark_servo_ServoCmd.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_himark_servo_ServoInfo), 2019, 0xCA8F4B8F97D23B57, (b,s,fd) => com_himark_servo_ServoInfo.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_GetEscID), 20013, 0x00004E2D, (b,s,fd) => com_hobbywing_esc_GetEscID.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_StatusMsg1), 20050, 0x813B3E2C4AD670E, (b,s,fd) => com_hobbywing_esc_StatusMsg1.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_StatusMsg2), 20051, 0x1675DA01C3B91297, (b,s,fd) => com_hobbywing_esc_StatusMsg2.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_StatusMsg3), 20052, 0x24919CD1EB34ECE9, (b,s,fd) => com_hobbywing_esc_StatusMsg3.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_RawCommand), 20100, 0xBDF086C79F6640AD, (b,s,fd) => com_hobbywing_esc_RawCommand.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetID_req), 210, 0xC323CB5E9EC2B6F7, (b,s,fd) => com_hobbywing_esc_SetID_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetID_res), 210, 0xC323CB5E9EC2B6F7, (b,s,fd) => com_hobbywing_esc_SetID_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetBaud_req), 211, 0xADA98653B52DE435, (b,s,fd) => com_hobbywing_esc_SetBaud_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetBaud_res), 211, 0xADA98653B52DE435, (b,s,fd) => com_hobbywing_esc_SetBaud_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetLED_req), 212, 0xB493BD48C0853EE5, (b,s,fd) => com_hobbywing_esc_SetLED_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetLED_res), 212, 0xB493BD48C0853EE5, (b,s,fd) => com_hobbywing_esc_SetLED_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetDirection_req), 213, 0x9D793111D262BA68, (b,s,fd) => com_hobbywing_esc_SetDirection_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetDirection_res), 213, 0x9D793111D262BA68, (b,s,fd) => com_hobbywing_esc_SetDirection_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetReportingFrequency_req), 214, 0x1FD0404420983DEB, (b,s,fd) => com_hobbywing_esc_SetReportingFrequency_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetReportingFrequency_res), 214, 0x1FD0404420983DEB, (b,s,fd) => com_hobbywing_esc_SetReportingFrequency_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetThrottleSource_req), 215, 0xC248FAAEFE5E29A, (b,s,fd) => com_hobbywing_esc_SetThrottleSource_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetThrottleSource_res), 215, 0xC248FAAEFE5E29A, (b,s,fd) => com_hobbywing_esc_SetThrottleSource_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SelfTest_req), 216, 0xC48D4DE61C5295DF, (b,s,fd) => com_hobbywing_esc_SelfTest_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SelfTest_res), 216, 0xC48D4DE61C5295DF, (b,s,fd) => com_hobbywing_esc_SelfTest_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetAngle_req), 217, 0x81D9B10761C28E0A, (b,s,fd) => com_hobbywing_esc_SetAngle_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_SetAngle_res), 217, 0x81D9B10761C28E0A, (b,s,fd) => com_hobbywing_esc_SetAngle_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_GetMaintenanceInformation_req), 241, 0xB81DBD4EC9A5977D, (b,s,fd) => com_hobbywing_esc_GetMaintenanceInformation_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_GetMaintenanceInformation_res), 241, 0xB81DBD4EC9A5977D, (b,s,fd) => com_hobbywing_esc_GetMaintenanceInformation_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_GetMajorConfig_req), 242, 0x1506774DA3930BFD, (b,s,fd) => com_hobbywing_esc_GetMajorConfig_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_hobbywing_esc_GetMajorConfig_res), 242, 0x1506774DA3930BFD, (b,s,fd) => com_hobbywing_esc_GetMajorConfig_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_volz_servo_ActuatorStatus), 20020, 0x29BF0D53B4060263, (b,s,fd) => com_volz_servo_ActuatorStatus.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_xacti_GnssStatus), 20305, 0x3413AC5D3E1DCBE3, (b,s,fd) => com_xacti_GnssStatus.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_xacti_GnssStatusReq), 20306, 0x60F5464E1CA03449, (b,s,fd) => com_xacti_GnssStatusReq.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_xacti_GimbalAttitudeStatus), 20402, 0xEB428B6C25832692, (b,s,fd) => com_xacti_GimbalAttitudeStatus.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_xacti_CopterAttStatus), 20407, 0x6C1F30F1893763B1, (b,s,fd) => com_xacti_CopterAttStatus.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(com_xacti_GimbalControlData), 20554, 0x3B058FA5B150C5BE, (b,s,fd) => com_xacti_GimbalControlData.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(ardupilot_equipment_power_BatteryInfoAux), 20004, 0x7D7F49FC75484882, (b,s,fd) => ardupilot_equipment_power_BatteryInfoAux.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(ardupilot_equipment_power_BatteryContinuous), 20010, 0x756B561340D5E4AE, (b,s,fd) => ardupilot_equipment_power_BatteryContinuous.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(ardupilot_equipment_power_BatteryPeriodic), 20011, 0xF012494E97358D2, (b,s,fd) => ardupilot_equipment_power_BatteryPeriodic.ByteArrayToDroneCANMsg(b,s,fd)),
Expand Down Expand Up @@ -105,6 +140,7 @@ public static (Type type,UInt16 msgid, ulong crcseed, Func<Byte[],int, bool, obj
(typeof(uavcan_protocol_param_GetSet_res), 11, 0xA7B622F939D1A4D5, (b,s,fd) => uavcan_protocol_param_GetSet_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(uavcan_tunnel_Broadcast), 2010, 0x5AA2D4D9CF4B1E85, (b,s,fd) => uavcan_tunnel_Broadcast.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(uavcan_tunnel_SerialConfig), 2011, 0x4237AACEE87E82AD, (b,s,fd) => uavcan_tunnel_SerialConfig.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(uavcan_tunnel_Targetted), 3001, 0xB138E7EA72A2A2E9, (b,s,fd) => uavcan_tunnel_Targetted.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(uavcan_tunnel_Call_req), 63, 0xDB11EDC510502658, (b,s,fd) => uavcan_tunnel_Call_req.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(uavcan_tunnel_Call_res), 63, 0xDB11EDC510502658, (b,s,fd) => uavcan_tunnel_Call_res.ByteArrayToDroneCANMsg(b,s,fd)),
(typeof(mppt_Stream), 20009, 0xDD7096B255FB6358, (b,s,fd) => mppt_Stream.ByteArrayToDroneCANMsg(b,s,fd)),
Expand Down
6 changes: 5 additions & 1 deletion ExtLibs/DroneCAN/canard_dsdlc/templates/msg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@{from canard_dsdlc_helpers import *}@

@{
for field in msg_fields :
if field.name == "interface" :
field.name = "@" + field.name
}@
using uint8_t = System.Byte;
using uint16_t = System.UInt16;
using uint32_t = System.UInt32;
Expand Down
27 changes: 27 additions & 0 deletions ExtLibs/DroneCAN/dsdl/.github/workflows/test_regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test regression

on: [push, pull_request, workflow_dispatch]

jobs:
test:
runs-on: ubuntu-22.04
steps:
# git checkout the PR
- uses: actions/checkout@v3

- name: Install gcc
run: sudo apt-get install -y gcc libc6-dev

- name: test DSDL generation and encode/decode
shell: bash
run: |
tests/test_regression.sh
- name: Archive generated headers
uses: actions/upload-artifact@v3
with:
name: dsdl_generated
path: |
dsdl_generated/include
dsdl_generated/src
retention-days: 90
17 changes: 17 additions & 0 deletions ExtLibs/DroneCAN/dsdl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,21 @@ messages and services.

This DSDL is based on DroneCAN v1

For information about the Message type IDs (including how the unqiue IDs are allocated), see [**id distribution**](https://dronecan.github.io/Specification/5._Application_level_conventions/#id-distribution)

Message ID
----------

For broadcast messages the following should be used:

- [0, 20000) Standard message types
- [20000, 21000) Vendor-specific message types
- [21000, 65536) Reserved for future use

For service types, the following should be used:

- [0, 100) Standard service types
- [100, 200) Reserved for future use
- [200, 256) Vendor-specific service types

* [**DroneCAN website**](http://dronecan.org)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ uint8 VEHICLE_STATE_LOST = 18
uint8 VEHICLE_STATE_THROW_READY = 19
uint8 VEHICLE_STATE_POWERING_OFF = 20
uint8 VEHICLE_STATE_VIDEO_RECORDING = 21
uint8 VEHICLE_STATE_IS_LANDING = 22
uint8 VEHICLE_STATE_IS_TAKING_OFF = 23


uint8 VEHICLE_YAW_EARTH_CENTIDEGREES = 0
Expand Down
9 changes: 9 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/himark/servo/2018.ServoCmd.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Himark servo commands
# it is not recommended that anyone implement this message. It is here as a placeholder
# for existing Himark servos

# signature from original file location
OVERRIDE_SIGNATURE 0x5D09E48551CE9194

uint10[<=17] cmd

34 changes: 34 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/himark/servo/2019.ServoInfo.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Himark servo feedback information
# it is not recommended that anyone implement this message. It is here as a placeholder
# for existing Himark servos

# signature from original file location
OVERRIDE_SIGNATURE 0xCA8F4B8F97D23B57

# servo ID from 0 to 17
uint5 servo_id

# current commanded input, range 700 to 2300, 1 LSB/us
uint12 pwm_input

# commanded position from -18000 to 18000, 1 LSB == 0.01 degrees
int16 pos_cmd

# sensed position from -18000 to 18000, 1 LSB == 0.01 degrees
int16 pos_sensor

# voltage, range 0 to 4095, 1 LSB == 0.01V
uint12 voltage

# current, range 0 to 1023, 1 LSB == 0.01A
uint10 current

# PCB temperature, range 0 to 1023, 1 LSB == 0.2 degrees Celsius, temp = pcb_tem*0.2-40
uint10 pcb_temp

# motor temperature, range 0 to 1023, 1 LSB == 0.2 degrees Celsius, temp = motor_tem*0.2-40
uint10 motor_temp

uint5 ERROR_STATUS_NO_ERROR = 0
uint5 ERROR_STATUS_DATA_ERROR = 1
uint5 error_status
5 changes: 5 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/hobbywing/esc/20013.GetEscID.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# signature from original file location
OVERRIDE_SIGNATURE 0x4E2D

uint8[<=3] payload

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OVERRIDE_SIGNATURE 0x0813b3e2c4ad670e

uint16 rpm
uint16 pwm
uint16 status
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OVERRIDE_SIGNATURE 0x1675da01c3b91297

int16 input_voltage # 0.1V
int16 current # 0.1A
uint8 temperature # degC

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OVERRIDE_SIGNATURE 0x24919cd1eb34ece9

uint8 MOS_T
uint8 CAP_T
uint8 Motor_T
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OVERRIDE_SIGNATURE 0xbdf086c79f6640ad

int14[<=8] command
9 changes: 9 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/hobbywing/esc/210.SetID.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OVERRIDE_SIGNATURE 0xc323cb5e9ec2b6f7

uint8 node_id
uint8 throttle_channel

---

uint8 node_id
uint8 throttle_channel
11 changes: 11 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/hobbywing/esc/211.SetBaud.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
OVERRIDE_SIGNATURE 0xada98653b52de435

uint8 BAUD_1MBPS = 0
uint8 BAUD_500KBPS = 1
uint8 BAUD_250KBPS = 2
uint8 BAUD_200KBPS = 3
uint8 BAUD_100KBPS = 4
uint8 BAUD_50KBPS = 5
uint8 baud

---
21 changes: 21 additions & 0 deletions ExtLibs/DroneCAN/dsdl/com/hobbywing/esc/212.SetLED.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
OVERRIDE_SIGNATURE 0xb493bd48c0853ee5

uint8 OPTION_SAVE = 1
uint8 option

uint8 COLOR_R = 4
uint8 COLOR_G = 2
uint8 COLOR_B = 1
uint8 color

uint8 BLINK_OFF = 0
uint8 BLINK_1HZ = 1
uint8 BLINK_2HZ = 2
uint8 BLINK_5HZ = 5
uint8 blink

---

uint8 option
uint8 color
uint8 blink
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OVERRIDE_SIGNATURE 0x9d793111d262ba68

uint8 DIRECTION_CLOCKWISE = 0
uint8 DIRECTION_COUNTER_CLOCKWISE = 1
uint8 DIRECTION_QUERY = 255
uint8 direction

---
uint8 direction
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
OVERRIDE_SIGNATURE 0x1fd0404420983deb

uint8 OPTION_READ = 0
uint8 OPTION_WRITE = 1
uint8 option

uint16 MSG_ID

uint8 RATE_500HZ = 1
uint8 RATE_250HZ = 2
uint8 RATE_200HZ = 3
uint8 RATE_100HZ = 4
uint8 RATE_50HZ = 5
uint8 RATE_20HZ = 6
uint8 RATE_10HZ = 7
uint8 RATE_1HZ = 8
uint8 RATE_0HZ = 9
uint8 rate

---

uint8 option
uint16 MSG_ID
uint8 rate

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OVERRIDE_SIGNATURE 0x0c248faaefe5e29a

uint8 SOURCE_CAN_DIGITAL = 0
uint8 SOURCE_PWM = 1
uint8 source

---

uint8 source
Loading

0 comments on commit a521dda

Please sign in to comment.