#pragma once

#include "Arduino.h"
#include "board.h"
#include <Adafruit_ADS1X15.h>

#define MEASUREMENTINTERVAL 10 //ms
#define DACINTERVAL         10 //ms
#define DACSTEP             8 //ticks

enum measureMode
{
  mA20,
  mA200,
  mA1000,
  mAuto,
  mSetup,
  mLast
};

void initMeasure( void );
void handleMeasure (void );

measureMode getMeasureMode( void );

measureMode getMeasureMode( void );

double getMin( void);
double getMax(void);
double getRms(void);
uint8_t getBar(void);
float getValue(void);

bool getErrorState(void);
bool getOkState(void);
bool getOpenState(void);
