From e45c4bf0efc1cc6a5f1a76b6004b39861d11d41a Mon Sep 17 00:00:00 2001 From: steel99xl Date: Tue, 6 Aug 2024 15:22:59 -0400 Subject: [PATCH] MinimumBrightness is now closer to representing the % of brightness still to be improved, but currently no good way to get the max sensor brightness wightout saving it during the calibration --- AutomaticBrightness.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 AutomaticBrightness.sh diff --git a/AutomaticBrightness.sh b/AutomaticBrightness.sh old mode 100644 new mode 100755 index defea77..48737ca --- a/AutomaticBrightness.sh +++ b/AutomaticBrightness.sh @@ -118,7 +118,7 @@ do CurrentBrightness=$(cat $BLightPath) # Add MinimumBrighness here to not effect comparison but the outcome - Light=$(( $Light + $MinimumBrightness )) + Light=$(LANG=C printf "%.0f" $(echo "scale=2; $Light + ( $MinimumBrightness * $SensorToDisplayScale ) " | bc )) # Gernate a TempLight value for the screen to be set to # Float math thanks Matthias_Wachter