Ken Van Hoeylandt 6e437d3288
Location services, kernel Device improvements, de-incubate devices, and more (#691)
**New Features**
  * Added location services with GPS and network-based positioning, approximate or precise accuracy, and live status updates.
  * Added a Location Settings app to view status, control location access and accuracy, and manage GPS devices.
  * Added location choices during device setup and a location toggle in the system menu.
  * Added support for thread stacks in external memory when available, with fallback to existing memory options.

**Improvements**
  * Wi-Fi and Bluetooth enabled states are saved when changed and applied at startup; separate “Enable on boot” switches are no longer shown in their management screens.
  * GPS setup can stop promptly when interrupted.
  * Improved device removal handling during startup and while references are outstanding.
  * Updated several device listings to no longer be marked as incubating.
2026-10-13 23:13:30 +02:00

21 lines
500 B
C++

// SPDX-License-Identifier: GPL-3.0
#include <gps_generic/private/interrupt.h>
#include <tactility/delay.h>
#include <algorithm>
constexpr uint32_t DELAY_SLICE_MILLIS = 50;
bool gps_delay_millis(const std::atomic<bool>& interrupted, uint32_t millis) {
while (millis > 0) {
if (interrupted) {
return false;
}
const uint32_t slice = std::min(millis, DELAY_SLICE_MILLIS);
delay_millis(slice);
millis -= slice;
}
return !interrupted;
}