Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Revision 115:24cb6e84ddd6, committed 2019-05-03
- Comitter:
- andrewboyson
- Date:
- Fri May 03 10:36:38 2019 +0000
- Parent:
- 114:900e33dfa460
- Child:
- 116:e2f4bf715af7
- Commit message:
- Changed firmware reset to call the new restart routine rather than directly calling the semihost reset.
Changed in this revision
--- a/base/firmware/web-firmware-html.c Thu May 02 17:40:20 2019 +0000
+++ b/base/firmware/web-firmware-html.c Fri May 03 10:36:38 2019 +0000
@@ -28,9 +28,4 @@
WebAddH2("Restart the device");
HttpAddText("<div><button onclick='restart();'>Restart</button></div>\r\n");
HttpAddText("<code id='restartresult'></code>\r\n");
-
- WebAddH2("Reset password");
- HttpAddText("<div><button onclick='resetPassword();'>Reset</button></div>\r\n");
-
- WebAddEnd();
}
--- a/base/firmware/web-firmware-query.c Thu May 02 17:40:20 2019 +0000
+++ b/base/firmware/web-firmware-query.c Fri May 03 10:36:38 2019 +0000
@@ -1,5 +1,5 @@
#include "http.h"
-#include "semihost.h"
+#include "restart.h"
#include "web-pages-base.h"
void WebFirmwareQuery(char* pQuery)
@@ -11,8 +11,6 @@
pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
int value = HttpQueryValueAsInt(pValue);
- if (HttpSameStr(pName, "restart" )) SemihostReset();
-
- if (HttpSameStr(pName, "resetpassword")) WebLoginForceNewPassword();
+ if (HttpSameStr(pName, "restart")) Restart();
}
}
--- a/base/firmware/web-firmware-script.inc Thu May 02 17:40:20 2019 +0000
+++ b/base/firmware/web-firmware-script.inc Fri May 03 10:36:38 2019 +0000
@@ -85,15 +85,4 @@
"{\n"
" xhrRestartStart();\n"
"}\n"
-"function resetPassword()\n"
-"{\n"
-" xhr = new XMLHttpRequest();\n"
-"\n"
-" xhr.onload = xhrRestartOnLoad;\n"
-"\n"
-" xhr.open('GET', '/firmware-ajax?resetpassword='); //Defaults to async=true\n"
-" xhr.send();\n"
-" \n"
-" location.href = '/firmware';\n"
-"}\n"
""
\ No newline at end of file
--- a/base/firmware/web-firmware-script.js Thu May 02 17:40:20 2019 +0000
+++ b/base/firmware/web-firmware-script.js Fri May 03 10:36:38 2019 +0000
@@ -85,14 +85,4 @@
{
xhrRestartStart();
}
-function resetPassword()
-{
- xhr = new XMLHttpRequest();
- xhr.onload = xhrRestartOnLoad;
-
- xhr.open('GET', '/firmware-ajax?resetpassword='); //Defaults to async=true
- xhr.send();
-
- location.href = '/firmware';
-}