projects
/
eltron.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
189a9a9
)
use System.exit() to force exit because RXTX spawns a non-daemon thread
author
adam
<adam@megacz.com>
Wed, 28 Jan 2009 21:52:05 +0000
(13:52 -0800)
committer
adam
<adam@megacz.com>
Wed, 28 Jan 2009 21:52:05 +0000
(13:52 -0800)
darcs-hash:
20090128215205
-5007d-
f2f8ecaa38c1575b5276380b8101bd19848f9fc5
.gz
src/com/megacz/eltron/Eltron.java
patch
|
blob
|
history
diff --git
a/src/com/megacz/eltron/Eltron.java
b/src/com/megacz/eltron/Eltron.java
index
ff030f4
..
d59e73c
100644
(file)
--- a/
src/com/megacz/eltron/Eltron.java
+++ b/
src/com/megacz/eltron/Eltron.java
@@
-27,6
+27,9
@@
public class Eltron {
public static void main(String[] s) throws Exception {
Picture p = new Picture(System.in);
print(p.data, p.width, p.height);
public static void main(String[] s) throws Exception {
Picture p = new Picture(System.in);
print(p.data, p.width, p.height);
+
+ // RXTX spawns a thread that never dies
+ System.exit(0);
}
public static SerialPort detectPort() throws Exception {
}
public static SerialPort detectPort() throws Exception {
@@
-50,8
+53,11
@@
public class Eltron {
// you'll need to run this once at 9600 to tell the built-in eeprom to switch to 38,400kbps
//sp.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
// you'll need to run this once at 9600 to tell the built-in eeprom to switch to 38,400kbps
//sp.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
+
+
sp.setSerialPortParams(38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
sp.setSerialPortParams(38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
+
OutputStream out = sp.getOutputStream();
InputStream in = sp.getInputStream();
int count = 0;
OutputStream out = sp.getOutputStream();
InputStream in = sp.getInputStream();
int count = 0;