EEPROM reset-Function added to WebUI
This commit is contained in:
		| @@ -264,24 +264,7 @@ | |||||||
|         <h3>Wartung</h3> |         <h3>Wartung</h3> | ||||||
|         <hr> |         <hr> | ||||||
|         <p> |         <p> | ||||||
|         <form action="\post.htm" method="POST" class="form-horizontal"> |         <h4>Ölvorrat</h4> | ||||||
|           <div class="form-group"> |  | ||||||
|             <label for="purgepulse" class="control-label col-xs-5">Entlüftung Impulse</label> |  | ||||||
|             <div class="col-xs-7"> |  | ||||||
|               <div class="input-group"> |  | ||||||
|                 <input id="purgepulse" name="purgepulse" value="%BLEEDING_PULSES%" type="text" class="form-control"> |  | ||||||
|                 <div class="input-group-addon"></div> |  | ||||||
|               </div> |  | ||||||
|             </div> |  | ||||||
|           </div> |  | ||||||
|           <div class="form-group row"> |  | ||||||
|             <div class="col-xs-offset-5 col-xs-7"> |  | ||||||
|               <button name="maintsave" type="submit" class="btn btn-primary">Speichern</button> |  | ||||||
|             </div> |  | ||||||
|           </div> |  | ||||||
|         </form> |  | ||||||
|         </p> |  | ||||||
|         <p> |  | ||||||
|         <form action="\post.htm" method="POST" class="form-horizontal"> |         <form action="\post.htm" method="POST" class="form-horizontal"> | ||||||
|           <div class="form-group"> |           <div class="form-group"> | ||||||
|             <label for="tankremain_maint" class="control-label col-xs-5">Tankinhalt verbleibend</label> |             <label for="tankremain_maint" class="control-label col-xs-5">Tankinhalt verbleibend</label> | ||||||
| @@ -302,6 +285,53 @@ | |||||||
|           </div> |           </div> | ||||||
|         </form> |         </form> | ||||||
|         </p> |         </p> | ||||||
|  |         <hr> | ||||||
|  |         <p> | ||||||
|  |         <h4>Entlüftung</h4> | ||||||
|  |         <form action="\post.htm" method="POST" class="form-horizontal"> | ||||||
|  |           <div class="form-group"> | ||||||
|  |             <label for="purgepulse" class="control-label col-xs-5">Entlüftung Dosierung</label> | ||||||
|  |             <div class="col-xs-7"> | ||||||
|  |               <div class="input-group"> | ||||||
|  |                 <input id="purgepulse" name="purgepulse" value="%BLEEDING_PULSES%" type="text" class="form-control"> | ||||||
|  |                 <div class="input-group-addon">Pulse</div> | ||||||
|  |               </div> | ||||||
|  |             </div> | ||||||
|  |           </div> | ||||||
|  |           <div class="form-group row"> | ||||||
|  |             <div class="col-xs-offset-5 col-xs-7"> | ||||||
|  |               <button name="maintsave" type="submit" class="btn btn-primary">Speichern</button> | ||||||
|  |             </div> | ||||||
|  |           </div> | ||||||
|  |         </form> | ||||||
|  |         </p> | ||||||
|  |         <hr> | ||||||
|  |         <h4>EEPROM</h4> | ||||||
|  |         <p> | ||||||
|  |         <form action="\post.htm" method="POST" class="form-horizontal"> | ||||||
|  |           <div class="form-group"> | ||||||
|  |             <div class="col-xs-offset-5 col-xs-7"> | ||||||
|  |               <div class="form-check"> | ||||||
|  |                 <input class="form-check-input" type="checkbox" value="" id="reset_ee_cfg_check"> | ||||||
|  |                 <label class="form-check-label" for="reset_ee_cfg_check"> | ||||||
|  |                   JA, EEPROM-Bereich "CFG" formatieren und Konfiguration zurück setzen | ||||||
|  |                 </label> | ||||||
|  |               </div> | ||||||
|  |               <div class="form-check"> | ||||||
|  |                 <input class="form-check-input" type="checkbox" value="" id="reset_ee_pds_check"> | ||||||
|  |                 <label class="form-check-label" for="reset_ee_pds_check"> | ||||||
|  |                   JA, EEPROM-Bereich "PDS" formatieren und Betriebsdaten zurück setzen | ||||||
|  |                 </label> | ||||||
|  |               </div> | ||||||
|  |             </div> | ||||||
|  |           </div> | ||||||
|  |           <div class="form-group row"> | ||||||
|  |             <div class="col-xs-offset-5 col-xs-7"> | ||||||
|  |               <button name="reset_ee_btn" type="submit" class="btn btn-primary">EEPROM formatieren</button> | ||||||
|  |             </div> | ||||||
|  |           </div> | ||||||
|  |         </form> | ||||||
|  |         </p> | ||||||
|       </div> |       </div> | ||||||
|       <!-- Div Tab Maintenance --> |       <!-- Div Tab Maintenance --> | ||||||
|       <!-- Div Tank Settings--> |       <!-- Div Tank Settings--> | ||||||
|   | |||||||
| @@ -19,15 +19,6 @@ void InitEEPROM() | |||||||
|   { |   { | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|   GetConfig_EEPROM(); |  | ||||||
|  |  | ||||||
|   if (LubeConfig.EEPROM_Version != eeVersion) |  | ||||||
|   { |  | ||||||
|     FormatConfig_EEPROM(); |  | ||||||
|     globals.systemStatus = sysStat_Error; |  | ||||||
|     MaintainDTC(DTC_EEPROM_VERSION_BAD, true); |  | ||||||
|     return; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void EEPROM_Process() | void EEPROM_Process() | ||||||
| @@ -85,6 +76,7 @@ void GetConfig_EEPROM() | |||||||
|   if (Checksum_EEPROM((uint8_t *)&LubeConfig, sizeof(LubeConfig)) != checksum) |   if (Checksum_EEPROM((uint8_t *)&LubeConfig, sizeof(LubeConfig)) != checksum) | ||||||
|   { |   { | ||||||
|     MaintainDTC(DTC_EEPROM_CFG_BAD, DTC_CRITICAL, true); |     MaintainDTC(DTC_EEPROM_CFG_BAD, DTC_CRITICAL, true); | ||||||
|  |     FormatConfig_EEPROM(); | ||||||
|   } |   } | ||||||
|   LubeConfig.checksum = checksum; |   LubeConfig.checksum = checksum; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -308,6 +308,15 @@ void WebserverPOST_Callback(AsyncWebServerRequest *request) | |||||||
|       PersistenceData.tankRemain_µl = LubeConfig.tankCapacity_ml * 1000; |       PersistenceData.tankRemain_µl = LubeConfig.tankCapacity_ml * 1000; | ||||||
|       globals.requestEEAction = EE_PDS_SAVE; |       globals.requestEEAction = EE_PDS_SAVE; | ||||||
|     } |     } | ||||||
|  |     if (p->name() == "reset_ee_cfg") | ||||||
|  |     { | ||||||
|  |       globals.requestEEAction = EE_CFG_FORMAT; | ||||||
|  |     } | ||||||
|  |     if (p->name() == "reset_ee_pds") | ||||||
|  |     { | ||||||
|  |       globals.requestEEAction = EE_PDS_FORMAT; | ||||||
|  |     } | ||||||
|  |     | ||||||
|     // end: POST Form Maintenance |     // end: POST Form Maintenance | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user