Author Topic: Continuous volume up/down  (Read 4711 times)

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Continuous volume up/down
« on: January 01, 2013, 01:29:21 pm »
Ok, I'm not sure if this is a touch screen topic or a global cache topic but I'll start here.

I'm trying to create a continuous volume up/down IR signal. In other words when I press and hold the volume up button the volume continues to increase until its released same as the factory control.

Seems simple and I've found documentation relative to the global cache but none I can seem to implement this functionality in Elve. Has someone done this? If so can you share.

Thanks

Bart
Bart
So tell me again why I have a right half of my brain?

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Continuous volume up/down
« Reply #1 on: January 01, 2013, 04:21:04 pm »
In Builder. Property offset button

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Continuous volume up/down
« Reply #2 on: January 01, 2013, 04:28:20 pm »
In Builder. The button has a "Pressed and Held" event.

This I know. However it doesn't drive a repeating/continuous IR signal that drives the volume up until I release.  It just increments it once.  From what I've read I need to be able to set up a repeating signal followed by a "stopIR" signal upon release. Can't figure out how to do either.

Have you gotten the press and hold to work for an IR event like volume where the press and hold drives the volume in a continuous manner?

Bart
So tell me again why I have a right half of my brain?

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Continuous volume up/down
« Reply #3 on: January 02, 2013, 05:57:03 am »
Hmm, maybe that wasn't for IR. I'll have to double check.

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Continuous volume up/down
« Reply #4 on: January 08, 2013, 08:54:59 pm »
Anything? Anyone?



Sent from my Nexus 7 using Tapatalk 2

Bart
So tell me again why I have a right half of my brain?

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Continuous volume up/down
« Reply #5 on: January 09, 2013, 02:08:21 pm »
Continuous IR commands are possible with the iTach, thus it should play nicely with Elve. To execute a smooth IR  for volume I would check that the repeat count in the IR library for your volume commands is set to an appropriate number. You may have to play around with its values to what works best for your particular device. Then tie the IR blast command to the press and held event for the button.
The iTach will reset its current repeat count for a particular IR command if the identical command is received while it is executing the current command. When the button is released the remaining repeats will finish, so you want to keep the repeat count low. Alternately, for better control, you could issue a stopIR command on the button up event to discard any repeats pending transmission.

I haven't tested this but I would:
1.) Setup an IR command called 'volume_Up_Continuous'
2.) Set the repeat count to something ridiculous, like 1000.
3.) Tie the continuous ir code to the press and held event
4.) Program a stop IR command on the button up event.

Stop IR is something iTach supports, but I didn't see it in the device property list. To send it use the http driver and hard code the request. See the iTach API for more on formatting.
« Last Edit: January 09, 2013, 02:11:25 pm by iostream212 »
I always wanted to be somebody. In retrospect, I think I should have been more specific.

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Continuous volume up/down
« Reply #6 on: January 09, 2013, 10:55:05 pm »
Ok so I tried to follow my own advise and ran into some issues.
Issue #1: You can't assign a repeat count to an ir command (feature request?).
Issue #2:The press and held event doesn't halt its script execution upon button release (feature request?).
Issue #3: Stopir can be issued better with the ir driver as a raw command.

I have played around with it and got it working perfectly. With Elve current features I do not see an easier way.
1.) Add button to touch screen and add a 'send raw command' to the press and held event.
2.) Turn on device logging for your iTach.
3.) Edit the ir device in the infrared library to have a high send count, like 200.
4.) Test the ir command and get the send code from the log. Mine looked something like this:
Code: [Select]
sendir,1:3,1,40000,200,1,96,23,48,24,48,24,24,23,24,23,48,24,24,23,24,23,48,24,24,23,24,23,24,23,24,8005.) Paste your ir code in the raw command text box from step 1.
6.) Add a raw command event to the button's pressed up event
7.) type this in the raw command text box:
Code: [Select]
stopir, 1:31:3 is the module address and ir port number. Change your number as appropriate. It is the same as the number after sendir from your above pasted code.
Make sure to change the send count back to a normal number range in step 3.

Seems like a pain, but not too terrible since I can see using this only for volume up/down.
I always wanted to be somebody. In retrospect, I think I should have been more specific.

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Continuous volume up/down
« Reply #7 on: January 12, 2013, 05:50:34 pm »
I really appreciate the info. I'll put it to work and let you know.

Thank you

Sent from my Nexus 7 using Tapatalk 2

Bart
So tell me again why I have a right half of my brain?

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Continuous volume up/down
« Reply #8 on: January 14, 2013, 07:08:29 pm »
Ok I have a new issue. The "pressed and held" event doesn't seem to be working at all. I did what you recommended (thank you) but it didn't work.  The system wasn't logging anything but the "pressed and release" event. So I tried the original event that was working in the "pressed" event and it didn't work or log an event when used in the "pressed and held" event.  The raw command does log correctly if I use it in the "pressed" event.

What the heck......
Bart
So tell me again why I have a right half of my brain?

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Continuous volume up/down
« Reply #9 on: January 14, 2013, 09:10:58 pm »
Was this in the lite viewer and or the mobile app? I am beginning to think that the press and held event is only supported by the full viewer. I was using the full viewer when I got this working originally. However I, as well, have not been able to duplicate press and held functionality in the mobile app.

Sent from my A500 using Tapatalk HD
I always wanted to be somebody. In retrospect, I think I should have been more specific.

Walken100

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Continuous volume up/down
« Reply #10 on: January 14, 2013, 09:54:05 pm »
Android app. Feels like a bug.  I'll try it on my desk top to be sure it works.

Update: It does work on my desktop so looks like an app bug.


Sent from my Nexus 7 using Tapatalk 2

« Last Edit: January 15, 2013, 05:17:13 pm by Walken100 »
Bart
So tell me again why I have a right half of my brain?

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Continuous volume up/down
« Reply #11 on: January 14, 2013, 10:59:48 pm »
Can any apple users confirm if press and held works on the mobile app?

Sent from my A500 using Tapatalk HD
I always wanted to be somebody. In retrospect, I think I should have been more specific.