Changeset 45 for webserver/example/EnergyMeters
- Timestamp:
- 02/07/10 11:28:03 (15 years ago)
- Files:
-
- webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/main.c (modified) (1 diff)
- webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c (modified) (1 diff)
- webserver/example/EnergyMeters/EnergyMeters/Common/Minimal/flash.c (modified) (2 diffs)
- webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c (modified) (1 diff)
- webserver/example/EnergyMeters/Source/EnergyMeters/MetersIncludes.h (modified) (1 diff)
- webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/main.c
r37 r45 128 128 129 129 // vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); 130 //*vStartMetersTask( mainFLASH_PRIORITY );130 vStartMetersTask( mainFLASH_PRIORITY ); 131 131 132 132 vStartSolarTask( mainFLASH_PRIORITY ); webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c
r44 r45 239 239 //strcat( ( char * ) uip_appdata, ( char * ) "\r\n" ); 240 240 241 sprintf( cCountBuf, "<p><br>GASmeter %d %d %d %d %d %d \r\n",241 sprintf( cCountBuf, "<p><br>GASmeter %d %d %d %d %d %d %d %d\r\n", 242 242 meterItems[METER_INDEX_GAS].meterEnabled, 243 meterItems[METER_INDEX_GAS].timeLastTick, 244 meterItems[METER_INDEX_GAS].timeBeforeLastTick, 243 (portLONG)(meterItems[METER_INDEX_GAS].timeLastTick << 32), 244 (portLONG)(meterItems[METER_INDEX_GAS].timeLastTick & 0xffffffff), 245 (portLONG)(meterItems[METER_INDEX_GAS].timeBeforeLastTick << 32), 246 (portLONG)(meterItems[METER_INDEX_GAS].timeBeforeLastTick & 0xffffffff), 245 247 meterItems[METER_INDEX_GAS].valueLastTick, 246 248 meterItems[METER_INDEX_GAS].currentValue, webserver/example/EnergyMeters/EnergyMeters/Common/Minimal/flash.c
r42 r45 148 148 for(;;) 149 149 { 150 151 152 150 153 /* Delay for half the flash period then turn the LED on. */ 151 154 vTaskDelayUntil( &xLastFlashTime, xFlashRate ); 152 155 vParTestToggleLED( uxLED ); 156 157 158 #if 0 159 160 // TODO: LCD not fully included in this config ... this would crash! 153 161 154 162 LCD_cls(); … … 161 169 xQueueSend( xLCDQueue, &xMessage, portMAX_DELAY ); 162 170 163 171 #endif 164 172 165 173 /* Delay for half the flash period then turn the LED off. */ webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c
r42 r45 40 40 vSemaphoreCreateBinary( xMetersSemaphore ); 41 41 42 //Init_P2_0(); /* init GPIO for meters */42 Init_P2_0(); /* init GPIO for meters */ 43 43 // TODO: put this in again, right now it interferes with Solar UART3! 44 44 webserver/example/EnergyMeters/Source/EnergyMeters/MetersIncludes.h
r30 r45 3 3 unsigned long long getEpochTimeWithMs(void); 4 4 5 #define NUMBER_OF_METERS 1 0/* the number of meters we use */5 #define NUMBER_OF_METERS 11 /* the number of meters we use */ 6 6 7 #define METER_INDEX_GAS 0 /* index of the gas meter data */7 #define METER_INDEX_GAS 10 /* index of the gas meter data */ 8 8 9 9 #define DEBOUNCE_TICK_THRESHOLD_MS 50 /* when two ticks are less than this time period apart, the second tick is ignored (debouncing) */ webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c
r43 r45 96 96 unsigned long long currentTime = getEpochTimeWithMs(); /* current epoch time with ms in ms */ 97 97 98 if (portNum >= NUMBER_OF_METERS) /* allowed index: 0 to (NUMBER_OF_METERS-1) */ 99 { 100 return; /* invalid value */ 101 } 102 98 103 globalValue++; 99 104 // LCD_cls();