tec_p should only be negative

This commit is contained in:
Sebastien Bourdeauducq 2023-09-13 16:03:54 +08:00
parent c9c43f9f14
commit 3392cecee1
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ int main(int argc, char* argv[])
ImGui::Text("TEC current: %.3f mA", (float)tec_current*1000.0f); ImGui::Text("TEC current: %.3f mA", (float)tec_current*1000.0f);
ImGui::SliderFloat("Setpoint", &freq_setpoint_local, 0.0f, 40.0f); ImGui::SliderFloat("Setpoint", &freq_setpoint_local, 0.0f, 40.0f);
ImGui::SliderFloat("TEC bias", &tec_bias_local, 0.0f, 0.5f); ImGui::SliderFloat("TEC bias", &tec_bias_local, 0.0f, 0.5f);
ImGui::SliderFloat("TEC P", &tec_p_local, -1.0f, 1.0f); ImGui::SliderFloat("TEC P", &tec_p_local, -1.0f, 0.0f);
freq_setpoint = freq_setpoint_local; freq_setpoint = freq_setpoint_local;
tec_bias = tec_bias_local; tec_bias = tec_bias_local;
tec_p = 0.01f*tec_p_local; tec_p = 0.01f*tec_p_local;