Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
a32948b7
Commit
a32948b7
authored
3 years ago
by
rahix
Browse files
Options
Downloads
Plain Diff
Merge 'Fix text in bme680 demo'
See merge request
card10/firmware!501
parents
5a59f95c
bb04a1ef
No related branches found
No related tags found
1 merge request
!501
Fix text in bme680 demo
Pipeline
#5372
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
preload/apps/bme680_sensor_demo/__init__.py
+6
-6
6 additions, 6 deletions
preload/apps/bme680_sensor_demo/__init__.py
with
6 additions
and
6 deletions
preload/apps/bme680_sensor_demo/__init__.py
+
6
−
6
View file @
a32948b7
...
@@ -26,32 +26,32 @@ def rate_iaq(iaq):
...
@@ -26,32 +26,32 @@ def rate_iaq(iaq):
# "Headaches, additional neurotoxic effects possible"
# "Headaches, additional neurotoxic effects possible"
# "Contamination needs to be identified; avoid presence in room and maximize ventilation"
# "Contamination needs to be identified; avoid presence in room and maximize ventilation"
# return (color.from_hex(0x663300), "Extrem. p.")
# return (color.from_hex(0x663300), "Extrem. p.")
return
(
color
.
from_hex
(
0x663300
),
"
Extremly p
"
)
return
(
color
.
from_hex
(
0x663300
),
"
Extremly p
olluted
"
)
if
iaq
>
250
:
if
iaq
>
250
:
# "Severely polluted"
# "Severely polluted"
# "More severe health issue possible if harmful VOC present"
# "More severe health issue possible if harmful VOC present"
# "Contamination should be identified if level is reached even
# "Contamination should be identified if level is reached even
# w/o presence of people; maximize ventilation & reduce attendance"
# w/o presence of people; maximize ventilation & reduce attendance"
# return (color.from_hex(0x99004c), "Severly p.")
# return (color.from_hex(0x99004c), "Severly p.")
return
(
color
.
from_hex
(
0x99004C
),
"
Severly p
"
)
return
(
color
.
from_hex
(
0x99004C
),
"
Severly p
olluted
"
)
if
iaq
>
200
:
if
iaq
>
200
:
# "Heavily polluted"
# "Heavily polluted"
# "Exposition might lead to effects like headache depending on type of VOCs"
# "Exposition might lead to effects like headache depending on type of VOCs"
# "Optimize ventilation"
# "Optimize ventilation"
# return (color.from_hex(0xff0000), "Heavily p.")
# return (color.from_hex(0xff0000), "Heavily p.")
return
(
color
.
from_hex
(
0xFF0000
),
"
Heavily p
"
)
return
(
color
.
from_hex
(
0xFF0000
),
"
Heavily p
olluted
"
)
if
iaq
>
150
:
if
iaq
>
150
:
# "Moderately polluted"
# "Moderately polluted"
# "More significant irritation possible"
# "More significant irritation possible"
# "Increase ventilation with clean air"
# "Increase ventilation with clean air"
# return (color.from_hex(0xff7e00), "Modera. p.")
# return (color.from_hex(0xff7e00), "Modera. p.")
return
(
color
.
from_hex
(
0xFF7E00
),
"
Moderate p
"
)
return
(
color
.
from_hex
(
0xFF7E00
),
"
Moderate p
olluted
"
)
if
iaq
>
100
:
if
iaq
>
100
:
# "Lightly polluted"
# "Lightly polluted"
# "Reduction of well-being possible"
# "Reduction of well-being possible"
# "Ventilation suggested"
# "Ventilation suggested"
# return (color.from_hex(0xffff00), "Lightly p.")
# return (color.from_hex(0xffff00), "Lightly p.")
return
(
color
.
from_hex
(
0xFFFF00
),
"
Lightly p
"
)
return
(
color
.
from_hex
(
0xFFFF00
),
"
Lightly p
olluted
"
)
if
iaq
>
50
:
if
iaq
>
50
:
# "Good"
# "Good"
# "No irritation or impact on well-being"
# "No irritation or impact on well-being"
...
@@ -130,7 +130,7 @@ def main():
...
@@ -130,7 +130,7 @@ def main():
elif
data
.
iaq_accuracy
==
1
:
elif
data
.
iaq_accuracy
==
1
:
disp
.
print
(
"
IAQ:
"
,
posy
=
64
,
font
=
2
)
disp
.
print
(
"
IAQ:
"
,
posy
=
64
,
font
=
2
)
disp
.
print
(
disp
.
print
(
"
Calibratin
"
,
posy
=
64
,
posx
=
45
+
5
,
font
=
2
,
fg
=
color
.
YELLOW
"
Calibratin
g
"
,
posy
=
64
,
posx
=
45
+
5
,
font
=
2
,
fg
=
color
.
YELLOW
)
)
else
:
else
:
if
data
.
iaq_accuracy
==
2
:
if
data
.
iaq_accuracy
==
2
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment