mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added CMD_SET_PATH_HASH_MODE
This commit is contained in:
parent
e52d57c065
commit
5b0884ad2d
2 changed files with 10 additions and 4 deletions
|
|
@ -57,6 +57,7 @@
|
|||
#define CMD_SET_AUTOADD_CONFIG 58
|
||||
#define CMD_GET_AUTOADD_CONFIG 59
|
||||
#define CMD_GET_ALLOWED_REPEAT_FREQ 60
|
||||
#define CMD_SET_PATH_HASH_MODE 61
|
||||
|
||||
// Stats sub-types for CMD_GET_STATS
|
||||
#define STATS_TYPE_CORE 0
|
||||
|
|
@ -1308,14 +1309,19 @@ void MyMesh::handleCmdFrame(size_t len) {
|
|||
_prefs.advert_loc_policy = cmd_frame[3];
|
||||
if (len >= 5) {
|
||||
_prefs.multi_acks = cmd_frame[4];
|
||||
if (len >= 6) {
|
||||
_prefs.path_hash_mode = cmd_frame[5];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
savePrefs();
|
||||
writeOKFrame();
|
||||
} else if (cmd_frame[0] == CMD_SET_PATH_HASH_MODE && cmd_frame[1] == 0 && len >= 3) {
|
||||
if (cmd_frame[2] >= 3) {
|
||||
writeErrFrame(ERR_CODE_ILLEGAL_ARG);
|
||||
} else {
|
||||
_prefs.path_hash_mode = cmd_frame[2];
|
||||
savePrefs();
|
||||
writeOKFrame();
|
||||
}
|
||||
} else if (cmd_frame[0] == CMD_REBOOT && memcmp(&cmd_frame[1], "reboot", 6) == 0) {
|
||||
if (dirty_contacts_expiry) { // is there are pending dirty contacts write needed?
|
||||
saveContacts();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "AbstractUITask.h"
|
||||
|
||||
/*------------ Frame Protocol --------------*/
|
||||
#define FIRMWARE_VER_CODE 9
|
||||
#define FIRMWARE_VER_CODE 10
|
||||
|
||||
#ifndef FIRMWARE_BUILD_DATE
|
||||
#define FIRMWARE_BUILD_DATE "15 Feb 2026"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue