-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflowmaster.cpp
74 lines (59 loc) · 1014 Bytes
/
flowmaster.cpp
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include "flowmaster.hpp"
#include "flowmaster.h"
flowmaster::flowmaster()
:m_fm(fm_create())
{
}
flowmaster::~flowmaster()
{
fm_disconnect(m_fm);
fm_destroy(m_fm);
}
int flowmaster::connect(const char *port)
{
fm_connect(m_fm, port);
}
int flowmaster::disconnect()
{
fm_disconnect(m_fm);
}
int flowmaster::ping()
{
return fm_ping(m_fm);
}
int flowmaster::set_fan_speed(double duty_cycle)
{
return fm_set_fan_speed(m_fm, duty_cycle);
}
int flowmaster::set_pump_speed(double duty_cycle)
{
return fm_set_pump_speed(m_fm, duty_cycle);
}
int flowmaster::do_update()
{
fm_update_status(m_fm);
}
int flowmaster::fan_rpm()
{
return fm_fan_rpm(m_fm);
}
int flowmaster::pump_rpm()
{
return fm_pump_rpm(m_fm);
}
double flowmaster::ambient_temp()
{
return fm_ambient_temp(m_fm);
}
double flowmaster::coolant_temp()
{
return fm_coolant_temp(m_fm);
}
double flowmaster::fan_duty_cycle()
{
return fm_fan_duty_cycle(m_fm);
}
double flowmaster::pump_duty_cycle()
{
return fm_pump_duty_cycle(m_fm);
}