TM: Mark more internal functions as static
This commit is contained in:
parent
5a89f6934a
commit
f68479fc38
@ -2372,20 +2372,20 @@ void model_data::step(uint8_t heater_pwm, uint8_t fan_pwm, float heater_temp, fl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear error flags and mark as uninitialized
|
// clear error flags and mark as uninitialized
|
||||||
void reinitialize()
|
static void reinitialize()
|
||||||
{
|
{
|
||||||
data.flags = 1; // shorcut to reset all error flags
|
data.flags = 1; // shorcut to reset all error flags
|
||||||
warning_state.assert = false; // explicitly clear assertions
|
warning_state.assert = false; // explicitly clear assertions
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify calibration status and trigger a model reset if valid
|
// verify calibration status and trigger a model reset if valid
|
||||||
void setup()
|
static void setup()
|
||||||
{
|
{
|
||||||
if(!calibrated()) enabled = false;
|
if(!calibrated()) enabled = false;
|
||||||
reinitialize();
|
reinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool calibrated()
|
static bool calibrated()
|
||||||
{
|
{
|
||||||
if(!(data.P >= 0)) return false;
|
if(!(data.P >= 0)) return false;
|
||||||
if(!(data.C >= 0)) return false;
|
if(!(data.C >= 0)) return false;
|
||||||
@ -2399,7 +2399,7 @@ bool calibrated()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void check()
|
static void check()
|
||||||
{
|
{
|
||||||
if(!enabled) return;
|
if(!enabled) return;
|
||||||
|
|
||||||
@ -2428,7 +2428,7 @@ void check()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_warning()
|
static void handle_warning()
|
||||||
{
|
{
|
||||||
// update values
|
// update values
|
||||||
float warn = data.warn;
|
float warn = data.warn;
|
||||||
@ -2461,7 +2461,7 @@ void handle_warning()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEMP_MODEL_DEBUG
|
#ifdef TEMP_MODEL_DEBUG
|
||||||
void log_usr()
|
static void log_usr()
|
||||||
{
|
{
|
||||||
if(!log_buf.enabled) return;
|
if(!log_buf.enabled) return;
|
||||||
|
|
||||||
@ -2491,7 +2491,7 @@ void log_usr()
|
|||||||
(int)cur_pwm, (unsigned long)cur_temp_b, (unsigned long)cur_amb_b);
|
(int)cur_pwm, (unsigned long)cur_temp_b, (unsigned long)cur_amb_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_isr()
|
static void log_isr()
|
||||||
{
|
{
|
||||||
if(!log_buf.enabled) return;
|
if(!log_buf.enabled) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user