1
#include "mode_switcher.h"
5
ModeSwitcher::ModeSwitcher()
7
static TestMode test_mode;
9
_modes.push_back( &test_mode );
13
void ModeSwitcher::short_press()
15
_modes[ _mode ]->next_flavour();
19
void ModeSwitcher::long_press()
21
if( ++_mode >= (signed)_modes.size() )
23
_modes[ _mode ]->activate();
27
void ModeSwitcher::activate()
30
_modes[ _mode ]->activate();
34
Drawer &ModeSwitcher::get_drawer()
36
return *_modes[ _mode ];