Auto dark/bright follows the sun at the tablet's own location
Without a light sensor an app may read (the Redmi Pad SE has none), auto is dark while the sun is more than 4° below the horizon (lib/theme/sun.dart), at Android's coarse location, polled and kept across restarts. The tablet's own, not the Orin's GNSS: the tablet has its own GNSS and cellular. Android's dark theme is the last fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,10 +81,15 @@ where the device lets an app read one (`theme/light.dart`: dark at ≤ 15 lux, b
|
||||
held 5 s; Settings shows the reading). **The Redmi Pad SE does not:** its only light sensor,
|
||||
`camera_light_Sensor`, is derived by Xiaomi from the front camera, and `registerListener` refuses
|
||||
apps at every rate (only the system's auto-brightness reads it). Its automatic brightness is not
|
||||
exposed either (`screen_brightness` is the manual level). Other lux sources, if wanted:
|
||||
the Orin's camera (its exposure and gain say how bright the road is; svc-vision would publish
|
||||
it), opening the tablet's front camera ourselves (camera permission, the in-use dot, and the
|
||||
camera's power), or sunrise and sunset from GNSS position and time (no sensor; tunnels ignored).
|
||||
exposed either (`screen_brightness` is the manual level). Google Maps here
|
||||
reads no light sensor either (checked while it navigated in its night colours): it goes by
|
||||
time and place, and tunnels from map data.
|
||||
|
||||
**Sun, done (2026-10-15):** without a light sensor, auto follows the sun at the tablet's own
|
||||
rough location (Android's coarse location, polled; kept across restarts; not the Orin's GNSS,
|
||||
since the tablet has its own GNSS and cellular): dark below −4° (`theme/sun.dart`). Android's
|
||||
dark theme is the last fallback, before any location is known. Tunnels and car parks are not
|
||||
seen; the quick button covers them.
|
||||
What was asked:
|
||||
|
||||
Today the variant is a switch (the Dash's top-right button, and Settings). Wanted:
|
||||
|
||||
Reference in New Issue
Block a user