diff --git a/max31865.c b/max31865.c --- a/max31865.c +++ b/max31865.c @@ -61,7 +61,7 @@ void max31865_readtemp(SPI_HandleTypeDef // Assemble data array into one var uint16_t temp_pre = rxdatal[0] | (rxdatah[0]<<8); - if(temp_pre & 0b001 && !set->ignore_tc_error) { + if(temp_pre & 0b001 && !set->val.ignore_tc_error) { status->tc_errno = 1; HAL_Delay(400); // FIXME: remove? status->state_resume = status->state; @@ -87,21 +87,21 @@ void max31865_readtemp(SPI_HandleTypeDef } // Convert to Fahrenheit - if(set->temp_units == TEMP_UNITS_FAHRENHEIT) + if(set->val.temp_units == TEMP_UNITS_FAHRENHEIT) { status->temp = signint * ((temp_pre*100) + status->temp_frac); status->temp = status->temp * 1.8; status->temp += 3200; status->temp_frac = status->temp % 100; status->temp /= 100; - status->temp += set->temp_offset; + status->temp += set->val.temp_offset; } // Use Celsius values else { status->temp = temp_pre * signint; - status->temp += set->temp_offset; + status->temp += set->val.temp_offset; } } }