This commit is contained in:
2025-03-24 14:22:05 +01:00
parent 5125b0a984
commit c0a14d76cc
10 changed files with 6983 additions and 6959 deletions

View File

@ -46,7 +46,7 @@
#define TABLENUMBER 114
#define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long)
#define NROFTAELEMENTS 12
#define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased
#define NROFADELEMENTS 293 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased
#define TAEQUIDISTANCE 100 //dK
#define ADEQUIDISTANCE 64 //dig
#define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE

View File

@ -218,6 +218,15 @@ uint32_t HTPA_calcPowerTwo(uint8_t power) {
return 2 * HTPA_calcPowerTwo(power / 2) * HTPA_calcPowerTwo(power / 2);
}
/*uint32_t HTPA_calcPowerTwo(uint8_t power) {
if (power == 0)
return 1;
else if ((power % 2) == 0)
return HTPA_calcPowerTwo(power / 2) * HTPA_calcPowerTwo(power / 2);
else
return 2 * HTPA_calcPowerTwo(power / 2) * HTPA_calcPowerTwo(power / 2);
}*/
void HTPA_ReadSensor(uint32_t dataArray[32]) {
uint8_t config = 0;
@ -281,7 +290,7 @@ void HTPA_ReadSensor(uint32_t dataArray[32]) {
*/
int64_t vij_pixc_and_pcscaleval;
int64_t vdd_calc_steps;
uint8_t table_row, table_col;
uint16_t table_row, table_col;
int32_t vx, vy, ydist, dta;
// 11.1 ambient temperature:
@ -293,7 +302,7 @@ void HTPA_ReadSensor(uint32_t dataArray[32]) {
table_col = i;
}
}
dta = ambient_temperature - XTATemps[1];
dta = ambient_temperature - XTATemps[table_col];
ydist = (int32_t)ADEQUIDISTANCE;
for(int i=0; i<32; i++) {