Author Topic: Debuging webinterface.c in Cw 6.3 Lite  (Read 23986 times)

Offline johnr

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Debuging webinterface.c in Cw 6.3 Lite
« Reply #15 on: October 05, 2007, 10:04:38 PM »
Mark, I figured it out looking at ethereal. When you submit the form ,fnHandleWeb()
will get passed the name of the SELECT control, Y1 .. Y8 in my case, The following
code allows me to get the char after the Y and then the value it is set to.
When handling form data from the browser, the first char of the name of the control gets passed to fnHandleWeb(). If it is more than 1 char you can keep parsing it and then skip the = to read the value.

 

      case 'Y':
        // Handle ADC Input type selection
        // Coded as £sY {Value 'A'..'Z'} {Channel 1..8}
        iChan=*(ptrData++); // Get value before =, channel num 1..8
        iChan-='1';
        iVal=*(++ptrData);  // Get value after = A..Z Input type
        iVal-='A';
        ADC_Chans[iChan].Type=iVal;
        break;   


 John