Skip to content

Commit

Permalink
Made ERPM and kmh plottable
Browse files Browse the repository at this point in the history
  • Loading branch information
vedderb committed Nov 28, 2023
1 parent ecc25c4 commit 44f5af0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions pages/pagemotorcomparison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<double>());
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<double>());
yAxes[rowInd].append(md.km_h * rowScale);
names.append(namePrefix + QString("(Unit * %1)").arg(rowScale));
rowInd++; break;
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion pages/pagemotorcomparison.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pages/pagemotorcomparison.ui
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<item row="1" column="2">
<widget class="QRadioButton" name="testModeVBFWButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Torque-sweep at fixed RPM and limited bus voltage. Uses field weakening according to the current in the FW-box.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>VB+FW</string>
Expand Down

0 comments on commit 44f5af0

Please sign in to comment.