From 324ce7b5bf958cfd45fceaa24d42c7aa270a183d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 25 Apr 2016 01:09:56 +0200 Subject: [PATCH] don't report in AP Former-commit-id: 88474c14b21b2d40741108903967373a5bf88f31 --- user/reporting.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user/reporting.c b/user/reporting.c index e37bcb0..10ba306 100644 --- a/user/reporting.c +++ b/user/reporting.c @@ -157,6 +157,15 @@ bool FLASH_FN capture_and_report(bool do_report) return false; } + if (do_report) { + // don't report in AP mode + WIFI_MODE mode = wifi_get_opmode(); + if (mode != STATION_MODE && mode != STATIONAP_MODE) { + warn("Not in station mode, cannot report."); + do_report = false; + } + } + rpt_result.ready = false; rpt_result.busy = true;