Project

General

Profile

Revision 270

Added by Greg Tress over 16 years ago

minor changes to gui

View differences:

ColonetServerInterface.java
237 237
		//create packet
238 238
		String packet = "";
239 239
		packet += ColonetServerInterface.REQUEST_FROM_SERVER;
240
		//packet += " " + robotNumber;
240
		packet += " " + robotNumber;
241 241
		//packet += " " + ColonetServerInterface.COLONET_REQUEST;
242 242
		packet += " " + s;  //add  the command code here
243 243
		packet += "\n";
......
252 252
		sendRequest(ColonetServerInterface.REQUEST_XBEE_IDS, "");
253 253
	}
254 254
	
255
	public void sendBatteryRequest (int robotNum) {
256
		sendRequest(ColonetServerInterface.BATTERY, "" + robotNum);
257
	}
258
	
255 259
	/*
256 260
	*	Queue management
257 261
	*/
......
346 350
		}
347 351
		
348 352
		public void parseData (String line) {
349
			//log.append("Incoming data: [" + line + "]\n");
353
			// Senser Matrix
350 354
			if (line.startsWith(ColonetServerInterface.RESPONSE_TO_CLIENT_REQUEST + " " +
351 355
				ColonetServerInterface.REQUEST_BOM_MATRIX))
352 356
				colonet.parseMatrix(line);
357
			// Task Queue
353 358
			else if (line.startsWith(ColonetServerInterface.COLONET_QUEUE))
354 359
				colonet.parseQueue(line);
360
			// XBee IDs
355 361
			else if (line.startsWith(ColonetServerInterface.RESPONSE_TO_CLIENT_REQUEST + " " +
356 362
				ColonetServerInterface.REQUEST_XBEE_IDS))
357 363
				colonet.parseXBeeIDs(line);
364
			// Battery
365
			else if (line.startsWith(ColonetServerInterface.RESPONSE_TO_CLIENT_REQUEST + " " +
366
				ColonetServerInterface.BATTERY))
367
				colonet.parseBattery(line);
358 368
		}
359 369

  
360 370
	}

Also available in: Unified diff