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
fault/http-fault-html.c
- Committer:
- andrewboyson
- Date:
- 2019-04-06
- Revision:
- 83:0d956edd55b7
- Parent:
- 77:4689596a2f3f
File content as of revision 83:0d956edd55b7:
#include <stdio.h>
#include "http.h"
#include "page.h"
#include "page-derived.h"
#include "http-server.h"
#include "fault.h"
void HttpFaultHtml()
{
HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
PageAddHeader(PageSite, "Fault", "settings.css", NULL);
PageAddNav(FAULT_PAGE);
PageAddH1(PageSite, "Fault");
PageAddH2("Last fault");
int faultType = FaultTypeGet();
char text[20];
FaultTypeToString(faultType, sizeof(text), text);
PageAddLabelledText("Fault type", text);
if (faultType)
{
FaultZoneToString(FaultZoneGet(), sizeof(text), text);
PageAddLabelledText("Fault zone" , text);
PageAddLabelledInt ("After point", FaultPointGet());
PageAddInputButton ("Clear fault", "Clear", "/fault", "faultclear");
}
else
{
PageAddInputButton("Test fault" , "Test", "/fault", "faulttest");
}
PageAddEnd();
}