| 35 | } |
| 36 | |
| 37 | void saveConfig(ThermConfig& cfg) |
| 38 | { |
| 39 | StaticJsonDocument<ConfigJsonBufferSize> doc; |
| 40 | |
| 41 | JsonObject network = doc.createNestedObject(KEY_NETWORK); |
| 42 | network[KEY_SSID] = cfg.StaSSID; |
| 43 | network[KEY_PASS] = cfg.StaPassword; |
| 44 | network[KEY_ENABLE] = cfg.StaEnable; |
| 45 | |
| 46 | Json::saveToFile(doc, THERM_CONFIG_FILE, Json::Pretty); |
| 47 | } |
no test coverage detected