|
|
@ -233,7 +233,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
uint8_t sf = num > 2 ? atoi(parts[2]) : 0; |
|
|
uint8_t sf = num > 2 ? atoi(parts[2]) : 0; |
|
|
uint8_t cr = num > 3 ? atoi(parts[3]) : 0; |
|
|
uint8_t cr = num > 3 ? atoi(parts[3]) : 0; |
|
|
int temp_timeout_mins = num > 4 ? atoi(parts[4]) : 0; |
|
|
int temp_timeout_mins = num > 4 ? atoi(parts[4]) : 0; |
|
|
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) { |
|
|
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) { |
|
|
_callbacks->applyTempRadioParams(freq, bw, sf, cr, temp_timeout_mins); |
|
|
_callbacks->applyTempRadioParams(freq, bw, sf, cr, temp_timeout_mins); |
|
|
sprintf(reply, "OK - temp params for %d mins", temp_timeout_mins); |
|
|
sprintf(reply, "OK - temp params for %d mins", temp_timeout_mins); |
|
|
} else { |
|
|
} else { |
|
|
@ -411,7 +411,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
float bw = num > 1 ? atof(parts[1]) : 0.0f; |
|
|
float bw = num > 1 ? atof(parts[1]) : 0.0f; |
|
|
uint8_t sf = num > 2 ? atoi(parts[2]) : 0; |
|
|
uint8_t sf = num > 2 ? atoi(parts[2]) : 0; |
|
|
uint8_t cr = num > 3 ? atoi(parts[3]) : 0; |
|
|
uint8_t cr = num > 3 ? atoi(parts[3]) : 0; |
|
|
if (freq >= 300.0f && freq <= 2500.0f && sf >= 7 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f) { |
|
|
if (freq >= 300.0f && freq <= 2500.0f && sf >= 5 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7.0f && bw <= 500.0f) { |
|
|
_prefs->sf = sf; |
|
|
_prefs->sf = sf; |
|
|
_prefs->cr = cr; |
|
|
_prefs->cr = cr; |
|
|
_prefs->freq = freq; |
|
|
_prefs->freq = freq; |
|
|
|