|
1234567891011121314151617181920212223242526272829 |
- #ifndef SERIAL_H
- #define SERIAL_H
-
- #include <Arduino.h>
- #include "weight_controller.h"
- #include "scale.h"
- #include "lcd.h"
-
- #define e_calib_w 8
- #define e_gain 10
-
- class SerialIO {
- private:
- int des_m_g = 5;
- int des_m_grain = 3;
-
- bool debug_info_allowed = false;
-
- public:
- void init();
- bool is_available() const;
- void print_gain(int gain) const;
- bool is_debug_info_allowed() const;
- void print_init_message() const;
- void on_command(Scale& scale, WeightControllerPool &pool, LCD &lcd);
- void print_debug_info(long raw, double average_raw, long offset, double weight, double gram, double average_gram, double grain) const;
- };
-
- #endif
|