Skip to content

Commit

Permalink
Fwxv 250 update drive fsm (#240)
Browse files Browse the repository at this point in the history
* FWXV-250 Changed Drive FSM for power fsm changes(migration to PD)

* big changes for new power fsm changes

* adding minor change to handle multiple button presses

* finalize updates

* made changes to remove dummy files

* moving exported enums

* fixing tests on cc

* format and lint

* Removing old files that caused issues

---------

Co-authored-by: Kyle Chan <chankyle9@gmail.com>
  • Loading branch information
mitchellostler and Kyle02 authored Dec 2, 2023
1 parent db1d27a commit ee5863e
Show file tree
Hide file tree
Showing 28 changed files with 655 additions and 1,712 deletions.
9 changes: 5 additions & 4 deletions libraries/codegen/boards/bms_carrier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@

---
Messages:
bps_heartbeat:
battery_status:
id: 0
target:
centre_console:
watchdog: 0
critical: true
signals:
batt_perc:
length: 16
status:
length: 8
fault:
length: 8

battery_vt:
id: 30
Expand All @@ -35,9 +39,6 @@
length: 16
temperature:
length: 16
# This field will change
batt_perc:
length: 16

battery_aggregate_vc:
id: 33
Expand Down
157 changes: 6 additions & 151 deletions libraries/codegen/boards/centre_console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,87 +10,19 @@

---
Messages:
set_bms_power:
id: 4
cc_power_control:
id: 8
target:
power_distribution:
watchdog: 0
critical: true
signals:
bms_power_on_notification:
power_event: # (POWER_EV_NONE | POWER_EV_BTN | POWER_EV_BTN_AND_BRAKE)
length: 8

set_power_state:
id: 5
target:
power_distribution:
watchdog: 0
critical: true
signals:
turn_on_everything_notification:
hazard_enabled:
length: 8

set_relay_states:
id: 1
target:
bms_carrier:
watchdog: 0
motor_controller:
watchdog: 0
solar_5_mppts:
watchdog: 0
solar_6_mppts:
watchdog: 0
critical: true
signals:
relay_mask:
length: 16
relay_state:
length: 16

power_on_main_sequence:
id: 6
target:
motor_controller:
watchdog: 0
pedal:
watchdog: 0
power_distribution:
watchdog: 0
critical: true
signals:
sequence:
length: 16

power_off_main_sequence:
id: 7
target:
motor_controller:
watchdog: 0
pedal:
watchdog: 0
power_distribution:
watchdog: 0
critical: true
signals:
sequence:
length: 16

power_on_aux_sequence:
id: 8
target:
motor_controller:
watchdog: 0
pedal:
watchdog: 0
power_distribution:
watchdog: 0
critical: true
signals:
sequence:
length: 16

drive_output:
drive_output:
id: 9
target:
motor_controller:
Expand All @@ -106,81 +38,4 @@
regen_braking:
length: 8
precharge:
length: 8

set_ebrake_state:
id: 10
target:
centre_console:
watchdog: 0
critical: true
signals:
ebrake_state:
length: 8

ready_to_drive:
id: 13
target:
telemetry:
watchdog: 0
signals:
ready_state:
length: 8

begin_precharge:
id: 28
target:
motor_controller:
watchdog: 0
signals:
signal1:
length: 8

hazard:
id: 32
target:
centre_console:
watchdog: 0
signals:
state:
length: 8

discharge_precharge:
id: 31
target:
motor_controller:
watchdog: 0
signals:
signal1:
length: 8

state_transition_fault:
id: 34
target:
telemetry:
watchdog: 0
signals:
state_machine:
length: 16
fault_reason:
length: 16

allow_charging:
id: 49
target:
charger:
watchdog: 0
signals:
signal1:
length: 8

power_info:
id: 47
target:
power_distribution:
watchdog: 0
signals:
hazard_state:
length: 8
power_state:
length: 8
length: 8
11 changes: 11 additions & 0 deletions libraries/codegen/boards/power_distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@
signals:
signal1:
length: 8
power_info:
id: 3
target:
centre_console:
watchdog: 0
critical: true
signals:
power_state:
length: 8
pd_fault:
length: 8
9 changes: 9 additions & 0 deletions libraries/codegen/boards/solar_sense.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,13 @@
length: 16
temp_6:
length: 16

solar_info:
id: 29
target:
centre_console:
watchdog: 0
signals:
solar_fault:
length: 8

Loading

0 comments on commit ee5863e

Please sign in to comment.