DmitrMakeev commited on
Commit
0ffe3b1
1 Parent(s): 7ca46e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -143
app.py CHANGED
@@ -85,29 +85,6 @@ def online():
85
 
86
 
87
 
88
- @app.route('/online_api', methods=['GET'])
89
- def online_api():
90
- return jsonify(dey=globs.dey,
91
- wek=globs.wek,
92
- v_hid=globs.v_hid,
93
- v_min=globs.v_min,
94
- ph=globs.ph,
95
- ec=globs.ec,
96
- tS=globs.tS,
97
- tA=globs.tA,
98
- hDm=globs.hDm,
99
- sVen=globs.sVen,
100
- rFul=globs.rFul,
101
- rLi=globs.rLi,
102
- rWat=globs.rWat,
103
- rRas=globs.rRas,
104
- rPH=globs.rPH,
105
- rEC=globs.rEC,
106
- rSl=globs.rSl,
107
- rLe=globs.rLe,
108
- alW=globs.alW
109
- )
110
-
111
 
112
 
113
 
@@ -117,126 +94,6 @@ def settings():
117
  return render_template('settings.html')
118
 
119
 
120
- @app.route('/settings_api', methods=['GET'])
121
- def settings_api():
122
- return jsonify(ph_eep=globs.ph_eep,
123
- ph_on_eep=globs.ph_on_eep,
124
- ec_eep=globs.ec_eep,
125
- ec_A_eep=globs.ec_A_eep,
126
- ec_B_eep=globs.ec_B_eep,
127
- ec_C_eep=globs.ec_C_eep,
128
- l_ON_h_eep=globs.l_ON_h_eep,
129
- l_ON_m_eep=globs.l_ON_m_eep,
130
- l_OFF_h_eep=globs.l_OFF_h_eep,
131
- l_OFF_m_eep=globs.l_OFF_m_eep,
132
- t_Voz_eep=globs.t_Voz_eep
133
- )
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
- @app.route('/pH_set', methods=['GET'])
144
- def set_pH_value():
145
- ph_value = request.args.get('value')
146
- globs.ph_set = ph_value
147
- globs.eep_set = 1
148
- return "pH value set successfully"
149
-
150
-
151
- @app.route('/ph_on_set', methods=['GET'])
152
- def ph_on_value():
153
- ph_on_value = request.args.get('value')
154
- globs.ph_on_set = ph_on_value
155
- globs.eep_set = 2
156
- return "EC value set successfully"
157
-
158
-
159
-
160
- @app.route('/EC_set', methods=['GET'])
161
- def set_EC_value():
162
- ec_value = request.args.get('value')
163
- globs.ec_set = ec_value
164
- globs.eep_set = 3
165
- return "EC value set successfully"
166
-
167
- @app.route('/ec_A_set', methods=['GET'])
168
- def ec_A_setValue():
169
- ec_A_setValue = request.args.get('value')
170
- globs.ec_A_set = ec_A_setValue
171
- globs.eep_set = 4
172
- return "EC value set successfully"
173
-
174
- @app.route('/ec_B_set', methods=['GET'])
175
- def ec_B_setValue():
176
- ec_B_setValue = request.args.get('value')
177
- globs.ec_B_set = ec_B_setValue
178
- globs.eep_set = 5
179
- return "EC value set successfully"
180
-
181
- @app.route('/ec_C_set', methods=['GET'])
182
- def ec_C_setValue():
183
- ec_C_setValue = request.args.get('value')
184
- globs.ec_C_set = ec_C_setValue
185
- globs.eep_set = 6
186
- return "EC value set successfully"
187
-
188
-
189
- @app.route('/l_ON_set', methods=['GET'])
190
- def l_ON_set():
191
- globs.l_ON_h_set = request.args.get('l_ON_h_set')
192
- globs.l_ON_m_set = request.args.get('l_ON_m_set')
193
- globs.eep_set = 7
194
- return "EC value set successfully"
195
-
196
-
197
-
198
- @app.route('/l_OFF_set', methods=['GET'])
199
- def l_OFF_set():
200
- globs.l_OFF_h_set = request.args.get('l_OFF_h_set')
201
- globs.l_OFF_m_set = request.args.get('l_OFF_m_set')
202
- globs.eep_set = 8
203
- return "EC value set successfully"
204
-
205
-
206
-
207
-
208
- @app.route('/t_Voz_eep_set', methods=['GET'])
209
- def t_Voz_eep_set():
210
- t_Voz_eep_set = request.args.get('value')
211
- globs.ec_t_Voz_set = t_Voz_eep_set
212
- globs.eep_set = 9
213
- return "EC value set successfully"
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
- @app.route('/but_start', methods=['GET'])
222
- def but_start():
223
- globs.eep_set = 10
224
- return jsonify(value_set="start")
225
-
226
- @app.route('/but_stop', methods=['GET'])
227
- def but_stop():
228
- globs.eep_set = 11
229
- return jsonify(value_set="stop")
230
-
231
- @app.route('/but_res', methods=['GET'])
232
- def but_res():
233
- globs.eep_set = 12
234
- return jsonify(value_set="res")
235
-
236
- @app.route('/but_sliv', methods=['GET'])
237
- def but_sliv():
238
- globs.eep_set = 13
239
- return jsonify(value_set="sliv")
240
 
241
 
242
 
 
85
 
86
 
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
 
90
 
 
94
  return render_template('settings.html')
95
 
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
 
99