Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lfr_states.cpp 935B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "lfr_states.h"
  2. void State::Idle::enter(LFR_StateMachine* stateMachine)
  3. {
  4. }
  5. void State::Idle::exit(LFR_StateMachine* stateMachine)
  6. {
  7. }
  8. LFR_IState& State::Idle::getInstance()
  9. {
  10. static State::Idle singleton;
  11. return singleton;
  12. }
  13. void State::Autonomous::enter(LFR_StateMachine* stateMachine)
  14. {
  15. std::cout << "enter autonomous mode" << std::endl;
  16. }
  17. void State::Autonomous::exit(LFR_StateMachine* stateMachine)
  18. {
  19. std::cout << "exit autonomous mode" << std::endl;
  20. }
  21. LFR_IState& State::Autonomous::getInstance()
  22. {
  23. static State::Autonomous singleton;
  24. return singleton;
  25. }
  26. void State::Manual::enter(LFR_StateMachine* stateMachine)
  27. {
  28. std::cout << "enter manual mode" << std::endl;
  29. }
  30. void State::Manual::exit(LFR_StateMachine* stateMachine)
  31. {
  32. std::cout << "exit manual mode" << std::endl;
  33. }
  34. LFR_IState& State::Manual::getInstance()
  35. {
  36. static State::Manual singleton;
  37. return singleton;
  38. }