changed number of fingerprint scans

minor parameter changes
more log lines
added VAP log to UI (debug)
fixed missing wifi timestamp for android live data
This commit is contained in:
2016-09-28 15:29:25 +02:00
parent d47322e73b
commit 5ddc455bee
9 changed files with 31 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ class LoggerUI : public Logger {
private:
InfoWidget* iw;
const int numLines = 5;
std::vector<QString> lines;
public:
@@ -24,7 +24,7 @@ public:
void add(const std::string& str, const bool nl) override {
lines.back() += QString(str.c_str());
if (nl) {lines.push_back("");}
while(lines.size() > 4) {lines.erase(lines.begin());}
while(lines.size() > numLines) {lines.erase(lines.begin());}
QString qs = getStr();
QMetaObject::invokeMethod(iw, "showLog", Qt::QueuedConnection, Q_ARG(const QString&, qs));
QApplication::processEvents();

View File

@@ -158,10 +158,12 @@ void MapView2D::mouseReleaseEvent(QMouseEvent* evt) {
const Point2 p1(evt->x(), evt->y());
// fingerprint node pressed?
const int fpSize = UIHelper::isLarge(this->parent()) ? (40) : (25);
int idx = 0;
for (const Point2 p2 : wifiCalib->getNodes()) {
const float dist = p1.getDistance(p2);
if (dist < 25) { wifiCalib->selectNode(idx); emit update(); break; }
if (dist < fpSize) { wifiCalib->selectNode(idx); emit update(); break; }
++idx;
}