From 7afaea4745fdf08d8d976b2b8e232c7874c96f95 Mon Sep 17 00:00:00 2001 From: klaute Date: Wed, 21 Sep 2016 16:22:23 +0200 Subject: [PATCH] Calculation error fixed and debug output added. --- tools/meas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/meas.py b/tools/meas.py index 57eb0fe..7172576 100644 --- a/tools/meas.py +++ b/tools/meas.py @@ -503,7 +503,7 @@ if __name__ == "__main__": meas_ratio.append(1) # R = meas_data[0] * 5V / 1023 * I - r = (m[1] * 5 / 1023) * i + r = (m[1] * 5 / 1023) / i meas_r.append(r) # P = meas_data[0] * 5V ^ 2 / r @@ -520,6 +520,7 @@ if __name__ == "__main__": plt.plot(meas_freq, meas_r) plt.plot(meas_freq, meas_p) + print meas_ratio print "Please close the mathplot window to exit..." plt.show()