Changeset 295 in pacpusframework for branches/0.0.x/include/Pacpus/PacpusTools
- Timestamp:
- Mar 31, 2014, 3:24:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.0.x/include/Pacpus/PacpusTools/BinaryDecoder.h
r76 r295 766 766 } else { 767 767 *result = 0; 768 return true;768 return false; 769 769 } 770 770 } else { 771 771 // ok data is stored at most in 1 byte 772 772 unsigned char c; 773 c = data[startBit>>3]; // >>3 <=> div 8 774 c >>= (8-((startBit & 0x07)+1)); // &0x07 <=> modulo 8 775 *result = c & getMask8( length ); 773 774 c = data[startBit>>3]; // >>3 <=> div 8 775 //c >>= (8-((startBit & 0x07)+1)); // &0x07 <=> modulo 8 776 c >>= startBit & 0x07 - (length - 1); // &0x07 <=> modulo 8 777 *result = c & getMask8( length ); 776 778 777 779 return true; … … 798 800 } else { 799 801 *result = 0; 800 return true;802 return false; 801 803 } 802 804 }
Note:
See TracChangeset
for help on using the changeset viewer.