Update of /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11
In directory sc8-pr-cvs1:/tmp/cvs-serv8493
Modified Files:
SensirionM.nc TempHumM.nc
Log Message:
Sensirion test code is working.
Index: SensirionM.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11/SensirionM.nc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SensirionM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1
--- SensirionM.nc 21 Jan 2004 20:42:35 -0000 1.2
***************
*** 55,59 ****
#include "sensirion_sht11.h"
#include "SODebug.h"
! #define DBG_USR2 1
enum {START, BUSY, HUMIDITY_DONE};
--- 55,59 ----
#include "sensirion_sht11.h"
#include "SODebug.h"
! #define DBG_USR2 0
enum {START, BUSY, HUMIDITY_DONE};
***************
*** 72,76 ****
command result_t StdControl.init() {
! init_debug();
call Leds.init();
call TempHumControl.init(); //init Sensirion
--- 72,76 ----
command result_t StdControl.init() {
! //init_debug();
call Leds.init();
call TempHumControl.init(); //init Sensirion
***************
*** 84,92 ****
call TemperatureError.enable(); // "
- call Leds.redOn();
- call Leds.yellowOn();
- call Leds.greenOn();
state = START;
- //call Timer.start(TIMER_REPEAT, 2000); //start up weather sensor measurements
SODbg(DBG_USR2, "SensirionM.StdControl.start()...\n");
--- 84,88 ----
***************
*** 106,113 ****
event result_t Timer.fired() {
- call Leds.redOff();
- call Leds.yellowOff();
- call Leds.greenOff();
-
call TempHumControl.start();
return SUCCESS;
--- 102,105 ----
***************
*** 185,190 ****
event result_t HumidityError.error(uint8_t token) {
- call Leds.redOff();
- call Leds.yellowOff();
call Temperature.getData();
return SUCCESS;
--- 177,180 ----
***************
*** 195,199 ****
call TempHumControl.stop();
- call Leds.yellowOff();
return SUCCESS;
}
--- 185,188 ----
***************
*** 241,244 ****
--- 230,235 ----
command result_t Sensor.startSampling() {
+
+ call Timer.start(TIMER_REPEAT, 2000);
return SUCCESS;
}
***************
*** 256,260 ****
}
! default event result_t Sensor.error(uint16_t) {
return SUCCESS;
}
--- 247,251 ----
}
! async default event result_t Sensor.error(uint16_t) {
return SUCCESS;
}
Index: TempHumM.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11/TempHumM.nc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TempHumM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1
--- TempHumM.nc 21 Jan 2004 20:42:35 -0000 1.2
***************
*** 441,445 ****
}
}
! call Leds.redOn();
atomic {
state=TEMP_MEASUREMENT;
--- 441,445 ----
}
}
! //call Leds.redOn();
atomic {
state=TEMP_MEASUREMENT;
***************
*** 461,465 ****
SODbg(DBG_USR2, "TempHumM.getData: starting to get humidity data \n");
! call Leds.yellowOn();
atomic {
state=HUM_MEASUREMENT;
--- 461,465 ----
SODbg(DBG_USR2, "TempHumM.getData: starting to get humidity data \n");
! //call Leds.yellowOn();
atomic {
state=HUM_MEASUREMENT;
***************
*** 517,521 ****
if (timeout > HUMIDITY_TIMEOUT_TRIES) {
! call Leds.redOff();
// call Leds.yellowOff();
--- 517,521 ----
if (timeout > HUMIDITY_TIMEOUT_TRIES) {
! //call Leds.redOff();
// call Leds.yellowOff();
|