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
96418e28
Commit
96418e28
authored
3 years ago
by
francois
Browse files
Options
Downloads
Patches
Plain Diff
switch back to regular IKEA PMsensor commands + added hex_dump for frames
parent
2df3a98a
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/neocampus_drivers/SCD4x.cpp
+1
-1
1 addition, 1 deletion
neosensor/libraries/neocampus_drivers/SCD4x.cpp
neosensor/libraries/neocampus_drivers/pm_serial.cpp
+9
-2
9 additions, 2 deletions
neosensor/libraries/neocampus_drivers/pm_serial.cpp
with
10 additions
and
3 deletions
neosensor/libraries/neocampus_drivers/SCD4x.cpp
+
1
−
1
View file @
96418e28
...
...
@@ -26,7 +26,7 @@
#include
"neocampus_debug.h"
#include
"neocampus_i2c.h"
//
[may.20]
debug
//
for hex_dump
debug
#include
"neocampus_utils.h"
...
...
This diff is collapsed.
Click to expand it.
neosensor/libraries/neocampus_drivers/pm_serial.cpp
+
9
−
2
View file @
96418e28
...
...
@@ -23,6 +23,9 @@
#include
"neocampus.h"
#include
"neocampus_debug.h"
// for hex_dump debug
#include
"neocampus_utils.h"
#include
"pm_serial.h"
// neOCampus driver
...
...
@@ -870,8 +873,8 @@ boolean pm_serial::_ll_requestRead( void ) {
res
=
true
;
}
else
if
(
_sensor_type
==
pmSensorType_t
::
IKEA
)
{
//
uint8_t command[] = { 0x11, 0x01, 0x02, 0xEC }; // regular command
uint8_t
command
[]
=
{
0x11
,
0x02
,
0x0b
,
0x01
,
0xE1
};
// [feb.22] hidden command
uint8_t
command
[]
=
{
0x11
,
0x01
,
0x02
,
0xEC
};
// regular command
//
uint8_t command[] = { 0x11, 0x02, 0x0b, 0x01, 0xE1 }; // [feb.22] hidden command
_stream
->
write
(
command
,
sizeof
(
command
));
delay
(
50
);
res
=
true
;
}
...
...
@@ -1132,6 +1135,10 @@ boolean pm_serial::serialRead_ikea( uint16_t timeout ) {
continue
;
}
// DEBUG
log_debug
(
F
(
"
\n
[pm_serial][IKEA] frame received: "
));
log_flush
();
hex_dump
(
(
char
*
)
_payload
,
min
(
sizeof
(
_payload
),(
unsigned
int
)(
_frameLen
-
1
))
);
uint16_t
value
;
// Atmospheric Environment.
//value = makeWord(_payload[6], _payload[7]); // PM1_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