Order output of range state window in order of ascending frame ID, some other small range state tweaks

This commit is contained in:
Collin Kidder
2018-06-04 13:43:53 -04:00
parent cc21686090
commit 23dedcfaa7
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -194,7 +194,7 @@ void RangeStateWindow::refreshFilterList()
void RangeStateWindow::recalcButton() void RangeStateWindow::recalcButton()
{ {
QHash<int, bool>::iterator iter; QMap<int, bool>::iterator iter;
uint32_t id; uint32_t id;
ui->listCandidates->clear(); ui->listCandidates->clear();
@@ -209,6 +209,8 @@ void RangeStateWindow::recalcButton()
progress.setMinimumDuration(0); progress.setMinimumDuration(0);
progress.show(); progress.show();
for (iter = idFilters.begin(); iter != idFilters.end(); ++iter) for (iter = idFilters.begin(); iter != idFilters.end(); ++iter)
{ {
if (iter.value() == true) if (iter.value() == true)
@@ -345,7 +347,7 @@ bool RangeStateWindow::processSignal(int startBit, int bitLength, int sensitivit
{ {
//now look at the second order differentials. This is acceleration. There shouldn't be hard acceleration in values for a ranging signal //now look at the second order differentials. This is acceleration. There shouldn't be hard acceleration in values for a ranging signal
comparisonValue = Utility::Lerp((double)range * 0.20, 1, lerpPoint); comparisonValue = Utility::Lerp((double)range * 0.20, 1, lerpPoint);
maxOvers = maxOvers / 10; maxOvers = Utility::Lerp(8, 2, lerpPoint); //really clamp down on second order over limits
qDebug() << "2nd Delta comparisonvalue: " << comparisonValue; qDebug() << "2nd Delta comparisonvalue: " << comparisonValue;
overValues = 0; overValues = 0;
for (i = 0; i < diff2.count(); i++) for (i = 0; i < diff2.count(); i++)
+2 -1
View File
@@ -2,6 +2,7 @@
#define RANGESTATEWINDOW_H #define RANGESTATEWINDOW_H
#include <QDialog> #include <QDialog>
#include <QMap>
#include "can_structs.h" #include "can_structs.h"
namespace Ui { namespace Ui {
@@ -27,7 +28,7 @@ private:
const QVector<CANFrame> *modelFrames; const QVector<CANFrame> *modelFrames;
QVector<CANFrame> frameCache; QVector<CANFrame> frameCache;
QList<int64_t> foundSignals; QList<int64_t> foundSignals;
QHash<int, bool> idFilters; QMap<int, bool> idFilters;
void refreshFilterList(); void refreshFilterList();
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);