diff --git a/max31855.c b/max31855.c --- a/max31855.c +++ b/max31855.c @@ -31,7 +31,7 @@ void max31855_readtemp(SPI_HandleTypeDef status.temp = 0; status.temp_frac = 0; } */ - 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; @@ -72,21 +72,21 @@ void max31855_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; } } }