25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

3 ay önce
1234567891011121314151617181920212223242526272829
  1. #ifndef SERIAL_H
  2. #define SERIAL_H
  3. #include <Arduino.h>
  4. #include "weight_controller.h"
  5. #include "scale.h"
  6. #include "lcd.h"
  7. #define e_calib_w 8
  8. #define e_gain 10
  9. class SerialIO {
  10. private:
  11. int des_m_g = 5;
  12. int des_m_grain = 3;
  13. bool debug_info_allowed = false;
  14. public:
  15. void init();
  16. bool is_available() const;
  17. void print_gain(int gain) const;
  18. bool is_debug_info_allowed() const;
  19. void print_init_message() const;
  20. void on_command(Scale& scale, WeightControllerPool &pool, LCD &lcd);
  21. void print_debug_info(long raw, double average_raw, long offset, double weight, double gram, double average_gram, double grain) const;
  22. };
  23. #endif