Update of /cvsroot/firebug/fireboard/fireboard/sensors/taos_tsl250rd
In directory sc8-pr-cvs1:/tmp/cvs-serv31002/fireboard/sensors/taos_tsl250rd
Modified Files:
TaosPhotoM.nc taos.nc taosM.nc
Added Files:
Makefile
Log Message:
Crash bang boom. Light and barometer are down at the moment, but the driver code is getting much cleaner. May need to back out a couple of
minor changes later. There may be a file or two that have been removed from the archive that will be actually needed, it/they can be added back if it is
not possible to make the system files work.
--- NEW FILE: Makefile ---
clean:
rm -rf *~
Index: TaosPhotoM.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/taos_tsl250rd/TaosPhotoM.nc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TaosPhotoM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1
--- TaosPhotoM.nc 22 Jan 2004 00:40:07 -0000 1.2
***************
*** 90,94 ****
#include "SODebug.h"
! #define DBG_USR2 0
enum {IDLE, START_TAOS, SWITCH_POWER_ON, SWITCH_POWER_OFF, SWITCH_WAIT,
--- 90,94 ----
#include "SODebug.h"
! #define DBG_USR2 1
enum {IDLE, START_TAOS, SWITCH_POWER_ON, SWITCH_POWER_OFF, SWITCH_WAIT,
***************
*** 138,142 ****
command result_t SplitControl.start() {
! SODbg(DBG_USR2, "TaosPhoto:start \n");
atomic {
--- 138,142 ----
command result_t SplitControl.start() {
! SODbg(DBG_USR2, "TaosPhotoM.SplitControl.start \r\n");
atomic {
***************
*** 146,149 ****
--- 146,150 ----
call SwitchControl.start();
if (call Switch.set(MICAWB_LIGHT_POWER,1) != SUCCESS) {
+ SODbg(DBG_USR2, "TaosPhotoM.SplitControl.start SWITCH_WAIT set\r\n");
state = SWITCH_WAIT;
}
Index: taos.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/taos_tsl250rd/taos.nc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** taos.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1
--- taos.nc 22 Jan 2004 00:40:07 -0000 1.2
***************
*** 24,28 ****
components taosM,
! MicaWbSwitch,
TimerC,
NoLeds,
--- 24,28 ----
components taosM,
! //MicaWbSwitch,
TimerC,
NoLeds,
Index: taosM.nc
===================================================================
RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/taos_tsl250rd/taosM.nc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** taosM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1
--- taosM.nc 22 Jan 2004 00:40:07 -0000 1.2
***************
*** 38,47 ****
#include "taos_tsl250rd.h"
#include "SODebug.h"
! #define DBG_USR2 0
!
! enum {START, BUSY, LIGHT_DONE, ACCEL_DONE};
uint16_t TaosData;
- uint8_t state;
taos_tsl250rd_data_msg data_msg = {0};
--- 38,44 ----
#include "taos_tsl250rd.h"
#include "SODebug.h"
! #define DBG_USR2 1
uint16_t TaosData;
taos_tsl250rd_data_msg data_msg = {0};
***************
*** 60,69 ****
command result_t StdControl.start() {
-
- call Leds.redOn();
- call Leds.yellowOn();
- call Leds.greenOn();
- state = START;
- //call Timer.start(TIMER_REPEAT, 500);
return SUCCESS;
}
--- 57,60 ----
***************
*** 75,98 ****
event result_t Timer.fired() {
! call Leds.redOff();
! call Leds.yellowOff();
! call Leds.greenOff();
!
! switch (state) {
!
! case START:
! state = BUSY;
! call TaosControl.start();
! break;
!
! case LIGHT_DONE:
! state = START;
! break;
!
! default:
! break;
! }
!
!
return SUCCESS;
}
--- 66,71 ----
event result_t Timer.fired() {
! SODbg(DBG_USR2, "taosM.Timer.fired() \r\n") ;
! call TaosControl.start();
return SUCCESS;
}
***************
*** 202,206 ****
event result_t TaosControl.stopDone() {
- state = LIGHT_DONE;
signal Sensor.powerOffDone();
return SUCCESS;
--- 175,178 ----
***************
*** 242,245 ****
--- 214,219 ----
command result_t Sensor.startSampling() {
+ SODbg(DBG_USR2, "taosM.Sensor.startSampling() \r\n") ;
+ call Timer.start(TIMER_REPEAT, 500);
return SUCCESS;
}
***************
*** 257,261 ****
}
! default event result_t Sensor.error(uint16_t error_code) {
return SUCCESS;
}
--- 231,235 ----
}
! default async event result_t Sensor.error(uint16_t error_code) {
return SUCCESS;
}
|