Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
neOCampus-arduino
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GIS-neOCampus
neOSensor
neOCampus-arduino
Commits
2df3a98a
Commit
2df3a98a
authored
3 years ago
by
thiebolt
Browse files
Options
Downloads
Patches
Plain Diff
SCD4x integration is over --> sensor operational :)
parent
fcf267dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
neosensor/libraries/boards/neosensor.h
+1
-1
1 addition, 1 deletion
neosensor/libraries/boards/neosensor.h
neosensor/libraries/neocampus_drivers/oled1.3inch.cpp
+9
-8
9 additions, 8 deletions
neosensor/libraries/neocampus_drivers/oled1.3inch.cpp
with
10 additions
and
9 deletions
neosensor/libraries/boards/neosensor.h
+
1
−
1
View file @
2df3a98a
...
...
@@ -42,7 +42,7 @@
*/
#define BOARD_NAME "neOSensor"
#define BOARD_REVISION 1.2
#define BOARD_FWREV 22031
4
// Firmware revision <year><month><day> in 2 digits each
#define BOARD_FWREV 22031
6
// Firmware revision <year><month><day> in 2 digits each
/* #############################################################################
...
...
This diff is collapsed.
Click to expand it.
neosensor/libraries/neocampus_drivers/oled1.3inch.cpp
+
9
−
8
View file @
2df3a98a
...
...
@@ -15,6 +15,7 @@
@section HISTORY
F.Thiebolt mar.22 change order (airquality before luminosity)
2021-Nov - F.Thiebolt clear display in destructor
2021-Sep - F.Thiebolt considering 1.3 inches oleds based on SH1106
2020-Nov - F.Thiebolt Initial Release
...
...
@@ -359,16 +360,16 @@ uint8_t oled13inch::dispTime( uint8_t hours, uint8_t minutes, uint8_t seconds )
}
{
const
char
*
_key
=
PSTR
(
"
luminos
ity"
);
const
char
*
_key
=
PSTR
(
"
airqual
ity"
);
if
(
strncmp_P
(
kv
.
key
().
c_str
(),
_key
,
strlen_P
(
_key
))
==
0
)
{
//
luminos
ity
//
airqual
ity
//serializeJsonPretty( kv.value(), Serial );
for
(
JsonPair
_kv
:
(
kv
.
value
()).
as
<
JsonObject
>
()
)
{
//log_debug(F("\n[oled13inch][
luminos
ity] key: ")); log_debug(_kv.key().c_str()); log_flush();
//log_debug(F("\n[oled13inch][
airqual
ity] key: ")); log_debug(_kv.key().c_str()); log_flush();
const
char
*
_key2avoid
=
PSTR
(
"value_units"
);
//if( strncmp_P(_kv.key().c_str(), _key2avoid, strlen_P(_key2avoid))!=0 ) {
if
(
strstr_P
(
_kv
.
key
().
c_str
(),
_key2avoid
)
==
nullptr
)
{
//snprintf( _str, sizeof(_str), "%
dlux"
, _kv.value().as<int>());
//snprintf( _str, sizeof(_str), "%
s:%dµg/m3", _kv.key().c_str()
, _kv.value().as<int>());
snprintf
(
_str
,
sizeof
(
_str
),
"%d%s"
,
_kv
.
value
().
as
<
int
>
(),
_getUnits
(
_kv
.
key
().
c_str
(),
(
kv
.
value
()).
as
<
JsonObject
>
()
)
);
_u8g2
->
drawUTF8
(
x_offset
,
y_offset
,
_str
);
y_offset
+=
(
str_height
+
0
);
...
...
@@ -381,16 +382,16 @@ uint8_t oled13inch::dispTime( uint8_t hours, uint8_t minutes, uint8_t seconds )
}
{
const
char
*
_key
=
PSTR
(
"
airqual
ity"
);
const
char
*
_key
=
PSTR
(
"
luminos
ity"
);
if
(
strncmp_P
(
kv
.
key
().
c_str
(),
_key
,
strlen_P
(
_key
))
==
0
)
{
//
airqual
ity
//
luminos
ity
//serializeJsonPretty( kv.value(), Serial );
for
(
JsonPair
_kv
:
(
kv
.
value
()).
as
<
JsonObject
>
()
)
{
//log_debug(F("\n[oled13inch][
airqual
ity] key: ")); log_debug(_kv.key().c_str()); log_flush();
//log_debug(F("\n[oled13inch][
luminos
ity] key: ")); log_debug(_kv.key().c_str()); log_flush();
const
char
*
_key2avoid
=
PSTR
(
"value_units"
);
//if( strncmp_P(_kv.key().c_str(), _key2avoid, strlen_P(_key2avoid))!=0 ) {
if
(
strstr_P
(
_kv
.
key
().
c_str
(),
_key2avoid
)
==
nullptr
)
{
//snprintf( _str, sizeof(_str), "%
s:%dµg/m3", _kv.key().c_str()
, _kv.value().as<int>());
//snprintf( _str, sizeof(_str), "%
dlux"
, _kv.value().as<int>());
snprintf
(
_str
,
sizeof
(
_str
),
"%d%s"
,
_kv
.
value
().
as
<
int
>
(),
_getUnits
(
_kv
.
key
().
c_str
(),
(
kv
.
value
()).
as
<
JsonObject
>
()
)
);
_u8g2
->
drawUTF8
(
x_offset
,
y_offset
,
_str
);
y_offset
+=
(
str_height
+
0
);
...
...
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