Commit 5db29448 authored by Pedro Henrique Kopper's avatar Pedro Henrique Kopper

Adicionar fator de correçao da caixa preta

parent bbb24651
......@@ -23,7 +23,10 @@ class SACADA(object):
# Should handle value errors better
return 0
if channel["id"] == "PWR":
return self.s.readVoltage("A3") * self.s.readVoltage("A4")
# A3 é conectado na caixa preta (V1, escala de 540.55 Ampère por Volt) tabela no Git
# A4 é conectado na caixa preta (V2, tensão RMS na amostra)
return ((self.s.readVoltage("A3") * 540.55) - 20.12) * self.s.readVoltage("A4")
if channel["id"] == "A3":
return self.s.readVoltage("A3") * (400.0/10.0) - 3.0
return self.s.readVoltage(channel["id"])
Markdown is supported
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