Files
trail-mate/tools/web_simulator/preview_radio.cpp
Trail Mate Dev 7c3fcc31c6 fix(ci): refresh startup contract and format web simulator sources
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.
2026-09-16 15:01:59 +08:00

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