Newer
Older
#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>
//Create tabs
uint16_t configurations, new_syringe, features;
//***ABOVE***//
int status_syringe_pump;
Malaurie Bernard
committed
uint16_t stop_syringe_pump;
Malaurie Bernard
committed
int status_syringe_filled_placement;
uint16_t syringe_filled_placement;
Malaurie Bernard
committed
int status_limit_switch;
uint16_t calibration, fast_backward, fast_forward, slow_backward, slow_forward, confirm_initialisation;
Malaurie Bernard
committed
uint16_t volume_exchange_mL_label, volume_exchange_mL, exchange_throughtput_uL_per_sec_label, exchange_throughtput_uL_per_sec, label_push_pull_choice, switch_push_pull_choice, start_exchange;
uint16_t label_remaining_volume_mL, label_remaining_time_sec;
uint16_t remaining_volume_mL, remaining_time_sec;
uint16_t syringe_selection, syringe_ref, syringe_brand, syringe_volume_mL, syringe_diameter_mm, initial_volume_mL_label, initial_volume_mL, choose_syringe;
float syringe_volume_mL_value, syringe_diameter_mm_value;
std::string syringe_volume_mL_string, syringe_diameter_mm_string;
uint16_t name_new_syringe, name_new_syringe_label, internal_diameter_mm_new_syringe, internal_diameter_mm_new_syringe_label, total_volume_mL_new_syringe, total_volume_mL_new_syringe_label, add_syringe, add_syringe_label;
Malaurie Bernard
committed
String name_new_syringe_value, total_volume_mL_new_syringe_value, internal_diameter_mm_new_syringe_value;
Malaurie Bernard
committed
uint16_t syringe_pump_length_mm_value;
uint16_t lead_screw_pitch_mm, clockwise_equals_push_label, clockwise_equals_push, microstep_configuration, motor_steps;
Malaurie Bernard
committed
String select_value;
char couleur1[30], couleur2[30], couleur3[30], couleur4[30], couleur5[30], couleur6[30], couleur7[30], couleur8[30], couleur9[30], couleur10[30];
long unsigned last_time = 0;
// Couleurs à utiliser
const char* couleurs[] = {
couleur1,
couleur2,
couleur3,
couleur4,
couleur5,
couleur6,
couleur7,
couleur8,
couleur9,
couleur10
};
/************CALLBACK_METHODS****************/
//GENERAL CALLBACKS//
void number_callback(Control* sender, int type);
//SPECIFIC CALLBACKS//
//***ABOVE***//
Malaurie Bernard
committed
void stop_syringe_pump_callback (Control* sender, int value, void* param);
void syringe_filled_placement_callback (Control* sender, int value, void* param);
void calibration_callback(Control* sender, int type);
Malaurie Bernard
committed
void fast_backward_callback (Control *sender, int type);
void fast_forward_callback (Control *sender, int type);
void slow_backward_callback (Control *sender, int type);
void slow_forward_callback (Control *sender, int type);
void confirm_initialisation_callback (Control *sender, int type);
void volume_exchange_mL_callback (Control* sender, int value, void* param);
void exchange_throughtput_uL_per_sec_callback (Control* sender, int value, void* param);
void switch_push_pull_choice_callback (Control* sender, int value, void* param);
void remaining_volume_mL_callback (Control* sender, int value, void* param);
void remaining_time_sec_callback (Control* sender, int value, void* param);
Malaurie Bernard
committed
void start_exchange_callback (Control* sender, int value, void* param);
void choose_syringe_callback (Control* sender, int value, void* param);
void initial_volume_mL_callback (Control* sender, int value, void* param);
Malaurie Bernard
committed
void name_new_syringe_callback(Control* sender, int type);
Malaurie Bernard
committed
void total_volume_mL_new_syringe_callback(Control* sender, int type);
void internal_diameter_mm_new_syringe_callback(Control* sender, int type);
void add_syringe_callback (Control* sender, int value, void* param);
//features : Configurations avancées
void syringe_pump_length_mm_callback(Control* sender, int type);
void clockwise_equals_push_callback(Control* sender, int value);
void microstep_configuration_callback(Control* sender, int type);
void motor_steps_callback(Control* sender, int type);
//
void syringe_selection_callback(Control* sender, int value);
//ON_OFF METHODS
void syringe_pump_on_off();
void style (uint16_t id, int style);
Malaurie Bernard
committed
void set_initial_style();
void set_theme(int theme);
void style_syringe_pump_on();
void style_syringe_pump_off();
void style_syringe_filled_placement_on();
void style_syringe_filled_placement_off();
Malaurie Bernard
committed
void style_initialisation(int style_choice);
void style_exchange_configuration(int style_choice);
//OTHER_METHODS
void select_syringe_maj(uint16_t tab);
Malaurie Bernard
committed
void number_max_min(int min, int max, uint16_t control);
void serial_print (String name, Control* sender);