Skip to content
Snippets Groups Projects
Commit 89e23b51 authored by Malaurie Bernard's avatar Malaurie Bernard
Browse files

Adding a method to choose the theme (so we can create several of them later)

parent 97799ac5
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
......@@ -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//
......
......@@ -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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment