Multiple issues with Finite State Machine page
Closed this issue · 1 comments
charlieweinberger commented
Where is there misleading or incorrect information?
Explain where it is, preferably including a link.
On the page on Finite State Machines, there are multiple problems with the code section at the bottom of the page. https://gm0.org/en/latest/docs/software/concepts/finite-state-machines.html
What's wrong?
Explain what exactly is incorrect, and ideally what it could potentially be replaced with.
- There's an extra closing bracket at the end of the switch statement, which breaks the code.
- One line says
liftMotor.setPosition(LIFT_LOW);
but you can't call.setPosition()
on a motor. I think OP thoughtliftMotor
was a servo. This must be updated by changing it to.setTargetPosition()
and adding other encoder-related code to the rest of the code section. - Finally, the formatting is wrong in at least one place, with the spaces not aligning correctly.
abidingabi commented
I think the indentation got messed up when a global search and replace was run by me to try and reformat a lot of the gm0 text—it was pretty naive, which meant it caught some stuff it should not have. Namely, rst text should have indentation of 3 spaces while code should have indentation of 4.