/*
 * voltage_analyzer.h
 *
 * Created: 14.5.2014 21:45:00
 *  Author: Zdenda
 */ 


#ifndef VOLTAGE_ANALYZER_H_
#define VOLTAGE_ANALYZER_H_

#include <stdlib.h>
#include <stdio.h>
#include <math.h>


int16_t filtr3( int16_t sample);

void distorsion_rms( int16_t sample, int16_t after_filter, int16_t * distorsion, int16_t * line_rms);

enum {DIST_FAULT = 1, UPPER_LIMIT_FAULT = 2, LOWER_LIMIT_FAULT = 4 };

unsigned char kontrola( int16_t distorsion, int16_t rms);


#endif /* VOLTAGE_ANALYZER_H_ */