DmitrMakeev commited on
Commit
79c2681
·
verified ·
1 Parent(s): 485c3bb

Update api_logic.py

Browse files
Files changed (1) hide show
  1. api_logic.py +17 -17
api_logic.py CHANGED
@@ -63,22 +63,22 @@ def api():
63
  err = 0
64
 
65
  # Оборачиваем ответ в "set_deta"
66
- response = {
67
- "set_deta": {
68
- "1_ph_set": globs.ph_set,
69
- "2_ph_on_set": globs.ph_on_set,
70
- "3_ec_set": globs.ec_set,
71
- "4_ec_A_set": globs.ec_A_set,
72
- "5_ec_B_set": globs.ec_B_set,
73
- "6_ec_C_set": globs.ec_C_set,
74
- "7_l_ON_h_set": globs.l_ON_h_set,
75
- "7_l_ON_m_set": globs.l_ON_m_set,
76
- "8_l_OFF_h_set": globs.l_OFF_h_set,
77
- "8_l_OFF_m_set": globs.l_OFF_m_set,
78
- "9_ec_t_Voz_set": globs.ec_t_Voz_set,
79
- "eep_set": globs.eep_set,
80
- "err": err
81
- }
82
  }
 
83
 
84
- return jsonify(response)
 
63
  err = 0
64
 
65
  # Оборачиваем ответ в "set_deta"
66
+ response = {
67
+ "set_deta": {
68
+ "1_ph_set": float(globs.ph_set),
69
+ "2_ph_on_set": float(globs.ph_on_set),
70
+ "3_ec_set": float(globs.ec_set),
71
+ "4_ec_A_set": float(globs.ec_A_set),
72
+ "5_ec_B_set": float(globs.ec_B_set),
73
+ "6_ec_C_set": float(globs.ec_C_set),
74
+ "7_l_ON_h_set": int(globs.l_ON_h_set),
75
+ "7_l_ON_m_set": int(globs.l_ON_m_set),
76
+ "8_l_OFF_h_set": int(globs.l_OFF_h_set),
77
+ "8_l_OFF_m_set": int(globs.l_OFF_m_set),
78
+ "9_ec_t_Voz_set": int(globs.ec_t_Voz_set),
79
+ "eep_set": int(globs.eep_set),
80
+ "err": int(err)
 
81
  }
82
+ }
83
 
84
+ return jsonify(response)