Qt-UI fix escaping all wifi access points (#20147)

* fix wifi escaping

* less code

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 04cbed3989
vw-mqb-aeb
grekiki 4 years ago committed by GitHub
parent 2db03fdbe2
commit 6b65ed01f5
  1. 3
      selfdrive/ui/qt/offroad/networking.cc

@ -6,6 +6,7 @@
#include <QLineEdit>
#include <QRandomGenerator>
#include <QtConcurrent>
#include <algorithm>
#include "common/params.h"
#include "networking.hpp"
@ -325,6 +326,8 @@ void WifiUI::refresh() {
int i = 0;
int countWidgets = 0;
int pageCount = (wifi->seen_networks.size() - 1) / networks_per_page;
page = std::max(0, std::min(page, pageCount));
for (Network &network : wifi->seen_networks) {
QHBoxLayout *hlayout = new QHBoxLayout;
if (page * networks_per_page <= i && i < (page + 1) * networks_per_page) {

Loading…
Cancel
Save