Validate beacon power without stranding saved settings

This commit is contained in:
mikecarper committed 2026-10-16 00:39:07 -07:00
1 parent adbeb2d007
commit d5cc73c43d
15 files changed
+662 -7

No files matched your search

+1 -2
View File
@@ -3,7 +3,6 @@
#if MESH_ENABLE_TX_BEACONS
#include <helpers/BeaconFrames.h>
#include <helpers/radiolib/RadioPowerLimits.h>
#include <string.h>
namespace mesh {
@@ -12,7 +11,7 @@ bool Mesh::validateTextBeacon(const BeaconSlot& slot) const {
if (!beacon::validText(slot.text) || slot.hops > 7
|| !RadioProfiles::valid(slot.radio)
|| !RadioProfiles::safePreamble(slot.radio, slot.radio.preamble ? slot.radio.preamble : 32)
|| slot.power < -9 || !isLoRaTxPowerValid(slot.power, slot.radio.freq)
|| !_radio->validateBeaconPower(slot.radio.freq, slot.power)
|| !_radio->validateProfile(slot.radio)) return false;
if (slot.radio.protocol == RadioProfileProtocol::MeshCore) return true;
#if MESH_ENABLE_MESHTEXT_WIRE