eeprom read write
This commit is contained in:
@@ -138,6 +138,17 @@ export class Controller {
|
||||
controller.firmWareView.setVersion(versionInfo);
|
||||
})
|
||||
}
|
||||
|
||||
getBackupConfig() {
|
||||
controller.progressview.addIndeterminate("get_backup_config", "Downloading Backup")
|
||||
fetch(PUBLIC_URL + "/get_backup_config")
|
||||
.then(response => response.json())
|
||||
.then(loaded => {
|
||||
controller.progressview.removeProgress("get_config")
|
||||
alert(loaded)
|
||||
})
|
||||
}
|
||||
|
||||
downloadConfig() {
|
||||
controller.progressview.addIndeterminate("get_config", "Downloading Config")
|
||||
fetch(PUBLIC_URL + "/get_config")
|
||||
@@ -166,6 +177,16 @@ export class Controller {
|
||||
//load from remote to be clean
|
||||
controller.downloadConfig()
|
||||
}
|
||||
backupConfig(json: string, statusCallback: (status: string) => void) {
|
||||
controller.progressview.addIndeterminate("backup_config", "Backingup Config")
|
||||
fetch(PUBLIC_URL + "/backup_config", {
|
||||
method: "POST",
|
||||
body: json,
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(text => statusCallback(text))
|
||||
controller.progressview.removeProgress("backup_config")
|
||||
}
|
||||
syncRTCFromBrowser() {
|
||||
controller.progressview.addIndeterminate("write_rtc", "Writing RTC")
|
||||
var value: SetTime = {
|
||||
|
||||
Reference in New Issue
Block a user