From aa60639307cdc8a390c7cf225548a5a62cfc0996 Mon Sep 17 00:00:00 2001 From: Pierrick C Date: Thu, 2 Aug 2018 00:15:25 +0200 Subject: [PATCH] Add : do not try again to write data on flash if it failed with read-only error --- circuitpython/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/circuitpython/main.py b/circuitpython/main.py index de15027..fabf11e 100644 --- a/circuitpython/main.py +++ b/circuitpython/main.py @@ -23,8 +23,8 @@ Use with: * Bosch BME280 sensor (air temperature, humidity, atmospheric pressure) on I2C TODO for v1 : - * write data on flash drive - * send data through UART (one more !) + * write data on flash drive (work-in-progress) + * send data through UART (one more !) """ __version__ = 0.1 __repo__ = "https://framagit.org/arofarn/Cameteo" @@ -133,6 +133,7 @@ class Data: self.data['BME280']['press']['val'])) except OSError as e: print("Err. {} : R-O FS".format(e)) + backup_data = False #to avoid trying again till next reset #############