You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
812 B
34 lines
812 B
|
|
#include <stdint.h>
|
|
|
|
#define CHANNELCOUNT 8
|
|
typedef struct {
|
|
int16_t offset; // in adc-counts TODO:float?
|
|
// TODO fir-data
|
|
uint16_t temperature;
|
|
} Sensordata;
|
|
|
|
extern Sensordata sensordata[4];
|
|
extern float ambient_temp;
|
|
|
|
void process_thermocouple_value(int16_t raw_data, uint8_t channel);
|
|
void process_offset_value(int16_t raw_data, uint8_t channel);
|
|
void process_ambient_value(int16_t raw_data);
|
|
|
|
uint16_t get_temperature(uint8_t channel);
|
|
|
|
void filter_average_input(uint8_t channel, float value);
|
|
|
|
uint8_t filter_average_done(uint8_t channel, uint8_t samples);
|
|
|
|
float filter_average_temp_result(uint8_t channel);
|
|
|
|
float filter_average_result(uint8_t channel);
|
|
|
|
float filter_average_noise(uint8_t channel);
|
|
|
|
uint16_t filter_float_to_fixpoint(float f);
|
|
|
|
float filter_voltage_to_temp(float mV);
|
|
|