DmitrMakeev commited on
Commit
9c9c963
·
verified ·
1 Parent(s): a5cb592

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -36,6 +36,11 @@ def init_db(db_name):
36
  onA TEXT,
37
  onB TEXT,
38
  onC TEXT
 
 
 
 
 
39
 
40
  )
41
  ''')
@@ -88,13 +93,13 @@ def save_data_to_db(db_name, data):
88
  # Вставляем данные в таблицу
89
  cursor.execute('''
90
  INSERT INTO system_data (
91
- date_time, dey, wek, v_hid, v_min, ph, ec, tS, tA, hDm, sVen, onA, onB, onC
92
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
93
  ''', (
94
  current_time, # ✅ Дата и время по Москве
95
  data['dey'], data['wek'], data['v_hid'], data['v_min'], data['ph'], data['ec'],
96
  data['tS'], data['tA'], data['hDm'], data['sVen'], data['onA'], data['onB'],
97
- data['onC']
98
  ))
99
 
100
  conn.commit()
 
36
  onA TEXT,
37
  onB TEXT,
38
  onC TEXT
39
+ nPh TEXT,
40
+ nEC TEXT,
41
+ nTa TEXT,
42
+ nLon TEXT,
43
+ nLoff TEXT
44
 
45
  )
46
  ''')
 
93
  # Вставляем данные в таблицу
94
  cursor.execute('''
95
  INSERT INTO system_data (
96
+ date_time, dey, wek, v_hid, v_min, ph, ec, tS, tA, hDm, sVen, onA, onB, onC, nPh, nEC, nTa, nLon, nLoff
97
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
98
  ''', (
99
  current_time, # ✅ Дата и время по Москве
100
  data['dey'], data['wek'], data['v_hid'], data['v_min'], data['ph'], data['ec'],
101
  data['tS'], data['tA'], data['hDm'], data['sVen'], data['onA'], data['onB'],
102
+ data['onC'], data['nPh'], data['nEC'], data['nTa'], data['nLon'], data['nLoff']
103
  ))
104
 
105
  conn.commit()