Browse Source

Merge branch 'master' of git.okoyono.de:klaute/SWRMeter

klaute 2 years ago
parent
commit
2b9ec977a1
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      tools/meas.py

+ 3
- 3
tools/meas.py View File

@@ -510,10 +510,10 @@ if __name__ == "__main__":
510 510
 
511 511
               if m[1] > 0 and m[2] > 0:
512 512
                 if m[1] > m[2]:
513
-                  vswr = (m[1] / m[2])
513
+                  vswr = (1.0 * m[1] / m[2])
514 514
                   meas_ratio.append(vswr)
515 515
                 elif m[1] < m[2]:
516
-                  vswr = (m[2] / m[1])
516
+                  vswr = (1.0 * m[2] / m[1])
517 517
                   meas_ratio.append(vswr)
518 518
                 else:
519 519
                   vswr = 1
@@ -541,7 +541,7 @@ if __name__ == "__main__":
541 541
             FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
542 542
             j = 0
543 543
             for m in meas_ratio:
544
-              FILE.write("%f;%f;%f;%f;%f;%d,%d\n" % (meas_freq[j], m, meas_r[j], meas_p[j], i, meas_data[j][1], meas_data[j][2]))
544
+              FILE.write("%f;%f;%f;%f;%f;%d;%d\n" % (meas_freq[j], m, meas_r[j], meas_p[j], i, meas_data[j][1], meas_data[j][2]))
545 545
               j = j + 1
546 546
             FILE.close()
547 547
             print "Output file " + args.output_file + " written."