Subversion Repositories HomeAutomation

Rev

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

Rev 814 Rev 835
Line 231... Line 231...
231
        *len = 6;
231
        *len = 6;
232
        previousBit = 0;
232
        previousBit = 0;
233
    }
233
    }
234
           
234
           
235
    //let's start with the adress bits..
235
    //let's start with the adress bits..
236
    tempcommand = proto->data&(0b00111111);
236
    tempcommand = proto->data&(0x3F);
237
    tempadress = (proto->data>>8)&(0b00011111);
237
    tempadress = (proto->data>>8)&(0x1F);
238
    //TODO: This requires massive cleanup
238
    //TODO: This requires massive cleanup
239
   
239
   
240
    //tempdata = ((((uint16_t)(proto->data)&(0x3F)) + ((uint16_t)((proto->data>>8)&(0x1F))<<6)))<<5;
240
    //tempdata = ((((uint16_t)(proto->data)&(0x3F)) + ((uint16_t)((proto->data>>8)&(0x1F))<<6)))<<5;
241
   
241
   
242
    tempdata = (uint16_t)tempcommand + ((uint16_t)tempadress<<6);
242
    tempdata = (uint16_t)tempcommand + ((uint16_t)tempadress<<6);