projects
/
EVA-2020-02-2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a36c0e8
)
Replaced exception pass with log warning
author
Phil Howard
<phil@gadgetoid.com>
Tue, 20 Aug 2019 15:34:23 +0000
(16:34 +0100)
committer
Phil Howard
<phil@gadgetoid.com>
Tue, 20 Aug 2019 15:34:23 +0000
(16:34 +0100)
examples/all-in-one.py
patch
|
blob
|
blame
|
history
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)