mirror of
				https://github.com/s00500/ESPUI.git
				synced 2025-10-31 17:33:24 +00:00 
			
		
		
		
	feat: implemented clearGraph function
This commit is contained in:
		| @@ -1031,7 +1031,26 @@ void ESPUIClass::updateTime(uint16_t id, int clientId) | ||||
|     updateControl(id, clientId); | ||||
| } | ||||
|  | ||||
| void ESPUIClass::clearGraph(uint16_t id, int clientId) { } | ||||
| void ESPUIClass::clearGraph(uint16_t id, int clientId) {  | ||||
|     do // once | ||||
|     { | ||||
|         Control* control = getControl(id); | ||||
|         if (!control) | ||||
|         { | ||||
|             break; | ||||
|         } | ||||
|  | ||||
|         DynamicJsonDocument document(jsonUpdateDocumentSize); | ||||
|         JsonObject root = document.to<JsonObject>(); | ||||
|  | ||||
|         root[F("type")] = 109; | ||||
|         root[F("value")] = 0; | ||||
|         root[F("id")] = control->id; | ||||
|  | ||||
|         SendJsonDocToWebSocket(document, clientId); | ||||
|  | ||||
|     } while(false); | ||||
|  } | ||||
|  | ||||
| void ESPUIClass::addGraphPoint(uint16_t id, int nValue, int clientId) | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 leokeba
					leokeba