mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 22:52:07 +00:00
Make disable return an int32_t for runOnce usage
This commit is contained in:
parent
38a1315599
commit
110c80d045
@ -93,10 +93,12 @@ void OSThread::run()
|
|||||||
currentThread = NULL;
|
currentThread = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSThread::disable()
|
int32_t OSThread::disable()
|
||||||
{
|
{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
setInterval(INT32_MAX);
|
setInterval(INT32_MAX);
|
||||||
|
|
||||||
|
return INT32_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ class OSThread : public Thread
|
|||||||
|
|
||||||
static void setup();
|
static void setup();
|
||||||
|
|
||||||
void disable();
|
int32_t disable();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait a specified number msecs starting from the current time (rather than the last time we were run)
|
* Wait a specified number msecs starting from the current time (rather than the last time we were run)
|
||||||
|
@ -260,8 +260,7 @@ int32_t AudioModule::runOnce()
|
|||||||
return 100;
|
return 100;
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Audio Module Disabled\n");
|
DEBUG_MSG("Audio Module Disabled\n");
|
||||||
enabled = false;
|
return disable();
|
||||||
return INT32_MAX;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -244,8 +244,7 @@ bool MQTT::wantsLink() const
|
|||||||
int32_t MQTT::runOnce()
|
int32_t MQTT::runOnce()
|
||||||
{
|
{
|
||||||
if(!moduleConfig.mqtt.enabled) {
|
if(!moduleConfig.mqtt.enabled) {
|
||||||
enabled = false;
|
return disable();
|
||||||
return INT32_MAX;
|
|
||||||
}
|
}
|
||||||
bool wantConnection = wantsLink();
|
bool wantConnection = wantsLink();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user