@@ -289,7 +289,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
289289 int dc_frac = (int )((dc - dc_int) * 10 .0f + 0 .5f );
290290 sprintf (reply, " > %d.%d%%" , dc_int, dc_frac);
291291 } else if (memcmp (config, " af" , 2 ) == 0 ) {
292- sprintf (reply, " > %s (deprecated, use 'get dutycycle') " , StrHelper::ftoa (_prefs->airtime_factor ));
292+ sprintf (reply, " > %s" , StrHelper::ftoa (_prefs->airtime_factor ));
293293 } else if (memcmp (config, " int.thresh" , 10 ) == 0 ) {
294294 sprintf (reply, " > %d" , (uint32_t ) _prefs->interference_threshold );
295295 } else if (memcmp (config, " agc.reset.interval" , 18 ) == 0 ) {
@@ -443,8 +443,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
443443 const char * config = &command[4 ];
444444 if (memcmp (config, " dutycycle " , 10 ) == 0 ) {
445445 float dc = atof (&config[10 ]);
446- if (dc < 10 || dc > 100 ) {
447- strcpy (reply, " ERROR: dutycycle must be 10 -100" );
446+ if (dc < 1 || dc > 100 ) {
447+ strcpy (reply, " ERROR: dutycycle must be 1 -100" );
448448 } else {
449449 _prefs->airtime_factor = (100 .0f / dc) - 1 .0f ;
450450 savePrefs ();
@@ -456,10 +456,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
456456 } else if (memcmp (config, " af " , 3 ) == 0 ) {
457457 _prefs->airtime_factor = atof (&config[3 ]);
458458 savePrefs ();
459- float actual = 100 .0f / (_prefs->airtime_factor + 1 .0f );
460- int a_int = (int )actual;
461- int a_frac = (int )((actual - a_int) * 10 .0f + 0 .5f );
462- sprintf (reply, " OK - %d.%d%% (deprecated, use 'set dutycycle')" , a_int, a_frac);
459+ strcpy (reply, " OK" );
463460 } else if (memcmp (config, " int.thresh " , 11 ) == 0 ) {
464461 _prefs->interference_threshold = atoi (&config[11 ]);
465462 savePrefs ();
0 commit comments