Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial FastPWM mbed
controlt.h
00001 /* 00002 * controlt.h 00003 * 00004 * Created on: 2016. 2. 19. 00005 * Author: sbh9428 00006 */ 00007 00008 #ifndef CONTROLT_H_ 00009 #define CONTROLT_H_ 00010 00011 #include "BufferedSerial.h" 00012 #include "humsensort.h" 00013 #include "pumpt.h" 00014 00015 class control_t { 00016 public: 00017 void setP(float _P); 00018 void setI(float _I); 00019 void setD(float _D); 00020 00021 void setMode(int _mode); 00022 00023 void setPower(float _power); 00024 void setRatio(float _ratio); 00025 00026 float getP(); 00027 float getI(); 00028 float getD(); 00029 00030 int getMode(); 00031 00032 float getPower(); 00033 float getRatio(); 00034 00035 void refreshPWM(); 00036 00037 float calculatePID(); 00038 00039 control_t(); 00040 control_t(pump_t *_dry, pump_t *_wet, humSensor_t *_humSensor, BufferedSerial *_pc); 00041 virtual ~control_t(); 00042 private: 00043 float P; 00044 float I; 00045 float D; 00046 00047 int mode; 00048 00049 float power; 00050 float ratio; 00051 00052 float humidity; 00053 00054 float dryValue; 00055 float wetValue; 00056 00057 humSensor_t *humSensor; 00058 00059 pump_t *dry; 00060 pump_t *wet; 00061 00062 Ticker refresh; 00063 00064 BufferedSerial *pc; 00065 }; 00066 00067 #endif /* CONTROLT_H_ */ 00068 00069 00070
Generated on Fri Jul 15 2022 04:27:40 by
1.7.2