Browse Source

Serial port naming for windows machines fixed.

klaute 2 years ago
parent
commit
d859ab1aad
4 changed files with 20 additions and 2 deletions
  1. 5
    0
      tools/2m_scan.bat
  2. 5
    0
      tools/70cm_scan.bat
  3. 6
    0
      tools/install_packages.bat
  4. 4
    2
      tools/meas.py

+ 5
- 0
tools/2m_scan.bat View File

@@ -0,0 +1,5 @@
1
+@echo off
2
+
3
+C:\Python27\python.exe meas.py -o 70cm.csv -s 144000000 -e 146100000 -i 50 -p 5000 -d COM16 -m
4
+
5
+pause

+ 5
- 0
tools/70cm_scan.bat View File

@@ -0,0 +1,5 @@
1
+@echo off
2
+
3
+C:\Python27\python.exe meas.py -o 70cm.csv -s 430000000 -e 440100000 -i 50 -p 5000 -d COM16 -m
4
+
5
+pause

+ 6
- 0
tools/install_packages.bat View File

@@ -0,0 +1,6 @@
1
+@echo off
2
+
3
+C:\Python27\python.exe -m pip install --upgrade pip
4
+C:\Python27\python.exe -m pip install --upgrade matplotlib pyserial
5
+
6
+pause

+ 4
- 2
tools/meas.py View File

@@ -285,8 +285,10 @@ def openSerialDevice(d):
285 285
   global ser
286 286
 
287 287
   try:
288
-    #serial.Serial.close()
289
-    ser = serial.Serial("\\\\.\\"+d)
288
+    if "com" in d.lower():
289
+      d = "\\\\.\\"+d
290
+
291
+    ser = serial.Serial(d)
290 292
   except:
291 293
     print "ERROR (1): Can't open the serial device " + d
292 294
     exit(1)