handshake-capture-c6: SPI bus lock, SD v1.0.2 diagnostics, MUST_DO review
- SPI_Bus_Lock: serialize LCD + SD on shared SPI; pause display during SD - SD_Init after WiFi scan; SD_IsReady gating; serial [SD]/[CAP] diagnostics - MUST_DO_IMPROVEMENTS.md full firmware review backlog; README link - Bump HANDSHAKE_FIRMWARE_VERSION to 1.0.2 (header) Made-with: Cursor
This commit is contained in:
@@ -10,9 +10,17 @@ void WiFiScanner_Refresh(void) {
|
||||
scanNetworksSortedByRSSI();
|
||||
|
||||
int count = 0;
|
||||
int captureable = 0;
|
||||
int offband_secure = 0;
|
||||
for (int i = 0; i < MAX_NETWORKS; i++) {
|
||||
if (networks[i].ssid.isEmpty()) break;
|
||||
count++;
|
||||
if (isCaptureable(i)) {
|
||||
captureable++;
|
||||
} else if (isSupportedCaptureAuth(networks[i].encryption) &&
|
||||
!isSupportedCaptureChannel(networks[i].ch)) {
|
||||
offband_secure++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count <= 0) {
|
||||
@@ -22,20 +30,33 @@ void WiFiScanner_Refresh(void) {
|
||||
}
|
||||
|
||||
static char status_text[64];
|
||||
snprintf(status_text, sizeof(status_text), "%d networks", count);
|
||||
if (offband_secure > 0) {
|
||||
snprintf(status_text, sizeof(status_text), "%d nets, %d tgt, %d off-band",
|
||||
count, captureable, offband_secure);
|
||||
} else {
|
||||
snprintf(status_text, sizeof(status_text), "%d nets, %d tgt", count, captureable);
|
||||
}
|
||||
Ui_SetWifiStatus(status_text);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
char line[48];
|
||||
snprintf(line, sizeof(line), "%02d. %s ch%d",
|
||||
const char* suffix = "";
|
||||
if (isSupportedCaptureAuth(networks[i].encryption) &&
|
||||
!isSupportedCaptureChannel(networks[i].ch)) {
|
||||
suffix = " 5G+";
|
||||
}
|
||||
snprintf(line, sizeof(line), "%02d. %s ch%d%s",
|
||||
i + 1,
|
||||
networks[i].ssid.c_str(),
|
||||
networks[i].ch);
|
||||
networks[i].ch,
|
||||
suffix);
|
||||
Ui_AddNetwork(line, i);
|
||||
if (networks[i].handshake_captured) {
|
||||
Ui_SetNetworkColor(i, lv_palette_main(LV_PALETTE_RED));
|
||||
} else {
|
||||
} else if (isCaptureable(i)) {
|
||||
Ui_SetNetworkColor(i, lv_palette_main(LV_PALETTE_GREEN));
|
||||
} else {
|
||||
Ui_SetNetworkColor(i, lv_palette_main(LV_PALETTE_GREY));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user