@@ -300,7 +300,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
300300 int dc_frac = (int )((dc - dc_int) * 10 .0f + 0 .5f );
301301 sprintf (reply, " > %d.%d%%" , dc_int, dc_frac);
302302 } else if (memcmp (config, " af" , 2 ) == 0 ) {
303- sprintf (reply, " > %s (deprecated, use 'get dutycycle') " , StrHelper::ftoa (_prefs->airtime_factor ));
303+ sprintf (reply, " > %s" , StrHelper::ftoa (_prefs->airtime_factor ));
304304 } else if (memcmp (config, " int.thresh" , 10 ) == 0 ) {
305305 sprintf (reply, " > %d" , (uint32_t ) _prefs->interference_threshold );
306306 } else if (memcmp (config, " agc.reset.interval" , 18 ) == 0 ) {
@@ -458,8 +458,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
458458 const char * config = &command[4 ];
459459 if (memcmp (config, " dutycycle " , 10 ) == 0 ) {
460460 float dc = atof (&config[10 ]);
461- if (dc < 10 || dc > 100 ) {
462- strcpy (reply, " ERROR: dutycycle must be 10 -100" );
461+ if (dc < 1 || dc > 100 ) {
462+ strcpy (reply, " ERROR: dutycycle must be 1 -100" );
463463 } else {
464464 _prefs->airtime_factor = (100 .0f / dc) - 1 .0f ;
465465 savePrefs ();
@@ -471,10 +471,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
471471 } else if (memcmp (config, " af " , 3 ) == 0 ) {
472472 _prefs->airtime_factor = atof (&config[3 ]);
473473 savePrefs ();
474- float actual = 100 .0f / (_prefs->airtime_factor + 1 .0f );
475- int a_int = (int )actual;
476- int a_frac = (int )((actual - a_int) * 10 .0f + 0 .5f );
477- sprintf (reply, " OK - %d.%d%% (deprecated, use 'set dutycycle')" , a_int, a_frac);
474+ strcpy (reply, " OK" );
478475 } else if (memcmp (config, " int.thresh " , 11 ) == 0 ) {
479476 _prefs->interference_threshold = atoi (&config[11 ]);
480477 savePrefs ();
0 commit comments