-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IR long press support. #95
Conversation
…improves maintainance, readability etc.).
#define APPLE_REMOTE_MENU 0x77E14047 | ||
#define APPLE_REMOTE_PLAY_DOWN 0x77E17A47 | ||
#define APPLE_REMOTE_PLAY_UP 0x77E12047 | ||
#define APPLE_REMOTE_UP 0x77E1D055 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/brackendawson/Appleceiver/blob/357a0a16013d9e35f1119530399aba55b7030bab/Appleceiver.ino#L43-L55 suggests it should be possible to support multiple Apple remotes using correct bit mask.
EDIT: I checked both codes for APPLE_REMOTE_UP, the old one and the one you set here, the mask trick works:
For v
being 0x77E1D055
(new code) or 0x77E1D047
(old code):
(v & 0x00007F00) >> 8 = 0x50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree. But I would like to open another PR for this.
@exislow you have to base your PR on develop branch I think |
Instead of changing the source code with logic expressions I would rather prefer to see the codes read from a config file, this will enable other IR remotes then Apple only. |
I open the path to that in #97 Basically read IR value is passed to a function which returns a code for the button pressed, we can extend it to match more remotes more easily. |
Sure. But a proper code style refactoring should be done for sure. |
To be able to adjust, e.g. volume more convenient remote button long press is now supported. If you press, for instance, UP for a long time, the volume will rise until you release the button on the IR.
Also code refactoring for
aurora.ino
was done to be able to maintaine and read the code better.