How to hold the button?
winstonma
Posts: 45
I am looking for the button event that hold the event, so they can send out continuously
for example
button_event[TouchPanel, 1]
{
hold[1, REPEAT]:
{
send_string ....
}
}
this one will send one RS-232 command every 0.1 second. But I want AMX to send the RS-232 command continuously, once I hold the button.
Thanks for the help
for example
button_event[TouchPanel, 1]
{
hold[1, REPEAT]:
{
send_string ....
}
}
this one will send one RS-232 command every 0.1 second. But I want AMX to send the RS-232 command continuously, once I hold the button.
Thanks for the help
0
Comments
This would probably work (I haven't tested it)
However, I would caution against continuously sending serial data. This could quite easily cause system problems due to the master sending data to the port much faster than the port can deal with it. You may want to reevaluate why you need to send data continuously. Can you provide for information on what you're trying to accomplish?
--D
If so, use a timeline to repeat as many times as you want and you'll have control of the speed and numbers of the repeated command.
Why would you want to send a string out continuously or faster then 1 ten of a second? Most RS232 devices can not handle that speed and you could end up locking up the equipment... What are you trying to do, there maybe other ways to handle the problem?
Actually I wonder if I need to do that using IR instead of using RS-232
Bingo! Good idea.
The far end camera can only be controlled in steps, using fecc or xcommand FECCMove.
Jeremy
Although the new Tandberg codec?s have the Start, Stop movement process. The older codecs did not. The trick is timing, going faster with these cameras tends to make the cameras work more irratic. If I remember correctly, the camera moves for a half a second before stoping everytime you issue the string. So you should send the next message just before the camera stops. Although this still makes the camera jerk, it is the best you can do. The newer codec fixed this, so look for the newer commands.
I cannot remember the exact software release it was introduced but if I remember it was E4 and B9
The commands are cammove <camera> <direction>
- Chip
I have not used either system, but just thought this might be an easy solution.
We used to do this, but got too many complaints about jerky camera movement resulting from IR emulation. Now we use "mode" buttons next to the arrow keys with Menu, Near Cam, and Far Cam. That way the program can send appropriate press/release messages for camera movement or IR emulation for menu nav. Modes are bad, I know (see Raskin et. al), but this one seems to work out pretty well.
Jeremy
- Chip
- Chip
BUTTON_EVENT [dvTP,5]
BUTTON_EVENT [dvTP,6]
BUTTON_EVENT [dvTP,7]
BUTTON_EVENT [dvTP,8]
{
PUSH:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Right',$0D"
}
}
}
HOLD [10,REPEAT]:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Right',$0D"
}
}
}
RELEASE:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Right',$0D"
}
}
}
}