Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Validation Steps

Status

Blockers

PCA

  •  Verify outputs of IO expander

Status
colourGreen
titledone

Buttons

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

Status
colourGreen
titledone

7-Seg Display

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

Status
colourGreen
titledone

Indicators

5 LED indicators, along with buttons working

Status
colourGreen
titledone

Drive FSM Validation

Info

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

Neutral Start | Success

  •  Verified?

power_state == EE_POWER_DRIVE_STATE

power_state_main_flag == 0

Info

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

Info

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

  •  Verified?

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

  •  Verified?

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

  •  Verified?

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

  •  Verified?

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

  •  Verified?

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

  •  Verified?

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

  •  Verified?

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

...