From 179ed918aed1c9f190ae6846ea4bcccccbeab18f Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Mon, 21 Nov 2022 16:34:17 -0600 Subject: Added Pre-Charge functionality and made thing prettier. --- precharge.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 precharge.h (limited to 'precharge.h') diff --git a/precharge.h b/precharge.h new file mode 100644 index 0000000..376b067 --- /dev/null +++ b/precharge.h @@ -0,0 +1,38 @@ +#ifndef PRECHARGE_H +#define PRECHARGE_H + +#include +#include + +class Precharge : public QObject +{ + Q_OBJECT +public: + Precharge(); + + void setMaximumVoltage(double voltage); + void setPreChargeTime(double time); + void setPreChargePercentage(double percentage); + void setSystemCapacitance(float capacitance); + void setChosenResistance(double resistance); + + double maximumResistance(void); + double actualPreChargeTime(void); + double peakInRushCurrent(void); + double averagePower(void); +public slots: + void calculate(void); + +private: + double maximumVoltage; + double preChargeTime; + double preChargePercentage; + double chosenResistance; + float systemCapacitance; + +signals: + void calculation(void); + +}; + +#endif // PRECHARGE_H -- cgit v1.2.3