![Very Happy :D](./images/smilies/icon_biggrin.gif)
trax wrote:Hibs, if you want an offset the displayed temperature use this function instead of the original:
Code: Select all
// display the temperature void display_temp(void) { // if we have something new to display / if the temperature has changed inside the RTC chip if( !bv(bRTC_TempChg,BAPP1) ) { return; // we don't, so get outa here } // clear all but dots in the corners display_clear(1); /* // code from my "Warm Tube v2" project temp_MSB = temp_MSB & 0b01111111; // make it positive uint8_t fract = (temp_LSB >> 6); fract = fract * 25; display_digits[0] = (temp_MSB / 10); // [D]D,D_ display_digits[1] = (temp_MSB % 10); // D[D],D_ display_digits[2] = (fract / 10); // DD,[D]_ display_digits[3] = (fract % 10); // DD,D[D] */ char temperature[10]; sprintf(temperature,"%d^", (int8_t)RTC[TEMP_MSB] -2 ); // ^ - is a degree symbol :) HIBS INFO: Here you put offset you want, currently it is -2 // finally send the text to display text_to_display(temperature,1,0); bc(bRTC_TempChg,BAPP1); // clear and wait for another second-change // we need to falsify other changes, so that the next function in line executes at least once bs(bRTC_MinChg,BAPP1); bs(bRTC_SecChg,BAPP1); // next one... return; }