Changeset 32 for webserver/example
- Timestamp:
- 08/14/09 23:28:59 (15 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/EnergyMeters.hzs
r31 r32 19 19 <ProjectSessionItem path="EnergyMetersEmbedded" name="unnamed" /> 20 20 <ProjectSessionItem path="EnergyMetersEmbedded;EnergyMetersEmbedded" name="unnamed" /> 21 <ProjectSessionItem path="EnergyMetersEmbedded;EnergyMetersEmbedded;Demo Source" name="unnamed" /> 21 22 <ProjectSessionItem path="EnergyMetersEmbedded;EnergyMetersEmbedded;EnergyMeters" name="unnamed" /> 22 23 </Project> … … 38 39 </TraceWindow> 39 40 <Watch1> 40 <Watches active="1" update="Never" > 41 <Watches active="1" update="Three Seconds" > 42 <Watchpoint evalMode="2" linenumber="72" numelements="10" evalType="0" radix="16" name="meterItems" expression="meterItems" filename="d:/energymetersproject/source/energymeters/meters_isrs.c" /> 41 43 <Watchpoint linenumber="64" radix="-1" name="currentTime" expression="currentTime" filename="d:/energymetersproject/source/energymeters/meters_isrs.c" /> 42 <Watchpoint evalMode="2" linenumber="72" numelements="10" evalType="0" radix="-1" name="meterItems" expression="meterItems" filename="d:/energymetersproject/source/energymeters/meters_isrs.c" />43 44 </Watches> 44 45 </Watch1> … … 58 59 <Files> 59 60 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\Source\EnergyMeters\Meters.c" y="122" path="D:\EnergyMetersProject\Source\EnergyMeters\Meters.c" left="0" selected="0" name="unnamed" top="122" /> 60 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\main.c" y="113" path="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\main.c" left="0" selected=" 0" name="unnamed" top="101" />61 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\Source\EnergyMeters\Meters_ISRs.c" y=" 89" path="D:\EnergyMetersProject\Source\EnergyMeters\Meters_ISRs.c" left="0" selected="1" name="unnamed" top="66" />61 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\main.c" y="113" path="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\main.c" left="0" selected="1" name="unnamed" top="129" /> 62 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\Source\EnergyMeters\Meters_ISRs.c" y="71" path="D:\EnergyMetersProject\Source\EnergyMeters\Meters_ISRs.c" left="0" selected="0" name="unnamed" top="69" /> 62 63 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\energymetersproject\source\energymeters\timeConversion.c" y="18" path="D:\energymetersproject\source\energymeters\timeConversion.c" left="0" selected="0" name="unnamed" top="18" /> 63 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\energymetersproject\source\energymeters\MetersIncludes.h" y="8" path="D:\energymetersproject\source\energymeters\MetersIncludes.h" left="0" selected="0" name="unnamed" top=" 8" />64 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\energymetersproject\source\energymeters\MetersIncludes.h" y="8" path="D:\energymetersproject\source\energymeters\MetersIncludes.h" left="0" selected="0" name="unnamed" top="0" /> 64 65 <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\webserver\httpd-cgi.c" y="0" path="D:\EnergyMetersProject\EnergyMeters\ARM7_LPC2368_Rowley\webserver\httpd-cgi.c" left="0" selected="0" name="unnamed" top="0" /> 65 66 </Files> webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c
r30 r32 70 70 * enough on the web page to be read by the server 71 71 */ 72 if ( currentTime > ((unsigned long long)meterItems[METER_INDEX_GAS].timeLastTick + ((unsigned long long)ACCUMULATE_TICK_THRESHOLD_SEC * (unsigned long long)1000)) )72 if ( currentTime > ((unsigned long long)meterItems[METER_INDEX_GAS].timeBeforeLastTick + ((unsigned long long)ACCUMULATE_TICK_THRESHOLD_SEC * (unsigned long long)1000)) ) 73 73 { 74 /* if the last meter tick happened longer than DEBOUNCE_TICK_THRESHOLD_MS ago (i.e. the switch did not just bounce) */ 74 /* if the last meter tick happened longer than DEBOUNCE_TICK_THRESHOLD_MS ago (i.e. the switch did not just bounce), 75 * we create a new data item 76 */ 75 77 meterItems[METER_INDEX_GAS].timeBeforeLastTick = meterItems[METER_INDEX_GAS].timeLastTick; /* when did the tick before the last tick occur? (epoch in milliseconds) */ 76 78 meterItems[METER_INDEX_GAS].timeLastTick = currentTime; /* when did the last tick occur? (epoch in milliseconds) */ … … 81 83 else 82 84 { 83 ; /* nothing to do, curentValue was increased already above */ 85 /* do not create a new data item, but update the current "last" data item */ 86 meterItems[METER_INDEX_GAS].timeLastTick = currentTime; 87 meterItems[METER_INDEX_GAS].valueLastTick = meterItems[METER_INDEX_GAS].currentValue; 84 88 } 85 89 }