-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata_ini.py
More file actions
112 lines (90 loc) · 3.3 KB
/
Copy pathdata_ini.py
File metadata and controls
112 lines (90 loc) · 3.3 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import configparser
config = configparser.ConfigParser()
def get_graph_type():
config.read('data.ini')
return int(config.get('GRAPH_DATA', 'graph_type'))
def set_graph_type(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'graph_type', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_linear_slope():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'linear_slope'))
def set_linear_slope(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'linear_slope', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_exponential_slope():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'exponential_slope'))
def set_exponential_slope(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'exponential_slope', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_sCurve_slope():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'scurve_slope'))
def set_sCurve_slope(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'scurve_slope', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_firebox_temp():
config.read('data.ini')
return float(config.get('TEMP_DATA', 'fire_box'))
def set_firebox_temp(value):
config.read('data.ini')
config.set('TEMP_DATA', 'fire_box', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_steambox_temp():
config.read('data.ini')
return float(config.get('TEMP_DATA', 'steam_box'))
def set_steambox_temp(value):
config.read('data.ini')
config.set('TEMP_DATA', 'steam_box', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_min_temp():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'min_temp'))
def set_min_temp(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'min_temp', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_max_temp():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'max_temp'))
def set_max_temp(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'max_temp', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_min_rpm():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'min_rpm'))
def set_min_rpm(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'min_rpm', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_max_rpm():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'max_rpm'))
def set_max_rpm(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'max_rpm', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)
def get_rpm():
config.read('data.ini')
return float(config.get('GRAPH_DATA', 'rpm'))
def set_rpm(value):
config.read('data.ini')
config.set('GRAPH_DATA', 'rpm', str(value))
with open('data.ini', 'w') as datafile:
config.write(datafile)