fix tec voltage computation

This commit is contained in:
Sebastien Bourdeauducq 2023-09-11 20:40:28 +08:00
parent 1f783793db
commit 747c7d2e38
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ static void dsp_thread() {
// FIXME: net::write seems unimplemented as of libstdc++ 13
float freq_error = freq_peak_local - freq_setpoint;
tec_socket.write_some(net::buffer(std::format(":SOUR2:VOLT {:.3f}\n",
std::min(tec_bias+tec_p*freq_error, 0.0f))));
std::max(tec_bias+tec_p*freq_error, 0.0f))));
last_tec += 100ms;
}