EPFLRocketTeam / 2024_C_AV_RPI

2 stars 0 forks source link

Update FSM #40

Closed cleorenaud closed 1 week ago

cleorenaud commented 1 month ago

The goal of this PR is to implement the Finite State Machine in the AVState.cpp file to match the description provided in the ERT Wiki

cleorenaud commented 1 month ago

I have some questions about the AVState.cpp file:

cleorenaud commented 1 month ago

It seems that in the ERROR ON GROUND part of the Wiki FSM we are missing a 'from' row as in the diagram we can go to the error on ground state from the armed state.

marinPh commented 1 month ago

It seems that in the ERROR ON GROUND part of the Wiki FSM we are missing a 'from' row as in the diagram we can go to the error on ground state from the armed state.

this is correct please add it to this PR

marinPh commented 1 month ago

I have some questions about the AVState.cpp file:

  • There is a error() function that should be implemented. Should we implement it using cases for each of the state and then check that the conditions to go to the next state are met ?
  • The implementation of the functions fromArmed and fromManual doesn't seem to match the behaviours explained in the FSM on the wiki. (I proposed some alternative implementations but left the one that was already present in the file)
  • There are some conditions that we should check for to trigger a change of state that I don't really know how to implement. For example in the fromDescent function we should check that the vehicle is fully depressurised but which sensors does it correspond to ?
  • Should I add more comments to explain the conditions we are checking for ?

1) the error function for now can just return "false" for now we will implement it after 2) don't take in account the old transitions they were not coded with the old code base in mind 3) we have sensors that will come from the powerboard, please create #define file that contains sensor information we still don't have for now 4) I need to take a more thorough look into your documentation for now seems quite good

cleorenaud commented 1 month ago

It seems that in the ERROR ON GROUND part of the Wiki FSM we are missing a 'from' row as in the diagram we can go to the error on ground state from the armed state.

this is correct please add it to this PR

I updated the wiki : https://rocket-team.epfl.ch/en/competition/firehorn/avionics/2024_C_AV_FINITE-STATE-MACHINE

sonarcloud[bot] commented 2 weeks ago

Quality Gate Failed Quality Gate failed for 'epflrocketteam-1_2024_C_AV_RPI'

Failed conditions
26.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud