Skip to content

Commit

Permalink
Merge branch 'hotfix/rainbow-0.1.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
paper42 committed Jul 24, 2023
2 parents 997f8dc + b72d5cb commit bf2e2af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hardware/rainbow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=rainbow
PKG_VERSION:=0.1.3
PKG_VERSION:=0.1.4
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/rainbow-ng.git
PKG_MIRROR_HASH:=15f4fef3f6b1c5c48d61e6828783e9767cfe5fe3a4a06017227c6a095be0244d
PKG_MIRROR_HASH:=503450304dab939340a5f167aae5c605b4511f2da990cc5a71e221ffda00ce3a
PKG_SOURCE_VERSION:=v$(PKG_VERSION)

PKG_MAINTAINER:=CZ.NIC <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions hardware/rainbow/patches/compatibility.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
brightness_level="$(brightness)"
# The full range is only 0-100 but that is good enough so we don't adjust
# more. We just loose the precision on Omnia but who can see it anyway.
- echo "$((brightness_level * 100 / 255))" > "$SYSFS/brightness"
+ [ ! -e "$SYSFS/brightness" ] || echo "$((brightness_level * 100 / 255))" > "$SYSFS/brightness"
- echo "$(((brightness_level * 100 + 127) / 255))" > "$SYSFS/brightness"
+ [ ! -e "$SYSFS/brightness" ] || echo "$(((brightness_level * 100 + 127) / 255))" > "$SYSFS/brightness"
}

set_led() {
@@ -96,14 +96,14 @@ set_led() {
sysfs="$(led2sysfs "$led")"

# We have to disable trigger first to make sure that changes are correctly
# applied and not modified by this in the meantime.
- echo "none" > "$sysfs/trigger"
Expand Down

0 comments on commit bf2e2af

Please sign in to comment.