protected function getNibbleWithControl($nibbleType, $nibble)
    {
        $dec = bindec($nibble);

        if ($dec > 9) {
            $dec -= 9;
            $control = self::NIBBLE_CONTROL[$nibbleType][1];
        } else {
            $control = self::NIBBLE_CONTROL[$nibbleType][0];
        }

        return $control.sprintf('%04d', decbin($dec));
    }
protected function getNibbleWithControl($nibbleType, $nibble)
    {
        $dec = bindec($nibble);

        if ($dec > 9) {
            $dec -= 9;
            $control = self::NIBBLE_CONTROL[$nibbleType][1];
        } else {
            $control = self::NIBBLE_CONTROL[$nibbleType][0];
        }

        return $control.sprintf('%04d', decbin($dec));
    }
protected function getNibbleWithControl ( $ nibbleType , $ nibble ) { $ dec = bindec ( $ nibble ) ; if ( $ dec > 9 ) { $ dec -= 9 ; $ control = self :: NIBBLE_CONTROL [ $ nibbleType ] [ 1 ] ; } else { $ control = self :: NIBBLE_CONTROL [ $ nibbleType ] [ 0 ] ; } return $ control . sprintf ( '%04d' , decbin ( $ dec ) ) ; }
Get the nibble value with the control prefixed.

If the nibble dec is <= 9, the control X equals 001011 and Y equals 001110, otherwise if the nibble dec is > 9
the control for X or Y equals 011010. Additionally, if the dec value of the nibble is > 9, then the nibble value
must be subtracted by 9 before the final value is constructed.

@param string $nibbleType Either X or Y
@param string $nibble

@return string
Get the nibble value with the control prefixed .