MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / indirectReverseOperation

Function indirectReverseOperation

Source/Core/CtrlrUtilities.cpp:720–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720int indirectReverseOperation(const int inValue, const CtrlrSysExFormulaToken op)
721{
722 BigInteger i(0);
723 if (op == LSB7bitValue)
724 {
725 i.setBitRangeAsInt(0, 7, inValue);
726 return (i.getBitRangeAsInt(0, 7));
727 }
728 else if (op == MSB7bitValue)
729 {
730 i.setBitRangeAsInt(7, 7, inValue);
731 return (i.getBitRangeAsInt(0, 14));
732 }
733 else if (op == LSB4bitValue)
734 {
735 i.setBitRangeAsInt(0, 4, inValue);
736 return (i.getBitRangeAsInt(0, 8));
737 }
738 else if (op == MSB4bitValue)
739 {
740 i.setBitRangeAsInt(4, 4, inValue);
741 return (i.getBitRangeAsInt(0, 8));
742 }
743 else
744 {
745 return (inValue);
746 }
747}
748
749const BigInteger getValueAsBigInteger(const int inValue, const CtrlrSysExFormulaToken op)
750{

Callers 3

getValueFromSysExDataMethod · 0.85
getValueMethod · 0.85
getValueFromSysExDataMethod · 0.85

Calls 2

setBitRangeAsIntMethod · 0.45
getBitRangeAsIntMethod · 0.45

Tested by

no test coverage detected