Options
Volume Up, Down, Bargraph logic. Hold Event Issues

Please find attached module for Pioneer Receiver SC09. The module works but i want to fine tune the Volume Up, Down and bargraph.
1. Volume up and down should be an increment of 1 and based on how much time the user holds, like for 3 seconds, 5 seconds, the increment will be 3, 5 respectively.
2. Volume feedback should be updated on the bargraph without volume going up and down due to the query command.
Any best practice methods for volume.
Comments
User also wants to use the bar graph to set to a high or low value without push or hold by setting a value in the bargraph which will be even faster.
If a stray touch can set the volume to 100%, you are setting the customer up for new speakers and screaming children.
Paul
1. I have put a hold of 3,repeat where i increase/decrease the level by 5 respectively. Now what happens is push goes by 1 and it skips due to hold by 3. The objective of hold was to speed up the volume process.
2. Now based on feedback, i am sending a level command to update the bargraph but there is also a level event also programmed. So volume up will send value for 50 but volume feedback will come for 49 , so level event will set volume back to 49 and so forth.
I tried a timeline which will be killed in release and created in push but its also not working smooth.
what he said ^^^
Just do the Individual 'TAP' volume on the release event, and disregard the Push, and use a flag in the HOLD
[PHP]
BUTTON_EVENT[dvTP,VOL_UP]
{
HOLD[3,REPEAT]:
{
//SET FLAG TRUE
// BIG JUMP CODE HERE
}
RELEASE:
{
IF(!FLAG)
// Little jump code here
}
}
[/PHP]
Where would you turn the flag to false.
Since i am trying to run the level event via a comm module using snapi constants. This level event functions as required.
[PHP]
LEVEL_EVENT[vdvAVR, VOL_LVL]
{
stack_var integer device
device =get_last(vdvAVR)
fnSET_VOLUME(device,itoa(level.value))
}
[/PHP]
Now when i get a feedback i am sending a send_level command back to the Vol_LVL snapi constant. When i increase or decrease via the bargraph, the volume functions because i am only sending the level command via the release.
[PHP]
release:
{
SWITCH(get_last(nChan_BTN))
{
case 29:
{
send_level vdvDevices , vol_lvl,nLevel[1]
}
}
}
[/PHP]
But push or hold is where the bargraph lags due to feedback.