Update of /cvsroot/firebug/firebug/project/java/src/org/firebug
In directory sc8-pr-cvs1:/tmp/cvs-serv2398
Modified Files:
DBLogger.java SensorPacket.java
Log Message:
.
Index: DBLogger.java
===================================================================
RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/DBLogger.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DBLogger.java 20 May 2003 16:30:45 -0000 1.10
--- DBLogger.java 21 May 2003 22:32:23 -0000 1.11
***************
*** 33,37 ****
int baseID=packet[10];
//int id=TestDBLogger.getRandomID(baseID);
! return 0; //id;
}
--- 33,37 ----
int baseID=packet[10];
//int id=TestDBLogger.getRandomID(baseID);
! return baseID; //id;
}
***************
*** 40,46 ****
//float temp = (float)(72.0 + (3*rand.nextGaussian()));
//return temp;
! float basetemp=packet[12]*256+packet[11];
//float temp=TestDBLogger.getRandomTemp(basetemp);
! return 0; //temp;
}
--- 40,46 ----
//float temp = (float)(72.0 + (3*rand.nextGaussian()));
//return temp;
! float basetemp=(float)(packet[12]*256+packet[11]);
//float temp=TestDBLogger.getRandomTemp(basetemp);
! return basetemp; //temp;
}
***************
*** 160,171 ****
* example packets to be fed into the DBLogger class.
*/
! class TestDBLogger {
/** "test" is the _only_public_method_ in this
* class.
*/
! public static boolean test(DBLogger dbl) {
!
! byte [] packet = {0x7e,0,0x0a,0x7d,0x1a,
0x01,0x01,
0x01,0x02,0x03,
--- 160,171 ----
* example packets to be fed into the DBLogger class.
*/
! //class TestDBLogger {
/** "test" is the _only_public_method_ in this
* class.
*/
! // public static boolean test(DBLogger dbl) {
! /*
! byte [] packet = {0x7e,0,0x0a,0x7d,0x1a,
0x01,0x01,
0x01,0x02,0x03,
***************
*** 175,184 ****
0x4a,0x22 //baro
};
!
! dbl.print(packet);
return false;
}
!
// getRandomID, getRandomTime, getRandomRelHum, etc.
--- 175,185 ----
0x4a,0x22 //baro
};
!
!
! dbl.print(packet);
return false;
}
! */
// getRandomID, getRandomTime, getRandomRelHum, etc.
***************
*** 187,190 ****
--- 188,192 ----
* class.
*/
+ /*
private static int getRandomID(int baseID) {
***************
*** 214,215 ****
--- 216,218 ----
}
+ */
Index: SensorPacket.java
===================================================================
RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/SensorPacket.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SensorPacket.java 15 May 2003 23:03:20 -0000 1.4
--- SensorPacket.java 21 May 2003 22:32:23 -0000 1.5
***************
*** 84,93 ****
s += " [="+Long.toString((long)tempF)+" Fahrenheit Degree]\n";
*/
! if (packet[2]==1){
! s += " [MoteID="+Long.toString(packet[1])+Long.toString(packet[0])+ "]\n";
//Humidity
! s += " [Humidity Data="+Long.toString(packet[2])+"]";
//Temperature
! s += " [TempData="+Long.toString(packet[3])+ Long.toString(packet[4])+"]";
}
return s;
--- 84,93 ----
s += " [="+Long.toString((long)tempF)+" Fahrenheit Degree]\n";
*/
! if (packet[2]==1 && packet[5]!=1){
! s += " [MoteID="+Long.toString(packet[10])+ "]\n";
//Humidity
! s += " [Humidity Data="+Long.toString(packet[12]*256)+Long.toString(packet[11])+"]";
//Temperature
! s += " [TempData="+Long.toString(packet[14]*256)+ Long.toString(packet[13])+"]";
}
return s;
|