@@ -144,6 +144,7 @@ int main(void)
// Read temperature and update global temp vars
int32_t temp = 0;
uint8_t temp_frac = 0;
uint8_t state_resume = 0;
void update_temp() {
// Assert CS
@@ -160,6 +161,7 @@ void update_temp() {
state = STATE_TC_ERROR;
}
else if(temp_pre & 0b0000000000000001 && !ignore_tc_error) {
state_resume = state;
temp = 0;
temp_frac = 0;
@@ -167,7 +169,10 @@ void update_temp() {
else
{
if(state == STATE_TC_ERROR)
state = STATE_IDLE;
state = state_resume;
ssd1306_clearscreen();
uint8_t sign = temp >> 15;// top bit is sign
Status change: