dd
Dependencies: BufferedSerial FastAnalogIn FastPWM mbed SHT75
controlt.h
- Committer:
- sbh9428
- Date:
- 2016-02-22
- Revision:
- 1:5c42ec7f1aeb
- Parent:
- 0:9bfc4aea91e2
- Child:
- 2:4c51394fb35b
File content as of revision 1:5c42ec7f1aeb:
/* * controlt.h * * Created on: 2016. 2. 19. * Author: sbh9428 */ #ifndef CONTROLT_H_ #define CONTROLT_H_ #include "tempsensort.h" #include "peltiert.h" class control_t { public: float get_temp(); void control_PWM(float _PWM); void control_temp(); void set_mode(int _mode); void set_target_temp(float _target_temp); void set_PWM_value(float _PWM_value); void set_P_value(float _P_value); void set_I_value(float _I_value); void set_D_value(float _D_value); void refresh_PWM(); int get_mode(); float get_target_temp(); float get_P_value(); float get_I_value(); float get_D_value(); float get_PWM_value(); float calc_P(); float calc_I(); float calc_D(); void write_log(); control_t(); control_t(temp_sensor_t* _temp_sensor, peltier_t* _peltier); virtual ~control_t(); private: float P_value; float I_value; float D_value; float PWM_value; float target_temp; float dif; float temp_log[10]; int log_count; float table[201]; int table_count; int table_min; int table_max; temp_sensor_t* temp_sensor; peltier_t* peltier; int mode;//0: stop 1: set pwm 2: set temp }; #endif /* CONTROLT_H_ */