DmitrMakeev commited on
Commit
6a77114
·
verified ·
1 Parent(s): 61c628b

Update api_logic.py

Browse files
Files changed (1) hide show
  1. api_logic.py +14 -16
api_logic.py CHANGED
@@ -60,23 +60,21 @@ def api():
60
  else:
61
  err = 0
62
 
63
- # Оборачиваем ответ в "set_deta"
64
  response = {
65
- "set_deta": {
66
- "1_ph_set": float(globs.ph_set),
67
- "2_ph_on_set": float(globs.ph_on_set),
68
- "3_ec_set": float(globs.ec_set),
69
- "4_ec_A_set": float(globs.ec_A_set),
70
- "5_ec_B_set": float(globs.ec_B_set),
71
- "6_ec_C_set": float(globs.ec_C_set),
72
- "7_l_ON_h_set": int(globs.l_ON_h_set),
73
- "7_l_ON_m_set": int(globs.l_ON_m_set),
74
- "8_l_OFF_h_set": int(globs.l_OFF_h_set),
75
- "8_l_OFF_m_set": int(globs.l_OFF_m_set),
76
- "9_ec_t_Voz_set": int(globs.ec_t_Voz_set),
77
- "eep_set": int(globs.eep_set),
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)