Skip to content

Commit 9bfbb77

Browse files
authored
Merge pull request #1100 from stphnrdmr/dev
Allow SF smaller than 7 to be saved
2 parents 91e9fce + 16c294c commit 9bfbb77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/companion_radio/MyMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ void MyMesh::handleCmdFrame(size_t len) {
11281128
uint8_t sf = cmd_frame[i++];
11291129
uint8_t cr = cmd_frame[i++];
11301130

1131-
if (freq >= 300000 && freq <= 2500000 && sf >= 7 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7000 &&
1131+
if (freq >= 300000 && freq <= 2500000 && sf >= 5 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7000 &&
11321132
bw <= 500000) {
11331133
_prefs.sf = sf;
11341134
_prefs.cr = cr;

src/helpers/CommonCLI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
233233
uint8_t sf = num > 2 ? atoi(parts[2]) : 0;
234234
uint8_t cr = num > 3 ? atoi(parts[3]) : 0;
235235
int temp_timeout_mins = num > 4 ? atoi(parts[4]) : 0;
236-
if (freq >= 300.0f && freq <= 2500.0f && sf >= 7 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f && temp_timeout_mins > 0) {
236+
if (freq >= 300.0f && freq <= 2500.0f && sf >= 5 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f && temp_timeout_mins > 0) {
237237
_callbacks->applyTempRadioParams(freq, bw, sf, cr, temp_timeout_mins);
238238
sprintf(reply, "OK - temp params for %d mins", temp_timeout_mins);
239239
} else {
@@ -411,7 +411,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
411411
float bw = num > 1 ? atof(parts[1]) : 0.0f;
412412
uint8_t sf = num > 2 ? atoi(parts[2]) : 0;
413413
uint8_t cr = num > 3 ? atoi(parts[3]) : 0;
414-
if (freq >= 300.0f && freq <= 2500.0f && sf >= 7 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f) {
414+
if (freq >= 300.0f && freq <= 2500.0f && sf >= 5 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f) {
415415
_prefs->sf = sf;
416416
_prefs->cr = cr;
417417
_prefs->freq = freq;

0 commit comments

Comments
 (0)