Revision 39
cleaned up colonet gui code
trunk/code/projects/colonet/ColonetGUI/Colonet.java | ||
---|---|---|
760 | 760 |
String line; |
761 | 761 |
while (true) { |
762 | 762 |
try { |
763 |
if (csi == null) return;
|
|
764 |
line = csi.getLine();
|
|
765 |
if (line != null) {
|
|
766 |
csi.msg("Incoming data: [" + line + "]");
|
|
767 |
//TODO: parse incoming data here
|
|
768 |
}
|
|
763 |
if (csi == null) return;
|
|
764 |
line = csi.getLine();
|
|
765 |
if (line != null) {
|
|
766 |
csi.msg("Incoming data: [" + line + "]");
|
|
767 |
//TODO: parse incoming data here
|
|
768 |
}
|
|
769 | 769 |
Thread.sleep(DATALISTENER_DELAY); |
770 | 770 |
} catch (InterruptedException e) { |
771 | 771 |
return; |
772 |
} catch (IOException e) { |
|
773 |
csi.warn("IOException while reading incoming data."); |
|
774 |
} |
|
772 |
} |
|
775 | 773 |
} |
776 | 774 |
} |
777 | 775 |
|
trunk/code/projects/colonet/ColonetGUI/Colonet.xcode/gmtress.pbxuser | ||
---|---|---|
15 | 15 |
A34161780C989B480007BEF2, |
16 | 16 |
); |
17 | 17 |
perUserDictionary = { |
18 |
PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = { |
|
19 |
PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; |
|
20 |
PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID; |
|
21 |
PBXFileTableDataSourceColumnWidthsKey = ( |
|
22 |
200, |
|
23 |
200, |
|
24 |
300, |
|
25 |
); |
|
26 |
PBXFileTableDataSourceColumnsKey = ( |
|
27 |
PBXBookmarksDataSource_LocationID, |
|
28 |
PBXBookmarksDataSource_NameID, |
|
29 |
PBXBookmarksDataSource_CommentsID, |
|
30 |
); |
|
31 |
}; |
|
18 | 32 |
PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { |
19 | 33 |
PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; |
20 | 34 |
PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; |
... | ... | |
67 | 81 |
PBXSymbolsDataSource_ReferenceNameID, |
68 | 82 |
); |
69 | 83 |
}; |
84 |
PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = { |
|
85 |
PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; |
|
86 |
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; |
|
87 |
PBXFileTableDataSourceColumnWidthsKey = ( |
|
88 |
20, |
|
89 |
20, |
|
90 |
513, |
|
91 |
20, |
|
92 |
48.1626, |
|
93 |
43, |
|
94 |
43, |
|
95 |
20, |
|
96 |
); |
|
97 |
PBXFileTableDataSourceColumnsKey = ( |
|
98 |
PBXFileDataSource_SCM_ColumnID, |
|
99 |
PBXFileDataSource_FiletypeID, |
|
100 |
PBXFileDataSource_Filename_ColumnID, |
|
101 |
PBXFileDataSource_Built_ColumnID, |
|
102 |
PBXFileDataSource_ObjectSize_ColumnID, |
|
103 |
PBXFileDataSource_Errors_ColumnID, |
|
104 |
PBXFileDataSource_Warnings_ColumnID, |
|
105 |
PBXFileDataSource_Target_ColumnID, |
|
106 |
); |
|
107 |
}; |
|
70 | 108 |
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { |
71 | 109 |
PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; |
72 | 110 |
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; |
... | ... | |
89 | 127 |
PBXFileDataSource_Warnings_ColumnID, |
90 | 128 |
); |
91 | 129 |
}; |
92 |
PBXPerProjectTemplateStateSaveDate = 211332585;
|
|
93 |
PBXWorkspaceStateSaveDate = 211332585;
|
|
130 |
PBXPerProjectTemplateStateSaveDate = 211432920;
|
|
131 |
PBXWorkspaceStateSaveDate = 211432920;
|
|
94 | 132 |
}; |
95 | 133 |
sourceControlManager = A341617E0C989B510007BEF2; |
96 | 134 |
userBuildSettings = { |
... | ... | |
98 | 136 |
}; |
99 | 137 |
00E68290FEC88D7311DB9C8B = { |
100 | 138 |
uiCtxt = { |
101 |
sepNavIntBoundsRect = "{{0, 0}, {686, 10976}}";
|
|
102 |
sepNavSelRange = "{20185, 0}";
|
|
103 |
sepNavVisRect = "{{0, 5872}, {606, 647}}";
|
|
104 |
sepNavWindowFrame = "{{539, 56}, {651, 776}}";
|
|
139 |
sepNavIntBoundsRect = "{{0, 0}, {698, 10906}}";
|
|
140 |
sepNavSelRange = "{21978, 0}";
|
|
141 |
sepNavVisRect = "{{0, 10259}, {606, 647}}";
|
|
142 |
sepNavWindowFrame = "{{499, 170}, {651, 776}}";
|
|
105 | 143 |
}; |
106 | 144 |
}; |
107 | 145 |
00E68291FEC88ED911DB9C8B = { |
108 | 146 |
uiCtxt = { |
109 | 147 |
sepNavIntBoundsRect = "{{0, 0}, {764, 924}}"; |
110 | 148 |
sepNavSelRange = "{0, 0}"; |
111 |
sepNavVisRect = "{{0, 0}, {606, 647}}";
|
|
112 |
sepNavWindowFrame = "{{525, 56}, {651, 776}}";
|
|
149 |
sepNavVisRect = "{{0, 197}, {606, 647}}";
|
|
150 |
sepNavWindowFrame = "{{597, 192}, {651, 776}}";
|
|
113 | 151 |
}; |
114 | 152 |
}; |
115 | 153 |
130F8B84001BDB6411CA292A = { |
... | ... | |
187 | 225 |
isSCMEnabled = 0; |
188 | 226 |
isa = PBXSourceControlManager; |
189 | 227 |
scmConfiguration = { |
228 |
SubversionToolPath = /usr/local/bin/svn; |
|
190 | 229 |
}; |
191 |
scmType = "";
|
|
230 |
scmType = scm.subversion;
|
|
192 | 231 |
}; |
193 | 232 |
A341617F0C989B510007BEF2 = { |
194 | 233 |
indexTemplatePath = ""; |
... | ... | |
204 | 243 |
}; |
205 | 244 |
A34161900C989CB30007BEF2 = { |
206 | 245 |
uiCtxt = { |
207 |
sepNavIntBoundsRect = "{{0, 0}, {926, 4186}}";
|
|
208 |
sepNavSelRange = "{8782, 0}";
|
|
209 |
sepNavVisRect = "{{0, 3539}, {606, 647}}";
|
|
246 |
sepNavIntBoundsRect = "{{0, 0}, {926, 4102}}";
|
|
247 |
sepNavSelRange = "{1566, 0}";
|
|
248 |
sepNavVisRect = "{{0, 349}, {606, 647}}";
|
|
210 | 249 |
sepNavWindowFrame = "{{15, 56}, {651, 776}}"; |
211 | 250 |
}; |
212 | 251 |
}; |
trunk/code/projects/colonet/ColonetGUI/ColonetServerInterface.java | ||
---|---|---|
36 | 36 |
Commands will be defined as necessary. |
37 | 37 |
*/ |
38 | 38 |
|
39 |
public static |
|
40 | 39 |
public static final String SEND_TO_ROBOT = "0"; |
41 | 40 |
public static final String REQUEST_FROM_ROBOT = "1"; |
42 | 41 |
public static final String RESPONSE_TO_CLIENT_REQUEST = "2"; |
... | ... | |
56 | 55 |
public static final String MOTOR2_SET = "25"; //0x19 |
57 | 56 |
public static final String MOTORS_OFF = "26"; //0x1A |
58 | 57 |
public static final String MOVE = "27"; //0x1B |
59 |
public static final String MOVE_AVOID = "28"; //0x1C
|
|
58 |
public static final String MOVE_AVOID = "28"; //0x1C
|
|
60 | 59 |
|
61 | 60 |
//BUZZER |
62 | 61 |
public static final String BUZZER_INIT = "0"; //0x00 |
... | ... | |
119 | 118 |
return false; |
120 | 119 |
} |
121 | 120 |
|
122 |
public String getLine () { |
|
123 |
if (this.isReady()) |
|
124 |
return reader.readLine(); |
|
125 |
else |
|
126 |
return null; |
|
127 |
} |
|
121 |
public String getLine () { |
|
122 |
if (this.isReady()) { |
|
123 |
try { |
|
124 |
return reader.readLine(); |
|
125 |
} catch (IOException e) { |
|
126 |
return null; |
|
127 |
} |
|
128 |
} else { |
|
129 |
return null; |
|
130 |
} |
|
131 |
} |
|
128 | 132 |
|
129 | 133 |
/** |
130 | 134 |
* Create socket connection to Colonet server. |
Also available in: Unified diff