mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
amremote: configure remote depending on device (WeTek/OpenELEC)
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
3149d34abe
commit
6f6af3185a
13
packages/sysutils/amremote/config/openelec.conf
Normal file
13
packages/sysutils/amremote/config/openelec.conf
Normal file
@ -0,0 +1,13 @@
|
||||
# OpenELEC NEC remote
|
||||
|
||||
factory_code = 0x00680001
|
||||
work_mode = 1
|
||||
repeat_enable = 1
|
||||
release_delay = 150
|
||||
debug_enable = 1
|
||||
reg_control = 0xfbe40
|
||||
|
||||
key_begin
|
||||
0xdb 116 ;POWER
|
||||
key_end
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Amlogic NEC remote
|
||||
# WeTek Play NEC remote
|
||||
factory_code = 0xbc430001
|
||||
work_mode = 1
|
||||
repeat_enable = 1
|
||||
@ -7,5 +7,5 @@ debug_enable = 1
|
||||
reg_control = 0xfbe40
|
||||
|
||||
key_begin
|
||||
0xca 116 ;POWER
|
||||
key_end
|
||||
0xca 116 ;POWER
|
||||
key_end
|
@ -24,7 +24,7 @@ PKG_LICENSE="other"
|
||||
PKG_SITE="http://www.amlogic.com"
|
||||
PKG_URL="https://github.com/codesnake/amremote/releases/download/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_DEPENDS_TARGET="toolchain usbutils"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="sysutils/remote"
|
||||
PKG_SHORTDESC="amremote - IR remote configuration utility for Amlogic-based devices"
|
||||
@ -36,6 +36,12 @@ PKG_AUTORECONF="no"
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp remotecfg $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/openelec
|
||||
cp $PKG_DIR/scripts/* $INSTALL/usr/lib/openelec
|
||||
|
||||
mkdir -p $INSTALL/etc/amremote
|
||||
cp $PKG_DIR/config/*.conf $INSTALL/etc/amremote
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
30
packages/sysutils/amremote/scripts/remote-config
Executable file
30
packages/sysutils/amremote/scripts/remote-config
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
# check the Security chip if we run on a WeTek device
|
||||
lsusb -d 096e:0006 &> /dev/null
|
||||
LSUSB_RET=$?
|
||||
|
||||
if [ -f /storage/.config/remote.conf ]; then
|
||||
/usr/bin/remotecfg /storage/.config/remote.conf
|
||||
elif [ "$LSUSB_RET" = 0 ]; then
|
||||
/usr/bin/remotecfg /etc/amremote/wetek.conf
|
||||
elif [ "$LSUSB_RET" = 1 ]; then
|
||||
/usr/bin/remotecfg /etc/amremote/openelec.conf
|
||||
fi
|
@ -3,7 +3,7 @@ Description=Amlogic IR remote support
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c '[ -f /storage/.config/remote.conf ] && /usr/bin/remotecfg /storage/.config/remote.conf || /usr/bin/remotecfg /etc/remote.conf'
|
||||
ExecStart=/usr/lib/openelec/remote-config
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
|
Loading…
x
Reference in New Issue
Block a user