Update of /cvsroot/firebug/fireboard/beta/fireworks/apps/DataCollection
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32355
Modified Files:
DataCollection.h DataCollection.nc DataCollectionM.nc
Log Message:
Redid the data structures to accommodate humidity temperature. All working now
Index: DataCollectionM.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/DataCollection/DataCollectionM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DataCollectionM.nc 29 Aug 2005 18:52:51 -0000 1.3
--- DataCollectionM.nc 29 Aug 2005 22:45:36 -0000 1.4
***************
*** 19,23 ****
// interface ADC as TSR;
// interface ADC as PAR;
! // interface ADC as InternalTemperature;
interface ADC as InternalVoltage;
interface ADC as Pressure;
--- 19,23 ----
// interface ADC as TSR;
// interface ADC as PAR;
! interface ADC as HumidityTemp;
interface ADC as InternalVoltage;
interface ADC as Pressure;
***************
*** 47,51 ****
// TSRSENSOR,
// PARSENSOR,
! // ITEMP,
IVOLT,
PRESSURE,
--- 47,51 ----
// TSRSENSOR,
// PARSENSOR,
! ITEMP,
IVOLT,
PRESSURE,
***************
*** 112,119 ****
pReading->type = SENSORREADING;
pReading->src = TOS_LOCAL_ADDRESS;
- pReading->parentaddr = call RouteControl.getParent();
pReading->humidity = humidity;
pReading->temperature = temperature;
! // pReading->itemp = itemp;
pReading->ivolt = ivolt;
pReading->pressure = pressure;
--- 112,118 ----
pReading->type = SENSORREADING;
pReading->src = TOS_LOCAL_ADDRESS;
pReading->humidity = humidity;
pReading->temperature = temperature;
! pReading->itemp = itemp;
pReading->ivolt = ivolt;
pReading->pressure = pressure;
***************
*** 124,128 ****
atomic sendBusy = FALSE;
}
-
}
--- 123,126 ----
***************
*** 204,211 ****
call PAR.getData();
break;
case ITEMP:
! call InternalTemperature.getData();
break;
- */
case IVOLT:
--- 202,210 ----
call PAR.getData();
break;
+ */
case ITEMP:
! // call InternalTemperature.getData();
! call HumidityTemp.getData();
break;
case IVOLT:
***************
*** 254,259 ****
atomic temperature = data;
call Timer.start(TIMER_ONE_SHOT, 100);
! state = IVOLT;
! call Leds.set(IVOLT);
return SUCCESS;
}
--- 253,258 ----
atomic temperature = data;
call Timer.start(TIMER_ONE_SHOT, 100);
! state = ITEMP;
! call Leds.set(ITEMP);
return SUCCESS;
}
***************
*** 282,285 ****
--- 281,286 ----
}
+ */
+ /*
async event result_t InternalTemperature.dataReady(uint16_t data) {
itemp = data;
***************
*** 289,292 ****
--- 290,299 ----
}
*/
+ async event result_t HumidityTemp.dataReady(uint16_t data) {
+ itemp = data;
+ call Timer.start(TIMER_ONE_SHOT, 10);
+ state = IVOLT;
+ return SUCCESS;
+ }
async event result_t InternalVoltage.dataReady(uint16_t data) {
Index: DataCollection.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/DataCollection/DataCollection.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DataCollection.nc 29 Aug 2005 18:52:51 -0000 1.3
--- DataCollection.nc 29 Aug 2005 22:45:36 -0000 1.4
***************
*** 56,60 ****
DataCollectionM.HumidityControl -> HumidityC;
DataCollectionM.Humidity -> HumidityC.Humidity;
! // DataCollectionM.Temperature -> HumidityC.Temperature;
DataCollectionM.Temperature -> IntersemaPressure.Temperature;
// DataCollectionM.TSR -> HamamatsuC.TSR;
--- 56,60 ----
DataCollectionM.HumidityControl -> HumidityC;
DataCollectionM.Humidity -> HumidityC.Humidity;
! DataCollectionM.HumidityTemp -> HumidityC.Temperature;
DataCollectionM.Temperature -> IntersemaPressure.Temperature;
// DataCollectionM.TSR -> HamamatsuC.TSR;
Index: DataCollection.h
===================================================================
RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/DataCollection/DataCollection.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DataCollection.h 29 Aug 2005 00:25:53 -0000 1.2
--- DataCollection.h 29 Aug 2005 22:45:36 -0000 1.3
***************
*** 19,26 ****
// uint16_t tsr;
// uint16_t par;
! // uint16_t itemp;
uint16_t ivolt;
uint16_t pressure;
! uint16_t parentaddr;
uint32_t seq_no;
} DataCollectionMsg;
--- 19,26 ----
// uint16_t tsr;
// uint16_t par;
! uint16_t itemp;
uint16_t ivolt;
uint16_t pressure;
! // uint16_t parentaddr;
uint32_t seq_no;
} DataCollectionMsg;
|