More disables

This commit is contained in:
Ben Meadors 2022-12-29 18:48:33 -06:00
parent 110c80d045
commit c7c5671cca
5 changed files with 5 additions and 11 deletions

View File

@ -135,8 +135,7 @@ int32_t RemoteHardwareModule::runOnce()
}
} else {
// No longer watching anything - stop using CPU
enabled = false;
return INT32_MAX;
return disable();
}
return 200; // Poll our GPIOs every 200ms (FIXME, make adjustable via protobuf arg)

View File

@ -221,9 +221,7 @@ int32_t SerialModule::runOnce()
return (10);
} else {
DEBUG_MSG("Serial Module Disabled\n");
enabled = false;
return INT32_MAX;
return disable();
}
}

View File

@ -67,8 +67,7 @@ int32_t EnvironmentTelemetryModule::runOnce()
if (!(moduleConfig.telemetry.environment_measurement_enabled ||
moduleConfig.telemetry.environment_screen_enabled)) {
// If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it
enabled = false;
return result;
return disable();
}
if (firstTime) {

View File

@ -82,8 +82,7 @@ int32_t RangeTestModule::runOnce()
return (senderHeartbeat);
} else {
enabled = false;
return (INT32_MAX);
return disable();
// This thread does not need to run as a receiver
}

View File

@ -52,8 +52,7 @@ int32_t StoreForwardModule::runOnce()
return (this->packetTimeMax);
}
#endif
enabled = false; // Client doesn't need periodical
return (INT32_MAX);
return disable();
}
/*