Trim remaining validation wording in small Companion profiles

This commit is contained in:
mikecarper committed 2026-10-28 04:44:06 -07:00
1 parent f973e4a952
commit 8f20fe5d83
6 files changed
+111 -19

No files matched your search

+3 -1
View File
@@ -1,5 +1,7 @@
#pragma once
#include <helpers/CLIReplyText.h>
#include <cstdio>
#include <cstring>
#include <cstdint>
@@ -87,7 +89,7 @@ bool handleRetryCommand(CompanionNodePrefs& prefs, const char* command,
prefs.flood_retry_max_path = old_path;
prefs.flood_retry_group_max_path = old_group_path;
prefs.flood_retry_advert_enabled = old_advert;
snprintf(reply, reply_size, "Error: retry setting could not be saved");
snprintf(reply, reply_size, MESH_CLI_REPLY_TEXT("Error: retry setting could not be saved", "Error: retry setting not saved"));
return true;
}
if (old_count != 0 && prefs.flood_retry_attempts == 0) cancel_flood_retries();
+3 -3
View File
@@ -9398,7 +9398,7 @@ bool MyMesh::handleRxPowerSavingGetCommand(const char* command, char* reply,
const bool config = strcmp(command, "get radio.rxps.config") == 0;
if (!config && strcmp(command, "get radio.rxps") != 0) return false;
if (!radio_driver.supportsRxPowerSaving()) {
mesh::cli::formatError(reply, reply_size, "RX power saving is unsupported on this radio");
mesh::cli::formatError(reply, reply_size, MESH_CLI_REPLY_TEXT("RX power saving is unsupported on this radio", "RX power saving unsupported on radio"));
return true;
}
@@ -11007,7 +11007,7 @@ bool MyMesh::handleDirectCommand(const char* command, char* reply, size_t reply_
#else
if (strcmp(command, "get dm.one_key") == 0 || strcmp(command, "get dm.held") == 0 ||
strncmp(command, "set dm.one_key ", 15) == 0) {
mesh::cli::formatError(reply, reply_size, "one-key DMs unsupported on this build");
mesh::cli::formatError(reply, reply_size, MESH_CLI_REPLY_TEXT("one-key DMs unsupported on this build", "one-key DMs unsupported in build"));
return true;
}
#endif
@@ -11359,7 +11359,7 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp,
if (strncmp(command, "set tx ", 7) == 0) {
int32_t parsed = 0;
if (!mesh::cli::parseIntegerStrict(command + 7, parsed)) {
mesh::cli::formatError(reply, reply_capacity, "invalid TX power");
mesh::cli::formatError(reply, reply_capacity, MESH_CLI_REPLY_TEXT("invalid TX power", "bad TX power"));
} else if (parsed < -9 || parsed > MAX_LORA_TX_POWER) {
snprintf(reply, reply_capacity, "Error: TX -9..%d dBm",
MAX_LORA_TX_POWER);
+2 -1
View File
@@ -1,3 +1,4 @@
#include <helpers/CLIReplyText.h>
#include "MyMesh.h"
#include "target.h"
#include "NotificationSettingsFile.h"
@@ -160,7 +161,7 @@ bool MyMesh::handleNotificationCommand(const char* command,char* reply,size_t si
bool MyMesh::handleNotificationCommand(const char* command,char* reply,size_t size) {
if(strncmp(command,"set notify.",11)&&strncmp(command,"get notify",10)
&&strncmp(command,"notify.",7))return false;
snprintf(reply,size,"Error: programmable alerts unavailable on this compact STM32 build");
snprintf(reply,size,MESH_CLI_REPLY_TEXT("Error: programmable alerts unavailable on this compact STM32 build", "Error: programmable alerts unavailable on compact STM32"));
return true;
}
#endif