Show
Ignore:
Timestamp:
08/14/09 11:24:55 (15 years ago)
Author:
phil
Message:

deleted some test files,
gas meter values (unsigned long long) now updated.
added epoch time handling

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • webserver/example/freeRTOSexample/Source/EnergyMeters/Meters_ISRs.c

    r19 r22  
    22#include "semphr.h" 
    33#include "task.h" 
     4#include "MetersIncludes.h" 
    45 
    5 extern basementGasReading; 
    66extern xMetersSemaphore; 
     7extern xTickCount; /* millisecond tick counter */ 
     8 
     9void handleGasMeterTick(void); 
    710 
    811/* The interrupt entry point. */ 
     
    1922  if ((IO2_INT_STAT_R & (1 << 10)) != 0) /* P2.10 interrupt triggered */ 
    2023  { 
    21     basementGasReading++
     24    handleGasMeterTick()
    2225  } 
    2326 // else if ((IO2_INT_STAT_R & (1 << n)) != 0) /* some other interrupt triggered */ 
     
    5659} 
    5760 
     61void handleGasMeterTick(void) 
     62{ 
     63  meterItems[METER_INDEX_GAS].timeBeforeLastTick = meterItems[METER_INDEX_GAS].timeLastTick;     /* when did the tick before the last tick occur? */ 
     64  meterItems[METER_INDEX_GAS].timeLastTick = getEpochTimeWithMs(); /* when did the last tick occur? epoch (seconds) */ 
     65  meterItems[METER_INDEX_GAS].valueLastTick = 0;   /* what value did we have at the last tick? */ 
     66  meterItems[METER_INDEX_GAS].valueBeforeLastTick = 1;   /* what value did we have at the tick before the last tick? */ 
     67} 
    5868 
    59  
    60