parent
11cfa7b305
commit
65dbe57efd
@ -6,7 +6,8 @@ Package lean: [coolsnowwolf/lede](https://github.com/coolsnowwolf/lede).<br/>
|
||||
Package ntlf9t: [jsda/packages2](https://github.com/jsda/packages2).<br/>
|
||||
luci-app-serverchan source: [tty228/luci-app-serverchan](https://github.com/tty228/luci-app-serverchan).<br/>
|
||||
OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).<br/>
|
||||
luci-app-k3screenctrl source: [Hill-98/luci-app-k3screenctrl](https://github.com/Hill-98/luci-app-k3screenctrl).<br/>
|
||||
luci-app-k3screenctrl source: [lwz322/luci-app-k3screenctrl](https://github.com/lwz322/luci-app-k3screenctrl).<br/>
|
||||
phicomm-k3screenctrl source: [lwz322/k3screenctrl\_build](https://github.com/lwz322/k3screenctrl_build).<br/>
|
||||
luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).<br/>
|
||||
luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).<br/>
|
||||
Package Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).<br/>
|
||||
|
||||
@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI Support for k3screenctrl
|
||||
LUCI_DESCRIPTION:=LuCI Support for k3screenctrl.
|
||||
LUCI_DEPENDS:=+phicomm-k3screenctrl +@BUSYBOX_CONFIG_ARPING
|
||||
LUCI_DEPENDS:=+phicomm-k3screenctrl
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_NAME:=luci-app-k3screenctrl
|
||||
|
||||
@ -20,16 +20,35 @@ o.default = 10
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "refresh_time", translate("Refresh interval :"), translate("Screen data refresh interval."))
|
||||
o:value("1",translate("1 s"))
|
||||
o:value("2",translate("2 s"))
|
||||
o:value("5",translate("5 s"))
|
||||
o:value("10",translate("10 s"))
|
||||
o.default = 2
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "update_time", translate("Weather update interval :"))
|
||||
o:value("0",translate("off"))
|
||||
o:value("3600",translate("1h"))
|
||||
o:value("14400",translate("4h"))
|
||||
o:value("43200",translate("12h"))
|
||||
o.default = 0
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(Value, "key", translate("Private Key :"),
|
||||
translate("Input private key, visit: https://docs.seniverse.com/api/start/key.html"))
|
||||
|
||||
o = s:option(Flag, "city_checkip", translate("Check city from ip"), translate("Check city from local ip."))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Value, "city", translate("City :"),
|
||||
translate("For more information, visit: https://docs.seniverse.com/api/start/common.html#地点-location"))
|
||||
--o.rmempty = false
|
||||
|
||||
o = s:option(Flag, "psk_hide", translate("Hide Wireless password"))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Flag, "cputemp", translate("Display CPU temperature"), translate("The first page shows the CPU temperature."))
|
||||
o = s:option(Flag, "showmore", translate("Display More Info"), translate("The first page shows more information including: CPU temprature, Load, RAM useage, uptime, etc."))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Button,"test_print",translate("Test"),translate("Execute k3screenctrl -t and return the result"))
|
||||
@ -52,8 +71,10 @@ luci.sys.net.mac_hints(function(t,a)
|
||||
end)
|
||||
|
||||
o = s:option(Value,"name",translate("Hostname"))
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue,"icon",translate("Icon"))
|
||||
o.rmempty = false
|
||||
o:value("0",translate("Auto"))
|
||||
o:value("1",translate("OnePlus"))
|
||||
o:value("2","360")
|
||||
|
||||
@ -20,16 +20,31 @@ msgid "Refresh interval :"
|
||||
msgstr "刷新间隔:"
|
||||
|
||||
msgid "Screen data refresh interval."
|
||||
msgstr "屏幕数据刷新间隔"
|
||||
msgstr "屏幕数据刷新间隔。"
|
||||
|
||||
msgid "Check city from ip"
|
||||
msgstr "IP定位"
|
||||
|
||||
msgid "Check city from local ip."
|
||||
msgstr "通过IP得到城市信息。"
|
||||
|
||||
msgid "City :"
|
||||
msgstr "城市:"
|
||||
|
||||
msgid "Weather update interval :"
|
||||
msgstr "天气更新时间间隔:"
|
||||
|
||||
msgid "Private Key :"
|
||||
msgstr "私钥:"
|
||||
|
||||
msgid "Hide Wireless password"
|
||||
msgstr "隐藏无线密码"
|
||||
|
||||
msgid "Display CPU temperature"
|
||||
msgstr "显示 CPU 温度"
|
||||
msgid "Display More Info"
|
||||
msgstr "显示更多信息"
|
||||
|
||||
msgid "The first page shows the CPU temperature."
|
||||
msgstr "第一页显示 CPU 温度"
|
||||
msgid "The first page shows more information including: CPU temprature, Load, RAM useage, uptime, etc."
|
||||
msgstr "第一页显示更多信息,包括:CPU温度、负载,内存用量,运行时间等。"
|
||||
|
||||
msgid "Test"
|
||||
msgstr "测试"
|
||||
@ -55,6 +70,9 @@ msgstr "设备"
|
||||
msgid "Icon"
|
||||
msgstr "图标"
|
||||
|
||||
msgid "1 s"
|
||||
msgstr "1 秒"
|
||||
|
||||
msgid "2 s"
|
||||
msgstr "2 秒"
|
||||
|
||||
@ -83,7 +101,19 @@ msgid "30 m"
|
||||
msgstr "30 分"
|
||||
|
||||
msgid "60 m"
|
||||
msgstr "60 分"
|
||||
msgid "60 分"
|
||||
|
||||
msgid "off"
|
||||
msgid "关闭"
|
||||
|
||||
msgid "1 h"
|
||||
msgid "1 小时"
|
||||
|
||||
msgid "4 h"
|
||||
msgid "4 小时"
|
||||
|
||||
msgid "12 h"
|
||||
msgid "12 小时"
|
||||
|
||||
msgid "Auto"
|
||||
msgstr "自动"
|
||||
@ -107,7 +137,7 @@ msgid "Hasee"
|
||||
msgstr "神舟"
|
||||
|
||||
msgid "Honor"
|
||||
msgstr "荣耀"
|
||||
msgid "荣耀"
|
||||
|
||||
msgid "HP"
|
||||
msgstr "惠普"
|
||||
@ -119,7 +149,7 @@ msgid "Apple"
|
||||
msgstr "苹果"
|
||||
|
||||
msgid "Lenovo"
|
||||
msgstr "联想"
|
||||
msgid "联想"
|
||||
|
||||
msgid "LeEco"
|
||||
msgstr "乐视"
|
||||
@ -152,4 +182,4 @@ msgid "XiaoMi"
|
||||
msgstr "小米"
|
||||
|
||||
msgid "ZTE"
|
||||
msgstr "中兴"
|
||||
msgstr "中兴"
|
||||
@ -5,10 +5,8 @@ PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
#PKG_SOURCE_URL:=https://github.com/Hill-98/k3screenctrl
|
||||
#PKG_SOURCE_VERSION:=3257090decf7de1e70ef6e7bf28d0491ffe78854
|
||||
PKG_SOURCE_URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl.git
|
||||
PKG_SOURCE_VERSION:=81c1cb35022082262c28e87b5b0d7141d0d2432b
|
||||
PKG_SOURCE_URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
PKG_SOURCE_VERSION:=7b81497bb3719d7f3a741307417e39a4505d309d
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
@ -22,9 +20,9 @@ TARGET_CFLAGS+= -D_GNU_SOURCE
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=@TARGET_bcm53xx_generic_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash +bc +jq +@BUSYBOX_CONFIG_ARP +@BUSYBOX_CONFIG_OD
|
||||
DEPENDS:=@TARGET_bcm53xx_generic_DEVICE_phicomm-k3 +@KERNEL_DEVMEM +@BUSYBOX_CONFIG_ARPING +bc +bash +curl +coreutils +coreutils-od +jq
|
||||
TITLE:=LCD screen controller on PHICOMM K3
|
||||
URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl
|
||||
URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
@ -32,32 +30,17 @@ define Package/$(PKG_NAME)/description
|
||||
the LCD screen on PHICOMM K3 to display some stats.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
if [ -f /etc/uci-defaults/k3screenctrl ]; then
|
||||
( . /etc/uci-defaults/k3screenctrl ) && \
|
||||
rm -f /etc/uci-defaults/k3screenctrl
|
||||
fi
|
||||
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/lib/k3screenctrl
|
||||
$(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/lib/k3screenctrl $(1)/lib/k3screenctrl/oui
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/update_oui.sh $(1)/lib/k3screenctrl/oui/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
|
||||
$(INSTALL_DATA) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
|
||||
$(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
|
||||
$(INSTALL_BIN) ./files/k3screenctrl.uci $(1)/etc/uci-defaults/k3screenctrl
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||
$(INSTALL_CONF) $(CURDIR)/files/k3screenctrl.config $(1)/etc/config/k3screenctrl
|
||||
$(INSTALL_BIN) $(CURDIR)/files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
|
||||
config general
|
||||
option screen_time '10'
|
||||
option refresh_time '5'
|
||||
option pawd_hide '1'
|
||||
option disp_cputemp '1'
|
||||
option psk_hide '1'
|
||||
option cputemp '1'
|
||||
option city_checkip '1'
|
||||
option update_time '3600'
|
||||
|
||||
|
||||
option screen_time '30'
|
||||
option refresh_time '2'
|
||||
option pawd_hide '1'
|
||||
option psk_hide '1'
|
||||
option showmore '1'
|
||||
option city_checkip '0'
|
||||
option update_time '0'
|
||||
@ -7,21 +7,13 @@ SCRIPTS_BASE=/lib/k3screenctrl/
|
||||
TEMP_DIR=/tmp/k3screenctrl
|
||||
|
||||
start() {
|
||||
[ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
|
||||
mkdir -p $TEMP_DIR
|
||||
mkdir -p $TEMP_DIR/device_speed
|
||||
[ -z "$(iptables --list | grep K3_SEREEN_U)" ] && iptables -N K3_SEREEN_U
|
||||
[ -z "$(iptables --list | grep K3_SEREEN_D)" ] && iptables -N K3_SEREEN_D
|
||||
$SCRIPTS_BASE"device_custom.sh"
|
||||
$SCRIPTS_BASE"device_online.sh" &
|
||||
# [ -z "$(grep "/lib/k3screenctrl/device_online.sh" /etc/crontabs/root)" ] && echo "*/5 * * * * /lib/k3screenctrl/device_online.sh" >> /etc/crontabs/root
|
||||
m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
|
||||
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 2 ] && d=2
|
||||
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 1 ] && d=1
|
||||
/usr/bin/k3screenctrl -m $m -d $d &
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall k3screenctrl device_online.sh
|
||||
kill -9 $(pidof device_online.sh) >/dev/null 2>&1
|
||||
rm -rf $TEMP_DIR
|
||||
}
|
||||
killall k3screenctrl
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user