diff --git a/web.cpp b/web.cpp index 2dd4974d627c4cafdca41f6f6004dc077cec45d2..9f9665f6631cd1ed0ccfe58dbcdbfe942284ad00 100644 --- a/web.cpp +++ b/web.cpp @@ -5,7 +5,7 @@ void web_setup () { - + set_theme(1); @@ -408,6 +408,39 @@ void style (uint16_t id, int style) } +void set_style() +{ + //Mettre le style initial +} + +void set_theme(int theme) +{ + if (theme ==1) + { + //Creation des différents styles + + //Les verts pour la mise en mrche de la seringue + sprintf(couleur1, "background-color: #%06X;", (unsigned int) 0xb2dbbf); + sprintf(couleur2, "background-color: #%06X;", (unsigned int) 0x5a8668); + + //Le rouge pour la seringue a l'arrêt + sprintf(couleur3, "background-color: #%06X;", (unsigned int) 0xc97064); + sprintf(couleur4, "background-color: #%06X;", (unsigned int) 0x762419); + + //Les marrons pour la config des seringues + sprintf(couleur5, "background-color: #%06X;", (unsigned int) 0xce9f6f); + sprintf(couleur6, "background-color: #%06X;", (unsigned int) 0x926448); + + //Pas utilisé pour le moment + sprintf(couleur7, "background-color: #%06X;", (unsigned int) 0x0a7477); + sprintf(couleur8, "background-color: #%06X;", (unsigned int) 0x052a38); + sprintf(couleur9, "background-color: #%06X;", (unsigned int) 0x044365); + sprintf(couleur10, "background-color: #%06X;", (unsigned int) 0x58b8c3); + + + + } +} //WEB_LOOP// diff --git a/web.h b/web.h index 29034c36fedaa2c40a9063e86853be1fd0364998..b96833cc737786e65ee519e0da7235611f5fa688 100644 --- a/web.h +++ b/web.h @@ -91,7 +91,7 @@ void status_position_choice_callback (Control* sender, int value); void add_syringe_callback (Control* sender, int value, void* param); - +void remaining_volume_callback (Control* sender, int value, void* param); //onoff methods @@ -109,4 +109,6 @@ void select_syringe_maj(uint16_t tab); void style (uint16_t id, int style); +void set_style(); +void set_theme(int theme);