@@ -67,17 +67,17 @@ static public void errorMessage(String where, Throwable e) {
67
67
* who knows.
68
68
*/
69
69
public static Vector <String > list () {
70
- try {
71
- String [] portNames = SerialPortList .getPortNames ();
72
- return new Vector <String >(Arrays .asList (portNames ));
73
- } catch (Error e ) {
74
- Common .log (new Status (IStatus .ERROR , ArduinoConst .CORE_PLUGIN_ID ,
75
- "There is a config problem on your system.\n For more detail see https://github.com/jantje/arduino-eclipse-plugin/issues/252" , e ));
76
- Vector <String > ret = new Vector <String >();
77
- ret .add ("config error:" );
78
- ret .add ("see https://github.com/jantje/arduino-eclipse-plugin/issues/252" );
79
- return ret ;
80
- }
70
+ try {
71
+ String [] portNames = SerialPortList .getPortNames ();
72
+ return new Vector <String >(Arrays .asList (portNames ));
73
+ } catch (Error e ) {
74
+ Common .log (new Status (IStatus .ERROR , ArduinoConst .CORE_PLUGIN_ID ,
75
+ "There is a config problem on your system.\n For more detail see https://github.com/jantje/arduino-eclipse-plugin/issues/252" , e ));
76
+ Vector <String > ret = new Vector <String >();
77
+ ret .add ("config error:" );
78
+ ret .add ("see https://github.com/jantje/arduino-eclipse-plugin/issues/252" );
79
+ return ret ;
80
+ }
81
81
}
82
82
83
83
SerialPort port = null ;
@@ -102,27 +102,27 @@ public static Vector<String> list() {
102
102
private List <MessageConsumer > fConsumers ;
103
103
104
104
public Serial (String iname , int irate ) {
105
- this (iname , irate , 'N' , 8 , 1.0f );
105
+ this (iname , irate , 'N' , 8 , 1.0f );
106
106
}
107
107
108
108
public Serial (String iname , int irate , char iparity , int idatabits , float istopbits ) {
109
- PortName = iname ;
110
- this .rate = irate ;
111
-
112
- parity = SerialPort .PARITY_NONE ;
113
- if (iparity == 'E' )
114
- parity = SerialPort .PARITY_EVEN ;
115
- if (iparity == 'O' )
116
- parity = SerialPort .PARITY_ODD ;
117
-
118
- this .databits = idatabits ;
119
-
120
- stopbits = SerialPort .STOPBITS_1 ;
121
- if (istopbits == 1.5f )
122
- stopbits = SerialPort .STOPBITS_1_5 ;
123
- if (istopbits == 2 )
124
- stopbits = SerialPort .STOPBITS_2 ;
125
- connect ();
109
+ PortName = iname ;
110
+ this .rate = irate ;
111
+
112
+ parity = SerialPort .PARITY_NONE ;
113
+ if (iparity == 'E' )
114
+ parity = SerialPort .PARITY_EVEN ;
115
+ if (iparity == 'O' )
116
+ parity = SerialPort .PARITY_ODD ;
117
+
118
+ this .databits = idatabits ;
119
+
120
+ stopbits = SerialPort .STOPBITS_1 ;
121
+ if (istopbits == 1.5f )
122
+ stopbits = SerialPort .STOPBITS_1_5 ;
123
+ if (istopbits == 2 )
124
+ stopbits = SerialPort .STOPBITS_2 ;
125
+ connect ();
126
126
127
127
}
128
128
0 commit comments