mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-09-21 03:04:21 +00:00
Match the shell initialization call inside run() so its failure guard does not break the network-independence contract. Preserve initialization ordering and blocking-network checks. Apply clang-format 14 to the web preview sources. Verified all 2107 CI-scoped source files and seven positive/negative startup contract cases.
29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
#include "platform/ui/device_runtime.h"
|
|
#include "platform/ui/lora_runtime.h"
|
|
#include "platform/ui/time_runtime.h"
|
|
#include "platform/ui/tracker_runtime.h"
|
|
#include "platform/ui/wifi_runtime.h"
|
|
#include <ctime>
|
|
namespace platform::ui::device
|
|
{
|
|
MemoryStats memory_stats() { return {512 * 1024, 260 * 1024, 8 * 1024 * 1024, 6 * 1024 * 1024, true}; }
|
|
bool supports_screen_brightness() { return true; }
|
|
bool supports_keyboard_backlight() { return true; }
|
|
static uint8_t brightness = 200, keys = 0;
|
|
uint8_t screen_brightness() { return brightness; }
|
|
uint8_t screen_brightness_max() { return 255; }
|
|
void set_screen_brightness(uint8_t value) { brightness = value; }
|
|
uint8_t keyboard_backlight() { return keys; }
|
|
uint8_t keyboard_backlight_max() { return 255; }
|
|
void set_keyboard_backlight(uint8_t value) { keys = value; }
|
|
} // namespace platform::ui::device
|
|
namespace platform::ui::lora
|
|
{
|
|
bool is_supported() { return true; }
|
|
} // namespace platform::ui::lora
|
|
namespace platform::ui::gps
|
|
{
|
|
bool is_enabled() { return true; }
|
|
bool is_powered() { return true; }
|
|
} // namespace platform::ui::gps
|