Changeset 44 for webserver

Show
Ignore:
Timestamp:
02/04/10 20:29:58 (15 years ago)
Author:
phil
Message:

serial init now only once at startup (not at every solar read error), added solar read counter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • webserver/example/EnergyMeters/EnergyMeters/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c

    r41 r44  
    6565extern int chanWatt[6]; /* holds the wattages measured on channel 0 to 5 */ 
    6666extern int solarReadErrors; 
     67extern int solarReadCounter; 
    6768 
    6869HTTPD_CGI_CALL(file, "file-stats", file_stats); 
     
    224225        lRefreshCount++; 
    225226        sprintf( cCountBuf, "<p><br>Refresh count = %d\r\nVoltages %d %d %d %d\r\n\ 
    226 Wattages %d %d %d %d\r\nSolarReadErr %d\r\n", lRefreshCount, 
     227Wattages %d %d %d %d\r\nSolarReadErr %d\r\nSolarReadCount %d\r\n", lRefreshCount, 
    227228         chanVolt[0], chanVolt[1], chanVolt[2], chanVolt[3], 
    228229         chanWatt[0], chanWatt[1], chanWatt[2], chanWatt[3], 
    229          solarReadErrors 
     230         solarReadErrors, solarReadCounter 
    230231         ); 
    231232        //strcat( uip_appdata, cCountBuf ); 
  • webserver/example/EnergyMeters/Source/EnergyMeters/SolarCountUART.c

    r39 r44  
    109109int solarReadErrors = 0; 
    110110 
     111int solarReadCounter = 0; 
     112 
    111113/* pototype  section */ 
    112114 
     
    142144  xLastReadTime = xTaskGetTickCount(); 
    143145  solarState = SOL_NO_INIT; 
    144   init_serial3(); 
     146  uart3TxRunning = 0; /* reset flag to tell if we are currently sending a datagram */ 
     147  rxBuf3NextFreeRxPos = 0; 
     148  currentChannel = 0; 
    145149} /* initSolarFSM */ 
    146150 
     
    350354      /* we have got a match! */ 
    351355       
     356      solarReadCounter++; 
    352357      /* copy Rx data */ 
    353358      /* TODO */ 
     
    624629{ 
    625630 
    626  
     631  init_serial3(); 
    627632  initSolarFSM(); 
    628633