Skip to content

Commit

Permalink
added Hobbywing ESC control messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed May 15, 2023
1 parent 8eb730a commit 78880c2
Show file tree
Hide file tree
Showing 16 changed files with 164 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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

5 changes: 5 additions & 0 deletions com/hobbywing/esc/20050.StatusMsg1.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OVERRIDE_SIGNATURE 0x0813b3e2c4ad670e

uint16 rpm
uint16 pwm
uint16 status
6 changes: 6 additions & 0 deletions com/hobbywing/esc/20051.StatusMsg2.uavcan
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

5 changes: 5 additions & 0 deletions com/hobbywing/esc/20052.StatusMsg3.uavcan
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
3 changes: 3 additions & 0 deletions com/hobbywing/esc/20100.RawCommand.uavcan
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 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 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 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
9 changes: 9 additions & 0 deletions com/hobbywing/esc/213.SetDirection.uavcan
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
25 changes: 25 additions & 0 deletions com/hobbywing/esc/214.SetReportingFrequency.uavcan
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

9 changes: 9 additions & 0 deletions com/hobbywing/esc/215.SetThrottleSource.uavcan
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
7 changes: 7 additions & 0 deletions com/hobbywing/esc/216.SelfTest.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OVERRIDE_SIGNATURE 0xc48d4de61c5295df

---

uint8 STATUS_PASS = 0
uint8 STATUS_FAIL = 1
uint8 status
9 changes: 9 additions & 0 deletions com/hobbywing/esc/217.SetAngle.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OVERRIDE_SIGNATURE 0x81d9b10761c28e0a

uint8 option
uint16 angle

---

uint8 option
uint16[<=2] angle
9 changes: 9 additions & 0 deletions com/hobbywing/esc/241.GetMaintenanceInformation.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OVERRIDE_SIGNATURE 0xb81dbd4ec9a5977d

uint8 OPTION_CLEAR = 1
uint8 option

---

uint32 total_rotation_time_min
uint24 time_since_maintainence_min
19 changes: 19 additions & 0 deletions com/hobbywing/esc/242.GetMajorConfig.uavcan
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
OVERRIDE_SIGNATURE 0x1506774da3930bfd

uint8 option

---

bool direction
bool throttle_source
uint6 throttle_channel

uint5 led_status
uint3 led_color

uint4 MSG2_rate
uint4 MSG1_rate

uint16 positioning_angle

uint8[2] reserved
12 changes: 12 additions & 0 deletions com/hobbywing/esc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Hobbywing CAN ESC
=================

These messages are for the Hobbywing DroneCAN ESCs. These ESCs do not
use the standard uavcan.equipment.esc messages and instead implement
their own messages as given in this directory.

Note that the ESCs default to a CAN baud rate of 500000, but it can be
changed with the SetBaud command.

The default CAN NodeID is 1, and it can be changed with the SetID
command.

0 comments on commit 78880c2

Please sign in to comment.