summaryrefslogtreecommitdiff
path: root/generator.cpp
blob: 07416b7809e4a6322160cc91bd6e88648c0285a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
}