mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added 'ver' command to CLI (repeater and room server)
This commit is contained in:
parent
e78aa66d57
commit
a3b7701bc0
2 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
/* ------------------------------ Config -------------------------------- */
|
/* ------------------------------ Config -------------------------------- */
|
||||||
|
|
||||||
|
#define FIRMWARE_VER_TEXT "v1 (build: 24 Jan 2025)"
|
||||||
|
|
||||||
#ifndef LORA_FREQ
|
#ifndef LORA_FREQ
|
||||||
#define LORA_FREQ 915.0
|
#define LORA_FREQ 915.0
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -389,8 +391,10 @@ public:
|
||||||
} else {
|
} else {
|
||||||
sprintf(reply, "unknown config: %s", &command[4]);
|
sprintf(reply, "unknown config: %s", &command[4]);
|
||||||
}
|
}
|
||||||
|
} else if (memcmp(command, "ver", 3) == 0) {
|
||||||
|
strcpy(reply, FIRMWARE_VER_TEXT);
|
||||||
} else {
|
} else {
|
||||||
sprintf(reply, "Unknown: %s (commands: reboot, advert, clock, set)", command);
|
sprintf(reply, "Unknown: %s (commands: reboot, advert, clock, set, ver)", command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
/* ------------------------------ Config -------------------------------- */
|
/* ------------------------------ Config -------------------------------- */
|
||||||
|
|
||||||
|
#define FIRMWARE_VER_TEXT "v1 (build: 24 Jan 2025)"
|
||||||
|
|
||||||
#ifndef LORA_FREQ
|
#ifndef LORA_FREQ
|
||||||
#define LORA_FREQ 915.0
|
#define LORA_FREQ 915.0
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -466,6 +468,8 @@ public:
|
||||||
} else {
|
} else {
|
||||||
sprintf(reply, "unknown config: %s", &command[4]);
|
sprintf(reply, "unknown config: %s", &command[4]);
|
||||||
}
|
}
|
||||||
|
} else if (memcmp(command, "ver", 3) == 0) {
|
||||||
|
strcpy(reply, FIRMWARE_VER_TEXT);
|
||||||
} else {
|
} else {
|
||||||
// unknown command
|
// unknown command
|
||||||
reply[0] = 0;
|
reply[0] = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue