Common stuff for all my devices' web server pages: css, login, log, ipv4, ipv6, firmware update, clock, reset info etc.

Dependents:   oldheating gps motorhome heating

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers web-reset-html.c Source File

web-reset-html.c

00001 #include <stdio.h>
00002 
00003 #include "http.h"
00004 #include "web-nav-base.h"
00005 #include "web-add.h"
00006 #include "reset.h"
00007 #include "restart.h"
00008 #include "rsid.h"
00009 
00010 void WebResetHtml()
00011 {
00012     HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
00013     WebAddHeader("Last reset", "settings.css", NULL);
00014     WebAddNav(RESET_PAGE);
00015     WebAddH1("Last reset");
00016     
00017     WebAddH2("Reset source id (RSID)");
00018     
00019     WebAddLabelledLed("Power on"                       , RsidPor );
00020     WebAddLabelledLed("Brown out"                      , RsidBodr);
00021     WebAddLabelledLed("Watchdog"                       , RsidWdtr);
00022     WebAddLabelledLed("Restart (external or semi-host)", RsidExtr);
00023 
00024     WebAddH2("Restart from GUI, PB or fault");
00025     WebAddLabelledText("Cause", RestartGetCauseString());
00026     WebAddLabelledText("Zone" , RestartGetZoneString() );
00027     WebAddLabelledInt ("Point", RestartGetLastPoint()  );
00028     
00029     WebAddH2("Test");
00030     WebAddInputButton("Create hard fault",  "Test",  "/reset", "resettest");
00031     
00032     WebAddH2("Alarm");
00033     WebAddLabelledLed("Alarm", ResetHasAlarm());
00034     WebAddInputButton("Accept alarm", "Accept", "/reset", "resetaccept");
00035     
00036     WebAddEnd();
00037 }
00038