Skip to content

Commit f2bac9d

Browse files
committed
updating readme description of the interface
1 parent 435fa48 commit f2bac9d

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

lib/interfaces/README.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,10 @@ VCF Outputs:
156156
- __note__: the regen percentage that was present on MCU should instead be calculated by the controllers themselves instead of by the pedals system to centralize regen calculation at higher levels to allow for tuning / safe modification more easily
157157

158158
- __note__: the following data is all the raw, non-filtered data
159-
- steering data CAN packet:
160-
- `uint16_t analog_steering`
161-
- `float digital_steering` (32 bit)
159+
- `STEERING_DATA` (`0x41f`) steering data CAN packet:
160+
- `uint16_t steering_analog_raw`
161+
- `float steering_digital_raw` (32 bit)
162162

163-
- suspension data CAN packet:
164-
- `uint16_t fl_load_cell`
165-
- `uint16_t fr_load_cell`
166-
- `uint16_t fl_shock_pot`
167-
- `uint16_t fr_shock_pot`
168163

169164
### Ethernet Interface
170165

@@ -184,9 +179,9 @@ VCF Outputs:
184179
- `char git_short_hash[8]`
185180
- the git hash of the commit that was flashed to the
186181

187-
## Drivebrain Interface
182+
## Drivebrain Interface requirements
188183

189-
### CAN interface
184+
### CAN interface requirements
190185

191186
#### preface
192187
__NOTE__: the following messages that are on the bus are listened to by the drivebrain and are output from other boards (not VCR)
@@ -195,31 +190,34 @@ __NOTE__: the following messages that are on the bus are listened to by the driv
195190

196191
VCR Outputs:
197192

198-
- VCR suspension data CAN packet:
193+
- `REAR_SUSPENSION` (`0E4`) VCR suspension data CAN packet: (200hz)
199194
- `uint16_t rl_load_cell`
200195
- `uint16_t rr_load_cell`
201196
- `uint16_t rl_shock_pot`
202197
- `uint16_t rr_shock_pot`
203198

204-
- VCR status CAN packet:
205-
- vehicle state (oneof: RTD, tractive system enabled, etc.)
206-
- control mode
207-
- VCR
208-
- VCR error state word
209-
- drivebrain timeout, VCF timeout, VCR firmware error, etc.
210-
211-
VCR inputs (sent by drivebrain):
212-
- desired RPMs
213-
- `int16_t fl_rpm`
214-
- `int16_t fr_rpm`
215-
- `int16_t rl_rpm`
216-
- `int16_t rr_rpm`
217-
218-
- torque limits
199+
- VCR status CAN packet: (5hz)
200+
- `uint8_t vehicle_state_index`: vehicle state enum index (oneof: RTD, tractive system enabled, etc.)
201+
- `uint8_t control_mode_index` control mode index (MODE0 through MODE5)
202+
- `uint16_t vcr_error_state_word` VCR error state word
203+
- bit 1: drivebrain timeout present
204+
- bit 2: VCR firmware error
205+
- bit 3: drivetrain error present
206+
- bits 4 through 16: (reserved)
207+
208+
VCR inputs (sent by drivebrain and VCF):
209+
- `DRIVEBRAIN_SPEED_SET_INPUT`: (`0xF2`) desired RPMs
210+
- `uint16_t drivebrain_set_rpm_fl`
211+
- `uint16_t drivebrain_set_rpm_fr`
212+
- `uint16_t drivebrain_set_rpm_rl`
213+
- `uint16_t drivebrain_set_rpm_rr`
214+
215+
- `DRIVEBRAIN_TORQUE_LIM_INPUT`: (`0xF1`) torque limits (de-facto torque setpoint in certain conditions)
219216
- __note__: in units of .01nm: 2100 = 21nm, 2150 = 21.5nm
220-
- `int16_t fl_torque_lim`
221-
- `int16_t fr_torque_lim`
222-
- `int16_t rl_torque_lim`
223-
- `int16_t rl_torque_lim`
217+
- `int16_t drivebrain_torque_fl_torque`
218+
- `int16_t drivebrain_torque_fr_torque`
219+
- `int16_t drivebrain_torque_rl_torque`
220+
- `int16_t drivebrain_torque_rl_torque`
221+
224222

225223

0 commit comments

Comments
 (0)