Skip to content
Snippets Groups Projects
web.h 2.77 KiB
Newer Older
Malaurie Bernard's avatar
Malaurie Bernard committed

#pragma once

#include <DNSServer.h>

#include <ESPUI.h>              // https://github.com/s00500/ESPUI

#include "common.h"
#include "syringe.h"
#include "syringefilled.h"

#include <EEPROM.h>

#define syringe_pump_length_mm 50




int status_syringe_pump, status_syringe_filled;
Malaurie Bernard's avatar
Malaurie Bernard committed
int millis_label_id;
int test_switch_id;

uint16_t status;

uint16_t activation;

uint16_t etat_button_seringue;

uint16_t button1, button2, button3, button4, button5, button6, button7, button8, button9, button10, button11, button12, button13, button14, button15, button16, button17, button18, button19, button20, button21, button22, button23, button24, button25, button26, button27, button28, button29, button30, button31, button32, button33, button34, button35, button36, button37, button38, button39, button40, button41, button42, button43, button44, button45, button46, button47, button48, button49, button50, button51, button52, button53, button54, button55, button56, button57, button58, button59, button60, button61, button62, button63, button64, button65, button66, button67, button68, button69, button70, button71, button72, button73, button74, button75, button76, button77, button78, button79, button80, button81, button82, button83, button84, button85, button86, button87, button88, button89, button90, button91, button92, button93, button94, button95, button96, button97, button98;
Malaurie Bernard's avatar
Malaurie Bernard committed

uint16_t zero;

uint16_t style_button, style_label, style_switcher, style_slider, style_button2, style_label2, style_slider2;

uint16_t nv_button_ctrl, nv_button;
Malaurie Bernard's avatar
Malaurie Bernard committed

uint16_t slider;

char couleur1[30], couleur2[30], couleur3[30], couleur4[30], couleur5[30], couleur6[30], couleur7[30], couleur8[30], couleur9[30], couleur10[30];

bool test = true;

long unsigned last_time = 0;

// Couleurs à utiliser
const char* couleurs[] = {
    couleur1,
    couleur2,
    couleur3,
    couleur4,
    couleur5,
    couleur6,
    couleur7,
    couleur8,
    couleur9,
    couleur10
};

uint8_t mock_read_uart(void);

void number_callback(Control* sender, int type);
void text_callback(Control* sender, int type);
void slider_callback(Control* sender, int type);
void button_status_callback1(Control* sender, int type, void* param);
void button_callback(Control* sender, int type);
void switch_status_callback2(Control* sender, int value, void* param);
void select_callback(Control* sender, int value);
void other_switch_callback(Control* sender, int value);
void button_seringue(Control* sender, int type);
void general_callback(Control* sender, int type);
void nv_button_ctrl_callback(Control* sender, int type);
void nv_button_callback(Control* sender, int type);
Malaurie Bernard's avatar
Malaurie Bernard committed
void position_choice(Control* sender, int type);
void go_to_zero(Control* sender, int type);





//Methods that are really useful
void on_off_callback(Control* sender, int value, void* param);