Dean Fraj / CurrentRegulation
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CurrentRegulation.h Source File

CurrentRegulation.h

00001 #ifndef CURRENTREGULATION_H
00002 #define CURRENTREGULATION_H
00003 
00004 #include "mbed.h"
00005 
00006 class CurrentRegulation{
00007     public:
00008         CurrentRegulation(PinName I_A, PinName I_B, PinName I_C, PinName I_TOTAL);
00009         CurrentRegulation(PinName I_A, PinName I_B, PinName I_C, PinName I_TOTAL, double R_sh, double R_1, double R_fs, double R_ft, double V_ref);
00010         void setValues(double R_sh, double R_1, double R_fs, double R_ft, double V_ref);
00011         void calculateCurrentA();
00012         void calculateCurrentB();
00013         void calculateCurrentC();
00014         void calculateTotalCurrent();
00015         double calculateKr();  
00016         double showResult();      
00017     private:
00018         AnalogIn I_A, I_B, I_C, I_TOTAL;
00019         double R_sh, R_1, R_fs, R_ft, V_ref, I_A_, I_B_, I_C_, I_TOTAL_, zeta, T_suma, T_ch, T_pv, T_I, K_ch, K_R, K_pv, K_a, K_oR;
00020         Ticker measure1, measure2;
00021     };
00022 
00023 #endif