Beispiel #1
0
void vApplicationProcessFormInput( char *pcInputString )
{
char *c;
extern void vParTestSetLEDState( long lState );

	/* Process the form input sent by the IO page of the served HTML. */

	c = strstr( pcInputString, "?" );

	if( c ) {
		//sendToLCDTask(vtLCDStruct *dev, uint8_t row, uint8_t strlen, char *strbuf);
		//sendToLCDTask(vuIP_Task, 5, sizeof(c), c);
		
		
		/* Turn the FIO1 LED's on or off in accordance with the check box status. */
		char *str;
		if( (str = strstr( c, "SIDES=" )) != NULL ) {
			vParTestSetLEDState( pdTRUE );
			uint8_t walls = str[6] - '0';
			sendWallsToMapTask(mapDev,walls);
		}
		else if( strstr( c, "START" ) != NULL ) {
			sendToLCDTask(lcdDev,0,strlen("RUNNING"),"RUNNING");
			sendStartToRoverStatusTask(roverStatusDev);
		}
		else if( strstr( c, "STOP" ) != NULL ) {
			sendToLCDTask(lcdDev,0,strlen("NOT RUNNING"),"NOT RUNNING");
			sendStopToRoverStatusTask(roverStatusDev);
		}
		else {
			vParTestSetLEDState( pdFALSE );
		}
	}
}
Beispiel #2
0
void vApplicationProcessFormInput( char *pcInputString )
{
char *c;
extern void vParTestSetLEDState( long lState );

	/* Process the form input sent by the Info page of the served HTML. */
	c = strstr( pcInputString, "info.shtml?" );
    if( c )
    {
		webInput_t inputs={{0}};
		if(strstr(c,"start=on")!=NULL){ inputs.start=1; }
		if(strstr(c,"loop=on")!=NULL){ inputs.loop=1; }
		if(strstr(c,"M4Demo=on")!=NULL){ inputs.m4Demo=1; }
		if(strstr(c,"printNav=on")!=NULL){ inputs.printNav=1; }
		if(strstr(c,"printZigBee=on")!=NULL){ inputs.printZigBee=1; }

		setWebInputs(&inputs);
    }

	/* Process the form input sent by the IO page of the served HTML. */
	c = strstr( pcInputString, "io.shtml?" );
    if( c )
    {
		/* Turn the FIO1 LED's on or off in accordance with the check box status. */
		if( strstr( c, "LED0=1" ) != NULL )
		{
			vParTestSetLEDState( pdTRUE );
		}
		else
		{
			vParTestSetLEDState( pdFALSE );
		}
	}
}
Beispiel #3
0
void vApplicationProcessFormInput( char *pcInputString )
{
char *c;
extern void vParTestSetLEDState( long lState );

	/* Process the form input sent by the IO page of the served HTML. */

	c = strstr( pcInputString, "?" );
    if( c )
    {
		/* Turn the FIO1 LED's on or off in accordance with the check box status. */
		if( strstr( c, "LED0=1" ) != NULL )
		{
			vParTestSetLEDState( pdTRUE );
		}
		else
		{
			vParTestSetLEDState( pdFALSE );
		}
    }
}