Centre Console

Hardware Validation

 

Validation Steps

Status

Blockers

 

Validation Steps

Status

Blockers

PCA

Verify outputs of IO expander

done

 

Buttons

Verify button presses are read in test task
Test pressing all at once, ensure all events are received

done

 

7-Seg Display

Check that you can enable/disable output
Verify all 3 displays operating

done

 

Indicators

5 LED indicators, along with buttons working

done

 

Drive FSM Validation

Each test will be named and their outcome listed.

Each success test (green) means that the transition should occur while each fail test means that the transition should fail

 

Drive Tests

Verified?

Inputs

CAN Inputs/Button Presses

Outputs

CAN Outputs

Notes

 

 

Drive Tests

Verified?

Inputs

CAN Inputs/Button Presses

Outputs

CAN Outputs

Notes

 

Neutral Start | Success

Verified?

power_state == EE_POWER_DRIVE_STATE

power_state_main_flag == 0

All inputs set by one CAN message

cansend can0 066#02

  • Sets power_error_state to 0

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

power_state_main_flag set internally, starting value is 0

Neutral button light → ON

Please check centre_console.yaml

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

Neutral → Drive | Success

Verified?

power_error_state == STATUS_CODE_OK

power_state == EE_POWER_DRIVE_STATE

received_power_state == true

drive_fsm_event == DRIVE_BUTTON_EVENT

prv_speed_is_zero() == true

cansend can0 066#02

  • Sets power_error_state to 0

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

Click Drive button

cansend can0 484#00 - will set speed to 0

get_drive_state() should return (enum driveState)DRIVE after transitioning

Drive button light → ON

Neutral button light → OFF

Drive output:

drive_state: DRIVE (value: 1)

 

 

 

Will return to neutral if Drive state does not receive power FSM state within three cycles

 

Drive → Neutral | Success

Verified?

power_received_counter > 3

Will happen automatically if CAN message isn't sent

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Drive button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_error_state != STATUS_CODE_OK

cansend can0 066#0102

  • Sets power_error_state to 1

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Drive button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_state != EE_POWER_DRIVE_STATE

cansend can0 066#00

  • Sets power_error_state to 0

  • Sets power_state to 0 (EE_POWER_OFF_STATE)

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Drive button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

drive_fsm_event == NEUTRAL_BUTTON_EVENT

prv_speed_is_zero() == true

Click Neutral button

cansend can0 484#00 - will set speed to 0

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Drive button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

 

Neutral → Reverse | Success

power_error_state == STATUS_CODE_OK

power_state == EE_POWER_DRIVE_STATE

received_power_state == true

drive_fsm_event == REVERSE_BUTTON_EVENT

prv_speed_is_zero() == true

cansend can0 066#02

  • Sets power_error_state to 0

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

Click Reverse button

cansend can0 484#00 - will set speed to 0

get_drive_state() should return (enum driveState)REVERSE after transitioning

Reverse button light → ON

Neutral button light → OFF

Drive output:

drive_state: REVERSE (value: 2)

 

 

 

Will return to neutral if Reverse state does not receive power FSM state within three cycles

 

 

 

 

 

Reverse → Neutral | Success

power_received_counter > 3

Will happen automatically if CAN message isn't sent

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Reverse button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_error_state != STATUS_CODE_OK

cansend can0 066#0102

  • Sets power_error_state to 1

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Reverse button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_state != EE_POWER_DRIVE_STATE

cansend can0 066#00

  • Sets power_error_state to 0

  • Sets power_state to 0 (EE_POWER_OFF_STATE)

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Reverse button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

drive_fsm_event == NEUTRAL_BUTTON_EVENT

prv_speed_is_zero() == true

Click Neutral button

cansend can0 484#00 - will set speed to 0

get_drive_state() should return (enum driveState)NEUTRAL after transitioning

Reverse button light → OFF

Neutral button light → ON

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

Neutral → Drive | Fail

power_error_state != STATUS_CODE_OK

drive_fsm_event == DRIVE_BUTTON_EVENT

cansend can0 066#0102

  • Sets power_error_state to 1

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

Click Drive button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_state != EE_POWER_DRIVE_STATE

drive_fsm_event == DRIVE_BUTTON_EVENT

cansend can0 066#00

  • Sets power_error_state to 0

  • Sets power_state to 0 (EE_POWER_OFF_STATE)

Click Drive button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

received_power_state != true

drive_fsm_event == DRIVE_BUTTON_EVENT

Don’t send any can messages

Click Drive button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

prv_speed_is_zero() == false

drive_fsm_event == DRIVE_BUTTON_EVEN

cansend can0 484#FF7FFF7F - set large speed
cansend can0 484#01800180 - set very negative speed

Click Drive button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

Drive → Neutral | Fail

prv_speed_is_zero() == false

drive_fsm_event == NEUTRAL_BUTTON_EVENT

cansend can0 484#FF7FFF7F - set large speed
cansend can0 484#01800180 - set very negative speed

Click Neutral button

Should not transition to Neutral when Neutral button is pressed

Drive output:

drive_state: DRIVE (value: 1)

 

 

Neutral → Reverse | Fail

power_error_state != STATUS_CODE_OK

drive_fsm_event == REVERSE_BUTTON_EVENT

cansend can0 066#0102

  • Sets power_error_state to 1

  • Sets power_state to 2 (EE_POWER_DRIVE_STATE)

Click Reverse button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

power_state != EE_POWER_DRIVE_STATE

drive_fsm_event == REVERSE_BUTTON_EVENT

cansend can0 066#00

  • Sets power_error_state to 0

  • Sets power_state to 0 (EE_POWER_OFF_STATE)

Click Reverse button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

received_power_state != true

drive_fsm_event == REVERSE_BUTTON_EVENT

Don’t send any can messages

Click Reverse button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

prv_speed_is_zero() == false

drive_fsm_event == REVERSE_BUTTON_EVEN

cansend can0 484#FF7FFF7F - set large speed
cansend can0 484#01800180 - set very negative speed

Click Reverse button

Should stay in Neutral

Drive output:

drive_state: NEUTRAL (value: 0)

 

 

Reverse → Neutral | Fail

prv_speed_is_zero() == false

drive_fsm_event == NEUTRAL_BUTTON_EVENT

cansend can0 484#FF7FFF7F - set large speed
cansend can0 484#01800180 - set very negative speed

Click Neutral button

Should not transition to Neutral when Neutral button is pressed

Drive output:

drive_state: REVERSE (value: 2)

 

 

Drive ↔︎ Reverse | Fail

drive_fsm_event == DRIVE_BUTTON_EVENT

OR

drive_fsm_event == REVERSE_BUTTON_EVENT

Click Drive button

OR

Click Reverse button

Should not transition

 

There is no transition defined for Reverse → Drive or Drive → Reverse

 

Update Dashboard Tests

Update Dashboard Tests

Description

Verified?

Inputs

CAN Inputs/Button Presses

Outputs

CAN Outputs

Update Dashboard Tests

Description

Verified?

Inputs

CAN Inputs/Button Presses

Outputs

CAN Outputs

Dashboard Initialization

Verifies the state of peripherals after initialization

Power On Centre Console Board

 

-All buttons read low

-All displays show 8 with decimal point on

-Regen button LED on

-Last power & lights state = OFF

 

Hazard Light Toggle

Tests the toggling of the hazard light state upon receiving a hazard button event.

Current hazard state, HAZARD_BUTTON_EVENT

Hazard button press

Hazard LED state changes

 

Regen Light Toggle

Verifies the functionality of the regen braking light toggling with the regen button event.

Current regen braking state, REGEN_BUTTON_EVENT

Regen button press

Regen LED state toggled

 

Steering Light Left Toggle

Tests the left steering light LED's response to the left steering CAN signal being set.

Current left steering light state

Steering lights left signal set

Left steering LED state toggled

 

Steering Light Right Toggle

Verifies the right steering light LED's behavior upon right steering CAN signal being set.

Current right steering light state

Steering lights right signal set

Right steering LED state toggled

 

Steering Lights Off

Ensures that both steering LEDs turn off when the steering lights off signal is received.

Current steering lights state

Steering lights off signal set

Both left and right steering LEDs turned off

 

Power Light Toggle On

Checks the power LED's reaction to the power state changing to ON or DRIVE.

Power state change to ON or DRIVE

Power state signal set to ON or DRIVE

Power LED turned on

 

Power Light Toggle Off

Verifies the power LED turns off when the power state is not EE_POWER_ON_STATE or EE_POWER_DRIVE_STATE

Power state change to OFF

Power state signal set to OFF

Power LED turned off

 

Cruise Control Toggle

Tests toggling of cruise control based on steering input and current drive/brake state.

Current cruise control state, Drive state, Brake output, Steering info

Cruise control toggle signal from steering

Updated cruise control state and LED indicator

 

Cruise Control Speed Increase

Verifies if cruise control speed increases correctly when increase signal is received.

Current cruise control state, Steering info

Cruise control increase signal from steering

Increased target velocity

 

Cruise Control Speed Decrease

Checks if cruise control speed decreases properly upon decrease signal.

Current cruise control state, Steering info

Cruise control decrease signal from steering

Decreased target velocity

 

Cruise Control Disengage on Brake

Ensures cruise control is disabled when brake is engaged.

Current cruise control state, Brake output

Brake signal

Cruise control disabled, LED indicator off

 

Cruise Control Disengage on Drive State Change

Tests cruise control disengagement when the vehicle is not in DRIVE state.

Current cruise control state, Drive state

Change in drive state (not in DRIVE)

Cruise control disabled, LED indicator off

 

Display Update with Low Speed

Tests display update for speed less than 100 kph. Speed should be displayed as a floating-point number.

Motor velocity data, Battery percentage, Target velocity

Motor velocity and battery percentage CAN signals

Seven-segment display shows speed (as float), battery percentage, and target velocity

 

Display Update with High Speed

Verifies display update for speed equal to or greater than 100 kph. Speed should be displayed as an integer.

Motor velocity data, Battery percentage, Target velocity

Motor velocity and battery percentage CAN signals

Seven-segment display shows speed (as integer) and battery percentage

 

Display Update with Changing Speed

Ensures the display updates the speed as motor velocity changes, both below and above 100 kph.

Varying motor velocity data, Constant battery percentage and target velocity

Varying motor velocity CAN signals

Update of speed on the display based on motor velocity

 

Display Update with Constant Speed

Validates that the display correctly shows updating battery percentage.

Constant motor velocity and target velocity data, varying battery percentage

Varying battery percentage CAN signals

Battery percentage update on the display

 

Display Response to Velocity Overflow

Checks the display's response to out of range motor velocity values.

Extremely high motor velocity data, Battery percentage, Target velocity

Exceedingly high motor velocity CAN signals

No speed displayed

 

Power Button Event with Brake Engaged

Tests reaction to power button event when brake is engaged.

Power button event, Brake output state

Power button press, Brake output signal

EE_CC_PWR_CTL_EVENT_BTN_AND_BRAKE event set

Cruise control, target velocity, regen braking, hazard state

Power Button Event without Brake Engaged

Verifies functionality when power button is pressed without brake engagement.

Power button event, No brake output

Power button press

EE_CC_PWR_CTL_EVENT_BTN event set

Cruise control, target velocity, regen braking, hazard state

No Power Button Event

Ensures correct behavior when no power button event occurs.

No power button event, Brake state irrelevant

 

EE_CC_PWR_CTL_EVENT_NONE event set

Cruise control, target velocity, regen braking, hazard state

Update Cruise Control State

Checks if the cruise control state is correctly updated in the drive output.

Cruise control state

 

Updated cruise control state in drive output

Cruise control state change

Update Target Velocity

Validates the update of target velocity in the drive output.

Target velocity

 

Updated target velocity in drive output

Target velocity update

Update Regen Braking State

Tests if the regen braking state is correctly reflected in the drive output.

Regen braking state

 

Updated regen braking state in drive output

Regen braking state change

Update Hazard State

Ensures the hazard state is properly updated in the cruise control power control settings.

Hazard state

 

Updated hazard state in cruise control power control

Hazard state change