Subversion Repositories HomeAutomation

Rev

Rev 1141 | Rev 1143 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1141 Rev 1142
Line 40... Line 40...
40
        TmpV = (uint16_t) (byte1<<8) + byte2;
40
        TmpV = (uint16_t) (byte1<<8) + byte2;
41
        txMsg.Data[3]= byte1;
41
        txMsg.Data[3]= byte1;
42
        txMsg.Data[4]= byte2;
42
        txMsg.Data[4]= byte2;
43
       
43
       
44
        TmpV = TmpV << 4;
44
        TmpV = TmpV << 4;
45
        TmpV = TmpV/25;
45
        TmpV = TmpV*0.04;
46
        TmpV= TmpV <<4;
46
        TmpV= TmpV <<4;
47
        TmpV = TmpV-0x2800;
47
        TmpV = TmpV-0x2800;
48
        txMsg.Data[2]= (uint8_t) (TmpV & 0x00FF);
48
        txMsg.Data[2]= (uint8_t) (TmpV & 0x00FF);
49
        txMsg.Data[1]= (uint8_t) ((TmpV >> 8) & 0x00FF);
49
        txMsg.Data[1]= (uint8_t) ((TmpV >> 8) & 0x00FF);
50
        StdCan_Put(&txMsg);
50
        StdCan_Put(&txMsg);