Commit 23044bf6 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Adds a print to debug error

Showing with 2 additions and 1 deletion
+2 -1
.idea/*
data/*
**/.ipynb_notebooks/**
data.zip
*.zip
__pycache__
Ohmpi_4elec_mqtt.py
ohmpy/*
......
......@@ -226,6 +226,7 @@ class Rx(RxAbstract):
def voltage(self):
""" Gets the voltage VMN in Volts
"""
print(f'Voltage ads: {self._ads_voltage_address}, {ads.P0}')
u0 = AnalogIn(self._ads_voltage, ads.P0).voltage * 1000.
u2 = AnalogIn(self._ads_voltage, ads.P2).voltage * 1000.
u = np.max([u0,u2]) * (np.heaviside(u0-u2, 1.) * 2 - 1.) # gets the max between u0 & u2 and set the sign
......
File deleted
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