From 30b4a2a3a9e61507ae228bfce33deff0410f07ef Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Wed, 5 Aug 2015 13:39:59 +0200 Subject: [PATCH] changed definitions for eeprom regs --- pt100/main.c | 4 ++-- pt100/main.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pt100/main.c b/pt100/main.c index 29b2b92..791f638 100644 --- a/pt100/main.c +++ b/pt100/main.c @@ -32,8 +32,8 @@ void read_calib() { for(uint8_t i=0; i< 8; i++) { calib_settings.offset_res[i] = eeprom_read(i); } - calib_settings.gain_res = eeprom_read(8); - calib_settings.current = eeprom_read(9); + calib_settings.nominal_offset = eeprom_read(8); + calib_settings.gain_current = eeprom_read(10)<<16 | eeprom_read(9); } /****************** diff --git a/pt100/main.h b/pt100/main.h index 88506c2..e2a63a2 100644 --- a/pt100/main.h +++ b/pt100/main.h @@ -52,7 +52,7 @@ extern volatile uint16_t time; extern volatile uint8_t measurement_active; struct calib_t { - uint16_t offset_res[8]; - uint16_t gain_res; - uint16_t current; + uint16_t offset_res[8]; //precise offset in Milliohm minus nominal value + uint16_t nominal_offset; //approximate offset resistor, in Ohm, 100 as default + uint32_t gain_current; //gain times current in nA (about 20E6) }; -- 2.43.0