mirror of
				https://github.com/luc-github/ESP3D.git
				synced 2025-10-31 11:56:48 -07:00 
			
		
		
		
	Add 250000 baud rate support
as arduino IDE support it
This commit is contained in:
		| @@ -62,7 +62,7 @@ void setup() { | ||||
|   if ( CONFIG::read_buffer(EP_BAUD_RATE,  (byte *)&baud_rate , INTEGER_LENGH)&&CONFIG::read_buffer(EP_WEB_PORT,  (byte *)&(wifi_config.iweb_port) , INTEGER_LENGH)&&CONFIG::read_buffer(EP_DATA_PORT,  (byte *)&(wifi_config.idata_port) , INTEGER_LENGH)) | ||||
|     { | ||||
|       //check if baud value is one of allowed ones | ||||
|       if ( ! (baud_rate==9600 || baud_rate==19200 ||baud_rate==38400 ||baud_rate==57600 ||baud_rate==115200 ||baud_rate==230400) )breset_config=true;//baud rate is incorrect =>reset settings | ||||
|       if ( ! (baud_rate==9600 || baud_rate==19200 ||baud_rate==38400 ||baud_rate==57600 ||baud_rate==115200 ||baud_rate==230400 ||baud_rate==250000) )breset_config=true;//baud rate is incorrect =>reset settings | ||||
| 	  if (wifi_config.iweb_port<1 ||wifi_config.iweb_port>65001 || wifi_config.idata_port <1 || wifi_config.idata_port >65001)breset_config=true; //out of range =>reset settings | ||||
|      | ||||
|     } | ||||
|   | ||||
| @@ -193,6 +193,7 @@ const char VALUE_38400[] PROGMEM = "38400"; | ||||
| const char VALUE_57600[] PROGMEM = "57600"; | ||||
| const char VALUE_115200[] PROGMEM = "115200"; | ||||
| const char VALUE_230400[] PROGMEM = "230400"; | ||||
| const char VALUE_250000[] PROGMEM = "250000"; | ||||
| const char VALUE_SELECTED[] PROGMEM = "selected"; | ||||
| const char AP_1_ID[] PROGMEM = "AP1"; | ||||
| const char AP_2_ID[] PROGMEM = "AP2"; | ||||
| @@ -600,7 +601,7 @@ void handle_web_interface_configSys() | ||||
| 					msg_alert_error=true; | ||||
| 					smsg=PROGMEM2CHAR(ERROR_INCORRECT_PORT2); | ||||
| 			    } | ||||
| 			if (!(ibaud==9600 || ibaud==19200|| ibaud==38400|| ibaud==57600|| ibaud==115200|| ibaud==230400) || | ||||
| 			if (!(ibaud==9600 || ibaud==19200|| ibaud==38400|| ibaud==57600|| ibaud==115200|| ibaud==230400 || ibaud==250000) || | ||||
| 			    !(bsleepmode==NONE_SLEEP_T ||bsleepmode==LIGHT_SLEEP_T ||bsleepmode==MODEM_SLEEP_T )|| | ||||
| 			    !(polling_time==1 || polling_time==2 ||polling_time==3 || polling_time==4 ||polling_time==5 ||polling_time==10 ||polling_time==30 ||polling_time==60)) | ||||
| 				{ | ||||
| @@ -674,6 +675,9 @@ void handle_web_interface_configSys() | ||||
|    if (ibaud==230400)stmp = PROGMEM2CHAR(VALUE_SELECTED); | ||||
|   else stmp=""; | ||||
|   OPTION(PROGMEM2CHAR(VALUE_230400), stmp.c_str(),PROGMEM2CHAR(VALUE_230400)) | ||||
|   if (ibaud==250000)stmp = PROGMEM2CHAR(VALUE_SELECTED); | ||||
|   else stmp=""; | ||||
|   OPTION(PROGMEM2CHAR(VALUE_250000), stmp.c_str(),PROGMEM2CHAR(VALUE_250000)) | ||||
|   SELECT_END | ||||
|     | ||||
|  // buffer2send+=(PROGMEM2CHAR(BR));  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user