working_modes.h 803 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #define MODE_NO_CHANGE 0xff
  3. #define MODE_DEFAULT 0
  4. #define MODE_MAIN_MENU 1
  5. #define MODE_SETTINGS_MENU 2
  6. #define MAIN_MENU_MAXPOS 2
  7. #define STATE_PAUSE_TRACKING_NOTPAUSED 0
  8. #define STATE_PAUSE_TRACKING_JUSTPAUSED 1
  9. #define STATE_PAUSE_TRACKING_PAUSED 2
  10. #define STATE_PAUSE_TRACKING_JUSTUNPAUSED 3
  11. #define STATE_POINT_SAVE_READY 0
  12. #define STATE_POINT_SAVE_NOT_DONE 1
  13. #define STATE_POINT_SAVE_DONE 2
  14. struct main_menu_pos_s {
  15. const char * (* get_name)(void);
  16. unsigned char (* func)(void);
  17. };
  18. struct menu_params_s {
  19. unsigned char main_menu_pos;
  20. unsigned char settings_menu_pos;
  21. unsigned char point_save_state;
  22. };
  23. extern struct menu_params_s mp;
  24. void key_process(void);
  25. unsigned char enter_settings(void);
  26. void display_settings_menu_item(void);
  27. void display_main_menu_item(void);