Commit def2a789 authored by Yoann Sallaz Damaz's avatar Yoann Sallaz Damaz
Browse files

change display

parent 946319e5
Pipeline #48101 failed with stages
......@@ -29,12 +29,12 @@ class inclino_FIP:
self.channel = self.wago.controller.devname2key(self.logical_device)
def get_I_corrected(self):
return 0.000976562728506*(self.wago.controller.client_read_input_registers(self.channel,"H")& 0xFFF8)-4.81352318359996E-6
return round(0.000976562728506*(self.wago.controller.client_read_input_registers(self.channel,"H")& 0xFFF8)-4.81352318359996E-6,6)
def read(self):
log_debug(self, "Inclino read()")
Icorrected = self.get_I_corrected()
return self.sign*(self.A*Icorrected+self.B)+self.offset
return round(self.sign*(self.A*Icorrected+self.B)+self.offset,6)
def __info__(self):
register = self.wago.controller.client_read_input_registers(self.channel,"H")
......@@ -53,9 +53,8 @@ class inclino_FIP:
info_string += f" F (Input short circuit or wire break) = {F}\n"
info_string += f" U (Input overflow) = {U}\n"
info_string += f" raw value = {raw}\n"
info_string += f" I corrected = {self.get_I_corrected()}mA\n"
info_string += f" value = {self.read()}\n"
info_string += f' Unit = degree\n'
info_string += f" I corrected = {self.get_I_corrected()} mA\n"
info_string += f" value = {self.read()} deg\n"
return info_string
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment