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.
18 lines
612 B
C++
18 lines
612 B
C++
#include "platform/ui/lora_runtime.h"
|
|
namespace platform::ui::lora
|
|
{
|
|
static bool acquired = false;
|
|
bool acquire()
|
|
{
|
|
acquired = true;
|
|
return true;
|
|
}
|
|
bool is_online() { return acquired; }
|
|
bool configure_receive(float, const ReceiveConfig&) { return acquired; }
|
|
bool transmit_packet(const uint8_t*, std::size_t) { return false; }
|
|
// A quiet simulated receiver must never invent OBSERVED/CONFIRMED evidence.
|
|
bool poll_received_packet(uint8_t*, std::size_t, ReceivedPacket*) { return false; }
|
|
float read_instant_rssi() { return -120.f; }
|
|
void release() { acquired = false; }
|
|
} // namespace platform::ui::lora
|