tec_u_meas: subtract vref offset

pull/20/head
Astro 2020-09-17 01:20:31 +02:00
parent 1157b73f7f
commit 94e0525002
1 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ fn main() -> ! {
vref.into_format_args(volt, Abbreviation), dac_feedback.into_format_args(volt, Abbreviation),
itec.into_format_args(volt, Abbreviation), tec_i.into_format_args(ampere, Abbreviation),
tec_u_meas.into_format_args(volt, Abbreviation),
(tec_u_meas / tec_i).into_format_args(ohm, Abbreviation),
((tec_u_meas - vref) / tec_i).into_format_args(ohm, Abbreviation),
);
} else {
let _ = writeln!(socket, "channel {}: no adc input", channel);
@ -269,7 +269,7 @@ fn main() -> ! {
match (state.get_adc(), state.get_sens(), state.get_temperature()) {
(Some(adc), Some(sens), Some(temp)) => {
let _ = writeln!(
socket, "- adc={:.6} r={:.0} temp{}={:.3}K",
socket, "- adc={:.6} r={:.0} temp{}={:.3}",
adc.into_format_args(volt, Abbreviation),
sens.into_format_args(ohm, Abbreviation),
channel,