mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
283 add new permision for access to environment sensors
This commit is contained in:
parent
c69657a13b
commit
8b3d60abe7
2 changed files with 4 additions and 3 deletions
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <CayenneLPP.h>
|
||||
|
||||
#define TELEM_PERM_BASE 0x01 // 'base' permission includes battery
|
||||
#define TELEM_PERM_LOCATION 0x02
|
||||
#define TELEM_PERM_BASE 0x01 // 'base' permission includes battery
|
||||
#define TELEM_PERM_LOCATION 0x02
|
||||
#define TELEM_PERM_ENVIRONMENT 0x04 // permission to access environment sensors
|
||||
|
||||
#define TELEM_CHANNEL_SELF 1 // LPP data channel for 'self' device
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ bool PromicroSensorManager::begin() {
|
|||
|
||||
bool PromicroSensorManager::querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) {
|
||||
// TODO: what is the correct permission here?
|
||||
if (requester_permissions && TELEM_PERM_BASE) {
|
||||
if (requester_permissions && TELEM_PERM_ENVIRONMENT) {
|
||||
if (INA3221initialized) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
// add only enabled INA3221 channels to telemetry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue