|
- #ifndef BUTTONS_H
- #define BUTTONS_H
-
- #include <Arduino.h>
- #include "lcd.h"
- #include "scale.h"
- #include "weight_controller.h"
-
- #define tare_button A0
- #define controller_button A1
- #define plus_button A2
- #define minus_button A3
-
- class Buttons {
- private:
- enum class Action {
- NONE,
- TAR,
- CALIBRATE,
- NEXT_CONTROLLER
- };
-
- public:
- void init();
- bool is_any_pressed();
- void on_button_pressed(Scale &scale, WeightControllerPool &pool, const LCD &lcd);
- Buttons::Action get_button_action();
- };
-
- #endif
|