Add Vbat to written data on flash
This commit is contained in:
parent
6141e4a9b2
commit
b7187d6d54
@ -199,10 +199,11 @@ class Data:
|
||||
"""Save the current data as csv file on SPI flash"""
|
||||
try:
|
||||
with open("data/data.csv", "a") as csv_file:
|
||||
csv_file.write("{};{};{};{}\n".format(self.data['SYS']['time'],
|
||||
csv_file.write("{};{};{};{};{}\n".format(self.data['SYS']['time'],
|
||||
self.data['BME']['temp'],
|
||||
self.data['BME']['hum'],
|
||||
self.data['BME']['press']))
|
||||
self.data['BME']['press'],
|
||||
self.data['SYS']['vbat']))
|
||||
except OSError as e:
|
||||
print("Err {}: readonly".format(e))
|
||||
backup_data = False #to avoid trying again till next reset
|
||||
|
Loading…
Reference in New Issue
Block a user