Added ADC measurements
This commit is contained in:
@ -56,6 +56,7 @@ from .constants import (
|
||||
from .conversions import (
|
||||
current_ma_to_n,
|
||||
current_n_to_ma,
|
||||
stm32_adc_pin_n_to_v,
|
||||
temp_c_to_n,
|
||||
temp_ext_n_to_c,
|
||||
temp_n_to_c,
|
||||
@ -456,6 +457,8 @@ class Protocol:
|
||||
return Measurements(
|
||||
current1=current_n_to_ma(words[1]),
|
||||
current2=current_n_to_ma(words[2]),
|
||||
adc_pf3_voltage=stm32_adc_pin_n_to_v(words[3]),
|
||||
adc_pf4_voltage=stm32_adc_pin_n_to_v(words[4]),
|
||||
temp1=temp_n_to_c(words[5]),
|
||||
temp2=temp_n_to_c(words[6]),
|
||||
temp_ext1=temp_ext_n_to_c(words[7]),
|
||||
@ -465,8 +468,6 @@ class Protocol:
|
||||
voltage_5v2=voltage_5v_n_to_v(words[11]),
|
||||
voltage_7v0=voltage_7v_n_to_v(words[12]),
|
||||
message_id=words[13],
|
||||
to6_counter_lsb=words[3],
|
||||
to6_counter_msb=words[4],
|
||||
timestamp=datetime.now(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user