projects
/
EVA-2020-02-2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'cipy-use-generic-variables'
[EVA-2020-02-2.git]
/
examples
/
all-in-one.py
diff --git
a/examples/all-in-one.py
b/examples/all-in-one.py
index 85a9a155ce8e7c12860f64c3e394cc0bfabe056b..eef99c36b7eea36846073685af9f371823e5642b 100755
(executable)
--- a/
examples/all-in-one.py
+++ b/
examples/all-in-one.py
@@
-102,7
+102,7
@@
factor = 0.8
cpu_temps = [get_cpu_temperature()] * 5
delay = 0.5 # Debounce the proximity tap
cpu_temps = [get_cpu_temperature()] * 5
delay = 0.5 # Debounce the proximity tap
-mode = 0 # The starting mode
+mode = 0
# The starting mode
last_page = 0
light = 1
last_page = 0
light = 1
@@
-194,7
+194,7
@@
try:
try:
data = pms5003.read()
except pmsReadTimeoutError:
try:
data = pms5003.read()
except pmsReadTimeoutError:
- pass
+ logging.warn("Failed to read PMS5003")
else:
data = data.pm_ug_per_m3(1.0)
display_text(variables[mode], data, unit)
else:
data = data.pm_ug_per_m3(1.0)
display_text(variables[mode], data, unit)
@@
-205,7
+205,7
@@
try:
try:
data = pms5003.read()
except pmsReadTimeoutError:
try:
data = pms5003.read()
except pmsReadTimeoutError:
- pass
+ logging.warn("Failed to read PMS5003")
else:
data = data.pm_ug_per_m3(2.5)
display_text(variables[mode], data, unit)
else:
data = data.pm_ug_per_m3(2.5)
display_text(variables[mode], data, unit)
@@
-216,7
+216,7
@@
try:
try:
data = pms5003.read()
except pmsReadTimeoutError:
try:
data = pms5003.read()
except pmsReadTimeoutError:
- pass
+ logging.warn("Failed to read PMS5003")
else:
data = data.pm_ug_per_m3(10)
display_text(variables[mode], data, unit)
else:
data = data.pm_ug_per_m3(10)
display_text(variables[mode], data, unit)