浏览代码

Merge branch 'master' of github.com:xythobuz/LED-Cube

Max Nuding 13 年前
父节点
当前提交
8217d9a993
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 1
    1
      Cube Control/frame.java
  2. 5
    5
      Cube Control/helper/winSerial.c

+ 1
- 1
Cube Control/frame.java 查看文件

96
   }
96
   }
97
 
97
 
98
   public void valueChanged(ListSelectionEvent evt) {
98
   public void valueChanged(ListSelectionEvent evt) {
99
-    if (!evt.getValueIsAdjusting()) {
99
+    if ((!evt.getValueIsAdjusting()) && (evt.getSource() != animList) && (evt.getSource() != frameList)) {
100
      DefaultListModel model = (DefaultListModel)((JList)evt.getSource()).getModel();
100
      DefaultListModel model = (DefaultListModel)((JList)evt.getSource()).getModel();
101
      int anim = animList.getSelectedIndex();
101
      int anim = animList.getSelectedIndex();
102
      int max;
102
      int max;

+ 5
- 5
Cube Control/helper/winSerial.c 查看文件

60
 		return -1;
60
 		return -1;
61
 	}
61
 	}
62
 	
62
 	
63
-	timeouts.ReadIntervalTimeout = 50;
64
-	timeouts.ReadTotalTimeoutConstant = 50;
65
-	timeouts.ReadTotalTimeoutMultiplier = 10;
66
-	timeouts.WriteTotalTimeoutConstant = 50;
67
-	timeouts.WriteTotalTimeoutMultiplier = 10;
63
+	timeouts.ReadIntervalTimeout = 1000 * dwReadTimeOutIntervalInSec;
64
+	timeouts.ReadTotalTimeoutConstant = 1000 * dwReadTimeOutIntervalInSec;
65
+	timeouts.ReadTotalTimeoutMultiplier = 1000 * dwReadTimeOutIntervalInSec;
66
+	timeouts.WriteTotalTimeoutConstant = 1000 * dwReadTimeOutIntervalInSec;
67
+	timeouts.WriteTotalTimeoutMultiplier = 1000 * dwReadTimeOutIntervalInSec;
68
 
68
 
69
 	if (!SetCommTimeouts(hSerial, &timeouts)) {
69
 	if (!SetCommTimeouts(hSerial, &timeouts)) {
70
 		CloseHandle(hSerial);
70
 		CloseHandle(hSerial);

正在加载...
取消
保存