diff --git a/pages/pagemotorcomparison.cpp b/pages/pagemotorcomparison.cpp index 3ab31a0fa..d17cd7a52 100644 --- a/pages/pagemotorcomparison.cpp +++ b/pages/pagemotorcomparison.cpp @@ -384,8 +384,8 @@ PageMotorComparison::PageMotorComparison(QWidget *parent) : addDataItemBoth("ExtraVal2"); addDataItemBoth("ExtraVal3"); addDataItemBoth("ExtraVal4"); - addDataItemBoth("ERPM", false); - addDataItemBoth("km/h", false); + addDataItemBoth("ERPM"); + addDataItemBoth("km/h"); addDataItemBoth("mph", false); addDataItemBoth("wh/km", false); addDataItemBoth("wh/mi", false); @@ -777,6 +777,16 @@ void PageMotorComparison::on_testRunButton_clicked() yAxes[rowInd].append(md.extraVal4 * rowScale); names.append(namePrefix + QString("(Unit * %1)").arg(rowScale)); rowInd++; break; + case 22: + if (yAxes.size() <= rowInd) yAxes.append(QVector()); + yAxes[rowInd].append(md.erpm * rowScale); + names.append(namePrefix + QString("(Unit * %1)").arg(rowScale)); + rowInd++; break; + case 23: + if (yAxes.size() <= rowInd) yAxes.append(QVector()); + yAxes[rowInd].append(md.km_h * rowScale); + names.append(namePrefix + QString("(Unit * %1)").arg(rowScale)); + rowInd++; break; default: break; } diff --git a/pages/pagemotorcomparison.h b/pages/pagemotorcomparison.h index 55db4b3d6..db3803ddb 100644 --- a/pages/pagemotorcomparison.h +++ b/pages/pagemotorcomparison.h @@ -160,7 +160,7 @@ struct MotorData { params.fwCurrent = Utility::map(vbus, vbus_lower, vbus_upper, 0.0, fw_max); - for (int j = 0;j < 20;j++) { + for (int i = 0;i < 20;i++) { if (!update(rpm, torque)) { params.fwCurrent = fw_max; return false; diff --git a/pages/pagemotorcomparison.ui b/pages/pagemotorcomparison.ui index 76c3552b9..e9daff544 100644 --- a/pages/pagemotorcomparison.ui +++ b/pages/pagemotorcomparison.ui @@ -120,7 +120,7 @@ - <html><head/><body><p>Torque-sweep at fixed RPM and limited bus voltage. Uses field weakening according to the duty in the configuration and the current in the FW-box.</p></body></html> + <html><head/><body><p>Torque-sweep at fixed RPM and limited bus voltage. Uses field weakening according to the current in the FW-box.</p></body></html> VB+FW