| Line 1... | 
        Line 1... | 
      
      
        | 1 | 
        /**** IR Mrakomer 4 ****/ | 
        1 | 
        /**** IR Mrakomer 4 ****/ | 
      
      
        | 2 | 
        #define VERSION "4.1" | 
        2 | 
        #define VERSION "4.1" | 
      
      
        | 3 | 
        #define ID "$Id: irmrak4.c 4248 2015-10-19 18:09:23Z kakl $" | 
        3 | 
        #define ID "$Id: irmrak4.c 4681 2016-08-16 14:39:27Z kakl $" | 
      
      
        | 4 | 
          | 
        4 | 
          | 
      
      
        | 5 | 
        #include "irmrak4.h" | 
        5 | 
        #include "irmrak4.h" | 
      
      
        | 6 | 
          | 
        6 | 
          | 
      
      
        | 7 | 
        #bit CREN = 0x18.4      // USART registers | 
        7 | 
        #bit CREN = 0x18.4      // USART registers | 
      
      
        | 8 | 
        #bit SPEN = 0x18.7 | 
        8 | 
        #bit SPEN = 0x18.7 | 
      
      
        | Line 281... | 
        Line 281... | 
      
      
        | 281 | 
                 touch_write_byte(0xCC); | 
        281 | 
                 touch_write_byte(0xCC); | 
      
      
        | 282 | 
                 touch_write_byte(0xBE); | 
        282 | 
                 touch_write_byte(0xBE); | 
      
      
        | 283 | 
                 for(n=0;n<9;n++) SN[n]=touch_read_byte(); | 
        283 | 
                 for(n=0;n<9;n++) SN[n]=touch_read_byte(); | 
      
      
        | 284 | 
                 tLSB=SN[0]; | 
        284 | 
                 tLSB=SN[0]; | 
      
      
        | 285 | 
                 tMSB=SN[1]; | 
        285 | 
                 tMSB=SN[1]; | 
      
      
        | - | 
          | 
        286 | 
                 /*KAKL!!! | 
      
      
        | 286 | 
                 if ((SN[8]==TM_check_CRC(SN,8))&&(SN[7]==0x10)) // Check CRC and family code to prevent O's error | 
        287 | 
                 if ((SN[8]==TM_check_CRC(SN,8))&&(SN[7]==0x10)) // Check CRC and family code to prevent O's error | 
      
      
        | 287 | 
                 { | 
        288 | 
                 { | 
      
      
        | 288 | 
                    tTouch=make16(tMSB,tLSB);  | 
        289 | 
                    tTouch=make16(tMSB,tLSB);  | 
      
      
        | 289 | 
                    tTouch=tTouch*6+tTouch/4; // 1bit = 0,0625gradC recalculate to 1/100gradC | 
        290 | 
                    tTouch=tTouch*6+tTouch/4; // 1bit = 0,0625gradC recalculate to 1/100gradC | 
      
      
        | 290 | 
                 } | 
        291 | 
                 } | 
      
      
        | 291 | 
                 else | 
        292 | 
                 else | 
      
      
        | 292 | 
                 { | 
        293 | 
                 { | 
      
      
        | 293 | 
                    tTouch=-27315; | 
        294 | 
                    tTouch=-27315; | 
      
      
        | 294 | 
                 }    | 
        295 | 
                 }    | 
      
      
        | - | 
          | 
        296 | 
                 */ | 
      
      
        | - | 
          | 
        297 | 
                 tTouch=make16(tMSB,tLSB);  | 
      
      
        | - | 
          | 
        298 | 
                 tTouch=tTouch*6+tTouch/4; // 1bit = 0,0625gradC recalculate to 1/100gradC | 
      
      
        | - | 
          | 
        299 | 
          | 
      
      
        | 295 | 
              } | 
        300 | 
              } | 
      
      
        | 296 | 
            | 
        301 | 
            | 
      
      
        | 297 | 
        /* | 
        302 | 
        /* | 
      
      
        | 298 | 
              if(automatic)        // Solve automatic mode | 
        303 | 
              if(automatic)        // Solve automatic mode | 
      
      
        | 299 | 
              { | 
        304 | 
              { |