I am using a slider to set the subwoofer level on a Denon A/V receiver via the TCPClient library. The slider range is 38 to 62. The command is PSSWL. (I do convert that 38 to 62 range to a more ‘user-friendly’ -24 to 24 in my HR, but am not including that here for the sake of simplicity.).
Say the slider is set to 40. If I click to move it to 60, the command sent is PSSWL 60, and the Denon returns PSSWL 60. No problem.
Say the slider is set to 40. If I slowly drag the slider to 60, the commands sent are, for instance, PSSWL 42, PSSWL 46, PSSWL 50, PSSWL 54, PSSWL 60. The Denon returns PSSWL 60. No problem.
Say the slider is set to 40. If I quickly drag the slider to 60, the commands sent are, for instance, PSSWL 46, PSSWL 60. The Denon returns PSSWL 46. I would expect it to return PSSWL 60, but it is as if the timing is off and it does not see it.
The way I am counteracting this is to save PSSWL 60 (per my last example) to a variable, and when the Denon returns the PSSWL 46 value, compare it to that variable and resend the “PSSWL 60” command since they do not agree. This is a successful workaround, but wanted to raise this issue in case there is something I am doing wrong or if there is something we can do about adding a delay to the slider. (I tried originally using a setTimeout, but it says it cannot find that function).