Files
roro9stack/lib/wifi/src/channel_occupancy.h
T
twislaandClaude Opus 5.5 4cd6a63498 M1 step 6: Wi-Fi Tools from ordinary scans
- lib/wifi (host-tested): channel occupancy (neighbour spill, signal
  weighting, quietest of 1/6/11) and a signal tracker (history, lost
  detection, click interval)
- WifiService: scan results carry BSSID, channel and security; a scan
  can target one channel for quick tracker refreshes; endListScans()
  turns the radio back off when Wi-Fi is disabled
- Wi-Fi Tools App: networks nearby, channel occupancy bars, signal
  tracker with clicks (m to mute)
- M1 plan: Monitoring-mode views and captures deferred

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-02 16:33:11 +02:00

22 lines
619 B
C++

#pragma once
#include <array>
#include <vector>
namespace roro {
struct ChannelSighting {
int channel;
int rssi;
};
// How crowded each 2.4 GHz Wi-Fi channel (1..13) is, from the access points a scan saw. A 20 MHz
// network spills onto the channels up to two away, less the further it is; a strong signal
// counts more than a faint one. Index 0 is unused.
std::array<float, 14> channelLoad(const std::vector<ChannelSighting>& sightings);
// The least crowded of the non-overlapping channels 1, 6 and 11 (the lowest on a tie).
int quietestChannel(const std::array<float, 14>& load);
} // namespace roro