diff options
Diffstat (limited to 'generator.cpp')
-rw-r--r-- | generator.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/generator.cpp b/generator.cpp new file mode 100644 index 0000000..07416b7 --- /dev/null +++ b/generator.cpp @@ -0,0 +1,27 @@ +#include "generator.h" + +Generator::Generator() : + RPM(0), + systemVoltage(0) +{ + +} + +void Generator::setRPM(double speed) +{ + RPM = speed; +} +void Generator::setSystemVoltage(double voltage) +{ + systemVoltage = voltage; +} + +void Generator::calculate() +{ + emit calculation(); +} + +double Generator::generatorKV() +{ + return RPM/systemVoltage; +} |