diff --git a/flash_all.sh b/flash_all.sh new file mode 100755 index 0000000..b76ba5b --- /dev/null +++ b/flash_all.sh @@ -0,0 +1,11 @@ +#!/bin/bash -e + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +cd $DIR + +fastboot format userdata +./flash_bootloader.sh +./flash_kernel.sh +./flash_system.sh + +fastboot continue diff --git a/userspace/usr/comma/brightnessd.py b/userspace/usr/comma/brightnessd.py index 1b7c72c..fee3197 100755 --- a/userspace/usr/comma/brightnessd.py +++ b/userspace/usr/comma/brightnessd.py @@ -34,7 +34,7 @@ if __name__ == "__main__": last_off_ts = time.monotonic() # calculate new max - uptime_hours = (time.monotonic() - last_off_ts) / 60*60 + uptime_hours = (time.monotonic() - last_off_ts) / (60*60) clipped_perc = MAX_PERCENT - (HOURLY_PERC_DECREASE*uptime_hours) clipped_perc = int(max(min(clipped_perc, MAX_PERCENT), MIN_PERCENT))