@@ -231,8 +231,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
231231 strcpy (tmp, &command[10 ]);
232232 const char *parts[5 ];
233233 int num = mesh::Utils::parseTextParts (tmp, parts, 5 );
234- float freq = num > 0 ? atof (parts[0 ]) : 0 .0f ;
235- float bw = num > 1 ? atof (parts[1 ]) : 0 .0f ;
234+ float freq = num > 0 ? strtof (parts[0 ], nullptr ) : 0 .0f ;
235+ float bw = num > 1 ? strtof (parts[1 ], nullptr ) : 0 .0f ;
236236 uint8_t sf = num > 2 ? atoi (parts[2 ]) : 0 ;
237237 uint8_t cr = num > 3 ? atoi (parts[3 ]) : 0 ;
238238 int temp_timeout_mins = num > 4 ? atoi (parts[4 ]) : 0 ;
@@ -287,7 +287,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
287287 } else if (memcmp (config, " radio" , 5 ) == 0 ) {
288288 char freq[16 ], bw[16 ];
289289 strcpy (freq, StrHelper::ftoa (_prefs->freq ));
290- strcpy (bw, StrHelper::ftoa (_prefs->bw ));
290+ strcpy (bw, StrHelper::ftoa3 (_prefs->bw ));
291291 sprintf (reply, " > %s,%s,%d,%d" , freq, bw, (uint32_t )_prefs->sf , (uint32_t )_prefs->cr );
292292 } else if (memcmp (config, " rxdelay" , 7 ) == 0 ) {
293293 sprintf (reply, " > %s" , StrHelper::ftoa (_prefs->rx_delay_base ));
@@ -417,8 +417,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
417417 strcpy (tmp, &config[6 ]);
418418 const char *parts[4 ];
419419 int num = mesh::Utils::parseTextParts (tmp, parts, 4 );
420- float freq = num > 0 ? atof (parts[0 ]) : 0 .0f ;
421- float bw = num > 1 ? atof (parts[1 ]) : 0 .0f ;
420+ float freq = num > 0 ? strtof (parts[0 ], nullptr ) : 0 .0f ;
421+ float bw = num > 1 ? strtof (parts[1 ], nullptr ) : 0 .0f ;
422422 uint8_t sf = num > 2 ? atoi (parts[2 ]) : 0 ;
423423 uint8_t cr = num > 3 ? atoi (parts[3 ]) : 0 ;
424424 if (freq >= 300 .0f && freq <= 2500 .0f && sf >= 5 && sf <= 12 && cr >= 5 && cr <= 8 && bw >= 7 .0f && bw <= 500 .0f ) {
0 commit comments