Processing of hex values returned in 2-way feedback
Posted: Sun Dec 03, 2017 4:11 am
Just to recap...
Post 2016 Pioneer AVR's have adopted the Onkyo protocol. For volume control and feedback, this protocol uses a two byte value with an ASCII representation of a hex value.
For example, the VSX-932 has a volume range of 00 to C8, equivalent to 0 to 200 in decimal. Except that 'C8' is not \xC8, but rather 2 ASCII bytes: character 'C' and character '8'. For example, setting a volume to a decimal value of 171 requires sending 'MVLAB'. This makes it unbelievably difficult to manage a volume slider and respond to 2-way volume feedback.
Feature request...
Given the market share Onkyo now has with Pioneer AV, I'd like to recommend a new feature: a function that converts ASCII representation of Hex to Decimal and Decimal to ASCII representation of Hex to facilitate interacting with Onkyo-Pioneer on volume control. I acknowledge this would only help a subset of clients, but it is so easy to implement in a lower level language as opposed to establishing 200 custom actions.
For sending the slider value to the device, I would suggest it would be used when setting a label and that the result be truncated to 2 least significant bytes if the decimal number is > 255. The function could be [H]. Example: setting label 'label-A' to [H][decimal_number_variable] would return 'AB' if the decimal number was 171.
For using the 2-way feedback to adjust the volume slider, I would suggest it would be used when setting a number. The function could be [D]. Example: setting number 'number-1' to [D][ascii_representation_of_hex_variable] would return '171' if the variable's ascii representation was 'AB'.
Post 2016 Pioneer AVR's have adopted the Onkyo protocol. For volume control and feedback, this protocol uses a two byte value with an ASCII representation of a hex value.
For example, the VSX-932 has a volume range of 00 to C8, equivalent to 0 to 200 in decimal. Except that 'C8' is not \xC8, but rather 2 ASCII bytes: character 'C' and character '8'. For example, setting a volume to a decimal value of 171 requires sending 'MVLAB'. This makes it unbelievably difficult to manage a volume slider and respond to 2-way volume feedback.
Feature request...
Given the market share Onkyo now has with Pioneer AV, I'd like to recommend a new feature: a function that converts ASCII representation of Hex to Decimal and Decimal to ASCII representation of Hex to facilitate interacting with Onkyo-Pioneer on volume control. I acknowledge this would only help a subset of clients, but it is so easy to implement in a lower level language as opposed to establishing 200 custom actions.
For sending the slider value to the device, I would suggest it would be used when setting a label and that the result be truncated to 2 least significant bytes if the decimal number is > 255. The function could be [H]. Example: setting label 'label-A' to [H][decimal_number_variable] would return 'AB' if the decimal number was 171.
For using the 2-way feedback to adjust the volume slider, I would suggest it would be used when setting a number. The function could be [D]. Example: setting number 'number-1' to [D][ascii_representation_of_hex_variable] would return '171' if the variable's ascii representation was 'AB'.