#ifndef __STATUS_H__
#define __STATUS_H__

#include "stdint.h"

#define ALPHA 0.389

#define NOTIFCHAUD 	0b00000001
#define NOTTECHAUT	0b00000010

#define ERRCUVEHAU	0b00000001
#define ERRARETLON	0b00000010
#define ERRRESEBAS	0b00000100
#define ERRTRFROID	0b00001000
#define ERRPHPASOK	0b00010000
#define ERRSELNOK	0b00100000
#define ERROSMOLAT	0b01000000


uint8_t readTempAir();
uint8_t readTempEau();
uint8_t readPH();
uint8_t readSalinity();
uint8_t readNiveau();

uint8_t ReadNotif();
uint8_t ReadErreur();


/*
 * valeur de retour = (temp -15°C)  * 10
 * On peu codé de +15°C a +40.5°C avec precistion de  0.1°C
 */
uint8_t convertADC_tmp(uint16_t val);

int moyen(int tmp,int* oldtmp);

#endif
