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
Diff: firmware/web-firmware-ajax.c
- Revision:
- 103:91194cc19bbb
diff -r ce6770cb3488 -r 91194cc19bbb firmware/web-firmware-ajax.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/firmware/web-firmware-ajax.c Sat Apr 27 09:25:28 2019 +0000 @@ -0,0 +1,41 @@ +#include <stdio.h> + +#include "http.h" +#include "web-base.h" +#include "firmware.h" +#include "web-firmware.h" + +void WebFirmwareAjax() +{ + //Header + HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); + + //Upload status + if (FirmwareSentLength == FirmwareFileLength) + { + HttpAddText("Length ok\r\n"); + } + else + { + HttpAddText("Length error\r\n"); + HttpAddF (" sent %6d\r\n", FirmwareSentLength); + HttpAddF (" rcvd %6d\r\n", FirmwareRcvdLength); + HttpAddF (" file %6d\r\n", FirmwareFileLength); + } + + //Save status + if (FirmwareFailed) + { + HttpAddText("Save failed - see log"); + } + else + { + HttpAddText("Saved ok"); + } + + //Delimiter + HttpAddChar('\f'); + + //New directory list + WebFirmwareListSemihostFiles(); +}