Update of /cvsroot/firebug/firebug/project/src/multihop
In directory sc8-pr-cvs1:/tmp/cvs-serv14580/project/src/multihop
Modified Files:
CollectDataMFB.nc Makefile
Log Message:
sensor msg now parsed collectly into the DB
Index: CollectDataMFB.nc
===================================================================
RCS file: /cvsroot/firebug/firebug/project/src/multihop/CollectDataMFB.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CollectDataMFB.nc 22 May 2003 22:39:51 -0000 1.4
--- CollectDataMFB.nc 23 May 2003 00:57:14 -0000 1.5
***************
*** 41,52 ****
struct DataFormat_t {
! uint8_t addr;
! //uint8_t cnt;
! //uint8_t sampledata;
!
! //uint16_t temp;
float temp;
! //uint16_t rel_hum;
! //uint16_t baro;
};
--- 41,48 ----
struct DataFormat_t {
! uint16_t addr;
float temp;
! float rel_hum;
! float baro_pres;
};
***************
*** 80,86 ****
* @url http://www.taygeta.com/random/gaussian.html
*/
float get_temp() {
! //#if 0
int randnum;
int max = RAND_MAX;
--- 76,83 ----
* @url http://www.taygeta.com/random/gaussian.html
*/
+
float get_temp() {
! #if 0
int randnum;
int max = RAND_MAX;
***************
*** 96,104 ****
y1 = x1*w;
y2 = x2*w;
! //#endif
! return x1;
}
/**
--- 93,108 ----
y1 = x1*w;
y2 = x2*w;
! #endif
! return 72.1;
}
+ float get_rel_hum() {
+ return 98.3;
+ }
+
+ float get_baro_pres() {
+ return 29.1;
+ }
/**
***************
*** 130,133 ****
--- 134,140 ----
//df->temp=0x04CE;
df->temp = get_temp();
+ df->rel_hum = get_rel_hum();
+ df->baro_pres = get_baro_pres();
+
sending = 1;
result = call MultiHopSend.send(&msgToSend, sizeof(struct DataFormat_t));
Index: Makefile
===================================================================
RCS file: /cvsroot/firebug/firebug/project/src/multihop/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Makefile 19 May 2003 20:03:30 -0000 1.9
--- Makefile 23 May 2003 00:57:14 -0000 1.10
***************
*** 20,25 ****
MAIN_SREC= build/mica/main.srec
! #APPLICATION = CollectDataFB.nc
! APPLICATION = BaseStation.nc
--- 20,25 ----
MAIN_SREC= build/mica/main.srec
! APPLICATION = CollectDataFB.nc
! #APPLICATION = BaseStation.nc
|