Calculation error fixed and debug output added.
This commit is contained in:
parent
330e4d08a1
commit
7afaea4745
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue