Update api_logic.py
Browse files- api_logic.py +14 -16
api_logic.py
CHANGED
@@ -60,23 +60,21 @@ def api():
|
|
60 |
else:
|
61 |
err = 0
|
62 |
|
63 |
-
#
|
64 |
response = {
|
65 |
-
"
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
"err": int(err)
|
79 |
-
}
|
80 |
}
|
81 |
|
82 |
return jsonify(response)
|
|
|
60 |
else:
|
61 |
err = 0
|
62 |
|
63 |
+
# Формируем ответ в нужном формате
|
64 |
response = {
|
65 |
+
"OFF_h_set": int(globs.l_OFF_h_set),
|
66 |
+
"OFF_m_set": int(globs.l_OFF_m_set),
|
67 |
+
"ON_h_set": int(globs.l_ON_h_set),
|
68 |
+
"ON_m_set": int(globs.l_ON_m_set),
|
69 |
+
"ec_A_set": float(globs.ec_A_set),
|
70 |
+
"ec_B_set": float(globs.ec_B_set),
|
71 |
+
"ec_C_set": float(globs.ec_C_set),
|
72 |
+
"ec_set": float(globs.ec_set),
|
73 |
+
"ec_t_Voz_set": int(globs.ec_t_Voz_set),
|
74 |
+
"eep_set": int(globs.eep_set),
|
75 |
+
"err": int(err),
|
76 |
+
"ph_on_set": float(globs.ph_on_set),
|
77 |
+
"ph_set": float(globs.ph_set)
|
|
|
|
|
78 |
}
|
79 |
|
80 |
return jsonify(response)
|