[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/ThreeAxisRecorder ThreeAxisRecorderM.nc, 1.2, 1.3 download_data.py, 1.1, 1.2
steve ayer
ayer1 at users.sourceforge.net
Fri Aug 29 07:39:14 PDT 2008
- Previous message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/FAT_EKG FAT_EKG.nc, 1.1, 1.2 FAT_EKG_M.nc, 1.1, 1.2 SHIMMER2_SD_cardImage.zip, 1.1, 1.2 SerialLink.nc, 1.1, 1.2 readme.doc, 1.1, 1.2 readme.txt, 1.1, 1.2
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/AccessPointWindows - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/ThreeAxisRecorder
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31114
Modified Files:
ThreeAxisRecorderM.nc download_data.py
Log Message:
from a catalin caranfil patch (thanks!):
in ThreeAxisRecorderM.nc
repairs to calls to sd operations.
writeSector is now writeBlock
newly required events from driver also added, sd.available and
.unavailable.
in download_data.py,
a retry was added to the download routine
Index: ThreeAxisRecorderM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/ThreeAxisRecorder/ThreeAxisRecorderM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ThreeAxisRecorderM.nc 14 Sep 2007 19:14:13 -0000 1.2
--- ThreeAxisRecorderM.nc 29 Aug 2008 14:39:06 -0000 1.3
***************
*** 187,191 ****
// write start marker
call SD.init();
! call SD.writeSector(START_SECTOR, file_marker);
sectors_written++;
--- 187,192 ----
// write start marker
call SD.init();
! // call SD.writeSector(START_SECTOR, file_marker);
! call SD.writeBlock(START_SECTOR, file_marker);
sectors_written++;
***************
*** 233,237 ****
}
*(uint16_t *)(file_marker + 510) = crc_fsc;
! call SD.writeSector(START_SECTOR, file_marker);
call HPLUART.init();
CLR_FLAG(ADC12CTL0, REF2_5V); // turn off voltage ref
--- 234,239 ----
}
*(uint16_t *)(file_marker + 510) = crc_fsc;
! // call SD.writeSector(START_SECTOR, file_marker);
! call SD.writeBlock(START_SECTOR, file_marker);
call HPLUART.init();
CLR_FLAG(ADC12CTL0, REF2_5V); // turn off voltage ref
***************
*** 286,290 ****
// call SD.init();
! call SD.writeSector(START_SECTOR + sectors_written, ptr);
sectors_written++;
}
--- 288,293 ----
// call SD.init();
! // call SD.writeSector(START_SECTOR + sectors_written, ptr);
! call SD.writeBlock(START_SECTOR + sectors_written, ptr);
sectors_written++;
}
***************
*** 301,305 ****
call Leds.orangeToggle();
call SD.init();
! err = call SD.readSector((START_SECTOR + sector), sd_send_buffer);
call HPLUART.init();
atomic {
--- 304,309 ----
call Leds.orangeToggle();
call SD.init();
! // err = call SD.readSector((START_SECTOR + sector), sd_send_buffer);
! err = call SD.readBlock((START_SECTOR + sector), sd_send_buffer);
call HPLUART.init();
atomic {
***************
*** 524,526 ****
--- 528,539 ----
call Leds.redOn();
}
+
+ // We should *not* see this, as the adc interrupts are eaten by
+ // the dma controller!
+ async event void SD.available() {
+ }
+
+ async event void SD.unavailable() {
+ }
+
}
Index: download_data.py
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/ThreeAxisRecorder/download_data.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** download_data.py 12 Sep 2007 18:35:24 -0000 1.1
--- download_data.py 29 Aug 2008 14:39:10 -0000 1.2
***************
*** 149,160 ****
outfile = sys.stdout
print >> sys.stderr, "Percent of download completed: 00",
for sector in xrange(1,sectors_to_read):
data = get_data(sector)
if data == '': # Sector was bad
! print >> sys.stderr, "\nSector %i has errors." % sector
! print >> sys.stderr, "Percent of download completed: %02d" % \
! ((sector*100)/sectors_to_read),
! continue
# timestamp is in UTC
--- 149,164 ----
outfile = sys.stdout
+ print >> sys.stderr, "Downloading %i sectors\n" % sectors_to_read
print >> sys.stderr, "Percent of download completed: 00",
for sector in xrange(1,sectors_to_read):
data = get_data(sector)
if data == '': # Sector was bad
! # try again once
! data = get_data(sector)
! if data == '': # Sector was indeed bad
! print >> sys.stderr, "\nSector %i has errors." % sector
! print >> sys.stderr, "Percent of download completed: %02d" % \
! ((sector*100)/sectors_to_read),
! continue
# timestamp is in UTC
- Previous message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/FAT_EKG FAT_EKG.nc, 1.1, 1.2 FAT_EKG_M.nc, 1.1, 1.2 SHIMMER2_SD_cardImage.zip, 1.1, 1.2 SerialLink.nc, 1.1, 1.2 readme.doc, 1.1, 1.2 readme.txt, 1.1, 1.2
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/AccessPointWindows - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list