Skip to content

Commit 4a29787

Browse files
author
Scott Powell
committed
* Sensor: "get acl" command
1 parent be68aae commit 4a29787

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/simple_sensor/SensorMesh.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
#define LAZY_CONTACTS_WRITE_DELAY 5000
6161

62-
#define ALERT_ACK_EXPIRY_MILLIS 6000 // wait 6 secs for ACKs to alert messages
62+
#define ALERT_ACK_EXPIRY_MILLIS 8000 // wait 8 secs for ACKs to alert messages
6363

6464
static File openAppend(FILESYSTEM* _fs, const char* fname) {
6565
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
@@ -497,13 +497,14 @@ void SensorMesh::handleCommand(uint32_t sender_timestamp, char* command, char* r
497497
strcpy(reply, "Err - bad pubkey");
498498
}
499499
}
500-
} else if (sender_timestamp == 0 && strcmp(command, "getperm") == 0) {
501-
Serial.println("Permissions:");
500+
} else if (sender_timestamp == 0 && strcmp(command, "get acl") == 0) {
501+
Serial.println("ACL:");
502502
for (int i = 0; i < num_contacts; i++) {
503503
auto c = &contacts[i];
504504

505+
Serial.printf("%04X ", c->permissions);
505506
mesh::Utils::printHex(Serial, c->id.pub_key, PUB_KEY_SIZE);
506-
Serial.printf(" %04X\n", c->permissions);
507+
Serial.printf("\n");
507508
}
508509
reply[0] = 0;
509510
} else {

0 commit comments

Comments
 (0)