Show
Ignore:
Timestamp:
02/07/10 11:28:03 (15 years ago)
Author:
phil
Message:

example meter (button SPI LOAD) now on web page, removed LCD writing in flash.c (crashes).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/main.c

    r37 r45  
    128128 
    129129//  vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); 
    130 //*  vStartMetersTask( mainFLASH_PRIORITY ); 
     130  vStartMetersTask( mainFLASH_PRIORITY ); 
    131131 
    132132  vStartSolarTask( mainFLASH_PRIORITY ); 
  • webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c

    r44 r45  
    239239        //strcat( ( char * ) uip_appdata, ( char * ) "\r\n" ); 
    240240 
    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", 
    242242            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), 
    245247            meterItems[METER_INDEX_GAS].valueLastTick, 
    246248            meterItems[METER_INDEX_GAS].currentValue, 
  • webserver/example/EnergyMeters/EnergyMeters/Common/Minimal/flash.c

    r42 r45  
    148148        for(;;) 
    149149        { 
     150 
     151 
     152 
    150153                /* Delay for half the flash period then turn the LED on. */ 
    151154                vTaskDelayUntil( &xLastFlashTime, xFlashRate ); 
    152155                vParTestToggleLED( uxLED ); 
     156 
     157 
     158#if 0 
     159 
     160// TODO: LCD not fully included in this config ... this would crash! 
    153161 
    154162                LCD_cls(); 
     
    161169                xQueueSend( xLCDQueue, &xMessage, portMAX_DELAY ); 
    162170 
    163  
     171#endif 
    164172 
    165173                /* Delay for half the flash period then turn the LED off. */ 
  • webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c

    r42 r45  
    4040  vSemaphoreCreateBinary( xMetersSemaphore ); 
    4141         
    42   //Init_P2_0(); /* init GPIO for meters */ 
     42  Init_P2_0(); /* init GPIO for meters */ 
    4343  // TODO: put this in again, right now it interferes with Solar UART3! 
    4444 
  • webserver/example/EnergyMeters/Source/EnergyMeters/MetersIncludes.h

    r30 r45  
    33unsigned long long getEpochTimeWithMs(void); 
    44 
    5 #define NUMBER_OF_METERS 10 /* the number of meters we use */ 
     5#define NUMBER_OF_METERS 11 /* the number of meters we use */ 
    66 
    7 #define METER_INDEX_GAS 0 /* index of the gas meter data */ 
     7#define METER_INDEX_GAS 10 /* index of the gas meter data */ 
    88 
    99#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  
    9696  unsigned long long currentTime = getEpochTimeWithMs(); /* current epoch time with ms in ms */ 
    9797 
     98  if (portNum >= NUMBER_OF_METERS) /* allowed index: 0 to (NUMBER_OF_METERS-1) */ 
     99  { 
     100    return; /* invalid value */ 
     101  } 
     102 
    98103  globalValue++; 
    99104    //   LCD_cls();