use a constant for sleep delay

This commit is contained in:
Alessandro Mauri 2024-10-24 23:37:52 +02:00
parent a712429466
commit 191292298c

View file

@ -18,6 +18,8 @@ const int MAX_LUMINANCE = 700;
// minimum display brightness in percent
const float MIN_BRIGHTNESS_PERCENT = 0.05;
const int SLEEP_DELAY = 3000;
macro abs(x) { return x < 0 ? -x : x; }
macro clamp(x, l, h) { return max(min(x, h), l); }
@ -155,7 +157,7 @@ fn int main()
io::eprintfn("Error writing brightness: %s", excuse);
}
thread::sleep_ms(3000);
thread::sleep_ms(SLEEP_DELAY);
// read actual brightness to get the user offset
int! actual_brightness;