Calculation error fixed and debug output added.

This commit is contained in:
klaute 2016-09-21 16:22:23 +02:00
parent 330e4d08a1
commit 7afaea4745

View file

@ -503,7 +503,7 @@ if __name__ == "__main__":
meas_ratio.append(1) meas_ratio.append(1)
# R = meas_data[0] * 5V / 1023 * I # R = meas_data[0] * 5V / 1023 * I
r = (m[1] * 5 / 1023) * i r = (m[1] * 5 / 1023) / i
meas_r.append(r) meas_r.append(r)
# P = meas_data[0] * 5V ^ 2 / 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_r)
plt.plot(meas_freq, meas_p) plt.plot(meas_freq, meas_p)
print meas_ratio
print "Please close the mathplot window to exit..." print "Please close the mathplot window to exit..."
plt.show() plt.show()