mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 23:46:37 +02:00
Added favicon.ico to find the right tab in the browser more fast; Keep it simple (not as configuration option)
This commit is contained in:
parent
821ab2601e
commit
e25dce1573
3 changed files with 206 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "app.h"
|
||||
|
||||
#include "favicon.h"
|
||||
#include "html/h/index_html.h"
|
||||
#include "html/h/setup_html.h"
|
||||
#include "html/h/hoymiles_html.h"
|
||||
|
@ -53,6 +54,7 @@ void app::setup(uint32_t timeout) {
|
|||
Main::setup(timeout);
|
||||
|
||||
mWeb->on("/", std::bind(&app::showIndex, this));
|
||||
mWeb->on("/favicon.ico", std::bind(&app::showFavicon, this));
|
||||
mWeb->on("/setup", std::bind(&app::showSetup, this));
|
||||
mWeb->on("/save", std::bind(&app::showSave, this));
|
||||
mWeb->on("/erase", std::bind(&app::showErase, this));
|
||||
|
@ -671,6 +673,15 @@ void app::showHoymiles(void) {
|
|||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void app::showFavicon(void) {
|
||||
DPRINTLN(DBG_VERBOSE, F("app::showFavicon"));
|
||||
static const char favicon_type[] PROGMEM = "image/x-icon";
|
||||
static const char favicon_content[] PROGMEM = FAVICON_PANEL_16;
|
||||
mWeb->send_P(200, favicon_type, favicon_content, sizeof(favicon_content));
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void app::showLiveData(void) {
|
||||
DPRINTLN(DBG_VERBOSE, F("app::showLiveData"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue