Enable the model last, if set
We need all the values to be set before we can attempt to enable the model.
This commit is contained in:
parent
49048fdcd6
commit
92bc7554b6
1 changed files with 4 additions and 2 deletions
|
@ -7808,12 +7808,14 @@ Sigma_Exit:
|
|||
break;
|
||||
}
|
||||
|
||||
// update all set parameters
|
||||
if(S >= 0) temp_model_set_enabled(S);
|
||||
// update all parameters
|
||||
if(B >= 0) temp_model_set_warn_beep(B);
|
||||
if(!isnan(C) || !isnan(P) || !isnan(T) || !isnan(W) || !isnan(E)) temp_model_set_params(C, P, T, W, E);
|
||||
if(I >= 0 && !isnan(R)) temp_model_set_resistance(I, R);
|
||||
|
||||
// enable the model last, if requested
|
||||
if(S >= 0) temp_model_set_enabled(S);
|
||||
|
||||
// run autotune
|
||||
if(A >= 0) temp_model_autotune(A);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue