[Firebug-cvs] mts400/sensors/sensirion SensirionHumidityM.nc,1.1,1.2
Brought to you by:
doolin
From: <do...@us...> - 2003-11-15 00:44:54
|
Update of /cvsroot/firebug/mts400/sensors/sensirion In directory sc8-pr-cvs1:/tmp/cvs-serv24882/sensirion Modified Files: SensirionHumidityM.nc Log Message: Added a debugging header specifically for the switch component. Index: SensirionHumidityM.nc =================================================================== RCS file: /cvsroot/firebug/mts400/sensors/sensirion/SensirionHumidityM.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SensirionHumidityM.nc 12 Nov 2003 01:44:20 -0000 1.1 --- SensirionHumidityM.nc 15 Nov 2003 00:44:51 -0000 1.2 *************** *** 62,65 **** --- 62,68 ---- command result_t SplitControl.start() { + + SODbg(DBG_USR2, "SensirionHumidityM.SplitControl.start() \n", state); + // turn the sensor on state = MAIN_SWITCH_ON; *************** *** 73,76 **** --- 76,82 ---- command result_t SplitControl.stop() { + + SODbg(DBG_USR2, "SensirionHumidityM.SplitControl.stop() \n", state); + power = FALSE; state = MAIN_SWITCH_OFF; *************** *** 88,91 **** --- 94,99 ---- event result_t Switch1.setDone(bool local_result) { + SODbg(DBG_USR2, "SensirionHumidityM.Switch1.setDone() \n", state); + if (state == MAIN_SWITCH_ON) { state = IDLE; *************** *** 125,138 **** ! SODbg(DBG_USR2, "SensirionHumidityM.SwitchI2W: state: %i \n", state); - - if (state == OPENSCK) { //SCK line enabled state = OPENDATA; return call SwitchI2W.set(MICAWB_HUMIDITY_DATA,1); } else if (state == OPENDATA) { //Data line enabled ! state = TIMER; ! SODbg(DBG_USR2, "SensirionHumidityM.SwitchI2W: Timer Started \n"); return call Timer.start(TIMER_ONE_SHOT, 100); --- 133,144 ---- ! SODbg(DBG_USR2, "SensirionHumidityM.SwitchI2W.setDone: state: %i \n", state); if (state == OPENSCK) { //SCK line enabled state = OPENDATA; return call SwitchI2W.set(MICAWB_HUMIDITY_DATA,1); } else if (state == OPENDATA) { //Data line enabled ! state = TIMER; ! SODbg(DBG_USR2, "SensirionHumidityM.SwitchI2W: Timer Started \n"); return call Timer.start(TIMER_ONE_SHOT, 100); *************** *** 151,155 **** if (id == MICAWB_HUMIDITY){ signal Humidity.dataReady(l_result); //everything complete, humidity data ready ! } else if (id == MICAWB_HUMIDITY_TEMP) signal Temperature.dataReady(l_result); //everything complete, temp data ready --- 157,161 ---- if (id == MICAWB_HUMIDITY){ signal Humidity.dataReady(l_result); //everything complete, humidity data ready ! } else if (id == MICAWB_HUMIDITY_TEMP) signal Temperature.dataReady(l_result); //everything complete, temp data ready *************** *** 158,167 **** } ! event result_t Timer.fired() { state = BUSY; if (id == MICAWB_HUMIDITY) { SODbg(DBG_USR2, "SensirionHumidityM.Timer.fired: get humidity data \n"); ! return call HumSensor.getData(); } --- 164,177 ---- } ! event result_t Timer.fired() { ! ! ! SODbg(DBG_USR2, "SensirionHumidityM.Timer.fired() \n", state); ! state = BUSY; if (id == MICAWB_HUMIDITY) { SODbg(DBG_USR2, "SensirionHumidityM.Timer.fired: get humidity data \n"); ! return call HumSensor.getData(); } *************** *** 190,193 **** --- 200,206 ---- async command result_t Humidity.getData() { + + SODbg(DBG_USR2, "SensirionHumidityM.Humidity.getData(), state: \n", state); + if (state == IDLE) { *************** *** 201,205 **** async command result_t Temperature.getData() { ! if (state == IDLE) { id = MICAWB_HUMIDITY_TEMP; --- 214,222 ---- async command result_t Temperature.getData() { ! ! ! SODbg(DBG_USR2, "SensirionHumidityM.Temperature.getData(), state: \n", state); ! ! if (state == IDLE) { id = MICAWB_HUMIDITY_TEMP; |