Browse Source

Linux serial open bug fixed.

klaute 3 years ago
parent
commit
829871567f
2 changed files with 5 additions and 18 deletions
  1. 2
    16
      firmware/firmware.ino
  2. 3
    2
      tools/meas.py

+ 2
- 16
firmware/firmware.ino View File

@@ -39,20 +39,6 @@ void setup()
39 39
   si5351.output_enable(SI5351_CLK1, 0); // disable clock output 1
40 40
   si5351.output_enable(SI5351_CLK2, 0); // disable clock output 2
41 41
 
42
-  /*
43
-  // Set CLK0 to output 14 MHz with a fixed PLL frequency
44
-  si5351.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
45
-  si5351.set_freq(1400000000ULL, SI5351_PLL_FIXED, SI5351_CLK0);
46
-
47
-  // Set CLK1 to output 20 MHz
48
-  si5351.set_freq(2000000000ULL, 0ULL, SI5351_CLK1);
49
-  
50
-  si5351.output_enable(SI5351_CLK0, 1); // enable clock output 0
51
-  si5351.drive_strength(SI5351_CLK0, SI5351_DRIVE_2MA); // 2 4 6 8ma
52
-  */
53
-  //delay(500);
54
-
55
-  //Serial.println("SWR Meter firmware v0.1 by Kai Lauterbach (me@klaute.de)");
56 42
 }
57 43
 
58 44
 void loop()
@@ -76,7 +62,7 @@ void loop()
76 62
   if (Serial.available() > 0)
77 63
   {
78 64
     uint8_t c = Serial.read() & 0xff;
79
-    //Serial.write(c); // TODO
65
+
80 66
     cc_processData(c);
81 67
   }
82 68
 
@@ -84,4 +70,4 @@ void loop()
84 70
 
85 71
   delay(100);
86 72
 }
87
-
73
+

+ 3
- 2
tools/meas.py View File

@@ -302,9 +302,10 @@ def openSerialDevice(d):
302 302
   ser.setDTR(True)
303 303
 
304 304
   try:
305
-    ser.close()
305
+    if "com" in d.lower():
306
+      ser.close()
306 307
     ser = serial.Serial(
307
-          port="\\\\.\\"+d,\
308
+          port=d,\
308 309
           baudrate=115200,\
309 310
           parity=serial.PARITY_NONE,\
310 311
           stopbits=serial.STOPBITS_ONE,\

Loading…
Cancel
Save