From 580ff5d1c17ff60f1378d4712274d62616669c4b Mon Sep 17 00:00:00 2001 From: Danny Bokma Date: Mon, 31 Dec 2018 12:21:03 +0100 Subject: [PATCH] Increased firmware version number requirement to 0.24 and added a long list of configurable options. --- mainwindow.ui | 2 +- pages/pagemastercell.cpp | 13 +- pages/pagemastergeneral.cpp | 29 ++- pages/pagemastergeneral.ui | 10 + pages/pagemastersignals.cpp | 3 +- pages/pagemasterswitch.cpp | 3 +- pages/pageslavegeneral.cpp | 6 +- pages/pageslaveswitch.cpp | 3 + res/config.xml | 458 +++++++++++++++++++++++++++++++----- res/info.xml | 2 +- startupwizard.cpp | 222 ----------------- 11 files changed, 461 insertions(+), 290 deletions(-) delete mode 100644 startupwizard.cpp diff --git a/mainwindow.ui b/mainwindow.ui index 9b5e9e1..e40985b 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -336,7 +336,7 @@ :/res/icons/Horizontal Settings Mixer-96.png:/res/icons/Horizontal Settings Mixer-96.png - Parameter Editor BMScconf + Parameter Editor Config diff --git a/pages/pagemastercell.cpp b/pages/pagemastercell.cpp index b193c4f..ce0e464 100644 --- a/pages/pagemastercell.cpp +++ b/pages/pagemastercell.cpp @@ -45,9 +45,12 @@ void PageMasterCell::setDieBieMS(BMSInterface *dieBieMS) mDieBieMS = dieBieMS; if (mDieBieMS) { - ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "cellTechnology"); - ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "noOfCells"); + ui->specificationsTab->addRowSeparator(tr("Pack configuration")); + ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "noOfCellsSeries"); + ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "noOfCellsParallel"); ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "batteryCapacity"); + ui->specificationsTab->addRowSeparator(tr("Cell specifications")); + ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "cellTechnology"); ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "cellHardUnderVoltage"); ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "cellHardOverVoltage"); ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "cellLCSoftUnderVoltage"); @@ -57,6 +60,7 @@ void PageMasterCell::setDieBieMS(BMSInterface *dieBieMS) ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "hysteresisDischarge"); ui->specificationsTab->addParamRow(mDieBieMS->bmsConfig(), "hysteresisCharge"); + ui->balancingTab->addRowSeparator(tr("Balancing configuration")); ui->balancingTab->addParamRow(mDieBieMS->bmsConfig(), "cellBalanceStart"); ui->balancingTab->addParamRow(mDieBieMS->bmsConfig(), "cellBalanceDifferenceThreshold"); ui->balancingTab->addParamRow(mDieBieMS->bmsConfig(), "cellBalanceUpdateInterval"); @@ -71,11 +75,12 @@ void PageMasterCell::setDieBieMS(BMSInterface *dieBieMS) ui->throttlingTab->addParamRow(mDieBieMS->bmsConfig(), "cellThrottleUpperMargin"); ui->throttlingTab->addParamRow(mDieBieMS->bmsConfig(), "throttleChargeIncreaseRate"); - ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "soCMethod"); + ui->socTab->addRowSeparator(tr("SoC general")); + ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "stateOfChargeMethod"); + ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "stateOfChargeStoreInterval"); ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutChargeCompleted"); ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutChargingCompletedMinimalMismatch"); ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "maxMismatchThreshold"); - ui->socTab->addParamRow(mDieBieMS->bmsConfig(), "stateOfChargeStoreInterval"); } } diff --git a/pages/pagemastergeneral.cpp b/pages/pagemastergeneral.cpp index dcbed6e..b59cfab 100644 --- a/pages/pagemastergeneral.cpp +++ b/pages/pagemastergeneral.cpp @@ -45,29 +45,43 @@ void PageMasterGeneral::setDieBieMS(BMSInterface *dieBieMS) mDieBieMS = dieBieMS; if (mDieBieMS) { + ui->powerStateTab->addRowSeparator(tr("Onstate")); ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "pulseToggleButton"); ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "notUsedCurrentThreshold"); ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "notUsedTimeout"); ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "powerDownDelay"); - ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "extEnableState"); ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "allowForceOn"); + ui->powerStateTab->addRowSeparator(tr("Jump to")); + ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "extEnableState"); + ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "chargeEnableState"); + ui->powerStateTab->addRowSeparator(tr("DCDC Converter")); + ui->powerStateTab->addParamRow(mDieBieMS->bmsConfig(), "DCDCEnableInverted"); + + ui->masterLimitsTab->addRowSeparator(tr("Current")); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "maxAllowedCurrent"); + ui->masterLimitsTab->addRowSeparator(tr("Temperature")); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBattDischargingMax"); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBattDischargingMin"); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBattChargingMax"); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBattChargingMin"); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBMSMax"); + ui->masterLimitsTab->addParamRow(mDieBieMS->bmsConfig(), "allowedTempBMSMin"); + ui->canTab->addRowSeparator(tr("CAN Configuration")); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "CANID"); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "CANBaudRate"); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "CANIDStyle"); + ui->canTab->addRowSeparator(tr("CAN Messaging")); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "emitStatusOverCAN"); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "useCANSafetyInput"); ui->canTab->addParamRow(mDieBieMS->bmsConfig(), "useCANDelayedPowerDown"); - ui->masterSensorsTab->addRowSeparator(tr("Monitor IC")); + ui->masterSensorsTab->addRowSeparator(tr("Celvoltage monitor")); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "cellMonitorICType"); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "cellMonitorICCount"); ui->masterSensorsTab->addRowSeparator(tr("Shunt")); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "shuntLCFactor"); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "shuntLCOffset"); - ui->masterSensorsTab->addRowSeparator(tr("NTC enable mask")); - ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "tempEnableMaskBMS"); - ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "tempEnableMaskBattery"); ui->masterSensorsTab->addRowSeparator(tr("NTC specifications")); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCPCBTopResistor"); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCPCB25Deg"); @@ -75,5 +89,10 @@ void PageMasterGeneral::setDieBieMS(BMSInterface *dieBieMS) ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCLTCTopResistor"); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCLTC25Deg"); ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCLTCBeta"); + ui->masterSensorsTab->addRowSeparator(tr("NTC enable mask")); + ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "tempEnableMaskBMS"); + ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "tempEnableMaskBattery"); + ui->masterSensorsTab->addRowSeparator(tr("Water detect enable mask")); + ui->masterSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "waterSensorEnableMask"); } } diff --git a/pages/pagemastergeneral.ui b/pages/pagemastergeneral.ui index c1d8d7b..7693c5e 100644 --- a/pages/pagemastergeneral.ui +++ b/pages/pagemastergeneral.ui @@ -32,6 +32,16 @@ + + + Limits + + + + + + + CAN diff --git a/pages/pagemastersignals.cpp b/pages/pagemastersignals.cpp index cbf88ef..fef2dc1 100644 --- a/pages/pagemastersignals.cpp +++ b/pages/pagemastersignals.cpp @@ -45,6 +45,7 @@ void PageMasterSignals::setDieBieMS(BMSInterface *dieBieMS) mDieBieMS = dieBieMS; if (mDieBieMS) { - + ui->signalsTab->addRowSeparator(tr("Current sensing")); + ui->signalsTab->addParamRow(mDieBieMS->bmsConfig(), "packCurrentDataSource"); } } diff --git a/pages/pagemasterswitch.cpp b/pages/pagemasterswitch.cpp index 35dca50..45818c5 100644 --- a/pages/pagemasterswitch.cpp +++ b/pages/pagemasterswitch.cpp @@ -45,13 +45,14 @@ void PageMasterSwitch::setDieBieMS(BMSInterface *dieBieMS) mDieBieMS = dieBieMS; if (mDieBieMS) { + ui->dischargeTab->addRowSeparator(tr("-")); ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "LCUseDischarge"); ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "LCUsePrecharge"); ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "minimalPrechargePercentage"); ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutLCPreCharge"); ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutDischargeRetry"); - ui->dischargeTab->addParamRow(mDieBieMS->bmsConfig(), "maxAllowedCurrent"); + ui->chargeTab->addRowSeparator(tr("-")); ui->chargeTab->addParamRow(mDieBieMS->bmsConfig(), "chargerEnabledThreshold"); ui->chargeTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutChargerDisconnected"); ui->chargeTab->addParamRow(mDieBieMS->bmsConfig(), "allowChargingDuringDischarge"); diff --git a/pages/pageslavegeneral.cpp b/pages/pageslavegeneral.cpp index 5866c45..568604f 100644 --- a/pages/pageslavegeneral.cpp +++ b/pages/pageslavegeneral.cpp @@ -46,12 +46,16 @@ void PageSlaveGeneral::setDieBieMS(BMSInterface *dieBieMS) { ui->slaveSensorsTab->addRowSeparator(tr("Shunt")); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "shuntHCFactor"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "shuntHCOffset"); - ui->slaveSensorsTab->addRowSeparator(tr("NTC specifications")); + ui->slaveSensorsTab->addRowSeparator(tr("NTC's local")); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpPCBTopResistor"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpPCB25Deg"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpPCBBeta"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpExtTopResistor"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpExt25Deg"); ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpExtBeta"); + ui->slaveSensorsTab->addRowSeparator(tr("NTC Aux")); + ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpAUXTopResistor"); + ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpAUX25Deg"); + ui->slaveSensorsTab->addParamRow(mDieBieMS->bmsConfig(), "NTCHiAmpAUXBeta"); } } diff --git a/pages/pageslaveswitch.cpp b/pages/pageslaveswitch.cpp index 82d349d..171e09a 100644 --- a/pages/pageslaveswitch.cpp +++ b/pages/pageslaveswitch.cpp @@ -43,9 +43,12 @@ void PageSlaveSwitch::setDieBieMS(BMSInterface *dieBieMS) { mDieBieMS = dieBieMS; if (mDieBieMS) { + ui->switchTab->addRowSeparator(tr("Main output switch")); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "HCUseRelay"); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "HCUsePrecharge"); + ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "HCUseLoadDetect"); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "togglePowerModeDirectHCDelay"); + ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "HCLoadDetectThreshold"); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutHCPreCharge"); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutHCPreChargeRetryInterval"); ui->switchTab->addParamRow(mDieBieMS->bmsConfig(), "timeoutHCRelayOverlap"); diff --git a/res/config.xml b/res/config.xml index 69b579e..f7d928f 100644 --- a/res/config.xml +++ b/res/config.xml @@ -1,8 +1,8 @@ - - Number of cells + + Cell groups in series 2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -12,26 +12,46 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Number of cell(groups) in series in the batterypack. </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The BMS needs a minimum of 3 cell(groups) in series to operate, this is a minimal voltage requirement by the LTC and power supply.</p></body></html> - NO_OF_CELLS + NO_OF_CELLS_SERIES 1 0 - 12 + 36 3 0 1 12 1 - + + + Cells in parallel group + 2 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Number of cells in parallel (used for future SoC algorithm).</p></body></html> + NO_OF_CELLS_PARALLEL + 1 + 0 + 200 + 1 + 0 + 1 + 16 + + 1 + - Battery capacity + Battery capacity total 1 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Batterypack capacity in Ah. This value is used for the state of charge indication / calculation.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Batterypack total capacity in Ah. This value is used for the state of charge indication / calculation.</p></body></html> BATTERY_CAPACITY 2 1 @@ -40,25 +60,11 @@ p, li { white-space: pre-wrap; } 0 0 1 - 15 + 40 100000 Ah 9 - - State of charge method - 4 - 1 - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The state of charge estimation method the BMS should use.</p></body></html> - CELL_SOC_METHOD - 0 - Coulomb counting - Coulomb counting + CV - Cell monitor IC type 4 @@ -126,7 +132,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 2.7 + 2.3 100000 V 9 @@ -148,7 +154,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 4.2 + 4.25 100000 V 9 @@ -170,7 +176,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 2.7 + 2.9 100000 V 9 @@ -192,7 +198,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 3 + 3.25 100000 V 9 @@ -214,7 +220,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 4 + 4.15 100000 V 9 @@ -236,7 +242,7 @@ p, li { white-space: pre-wrap; } 0 0 0.005 - 0.01 + 0.005 100000 V 9 @@ -258,7 +264,7 @@ p, li { white-space: pre-wrap; } 0 0 0.1 - 3.8 + 3.9 100000 V 9 @@ -282,7 +288,7 @@ p, li { white-space: pre-wrap; } 0 0 0.05 - 0.03 + 0.02 100000 V 9 @@ -359,6 +365,24 @@ p, li { white-space: pre-wrap; } V 9 + + Pack current data source + 4 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cell<span style=" color:#c0c0c0;"> </span>monitor<span style=" color:#c0c0c0;"> </span>IC<span style=" color:#c0c0c0;"> </span>type.<span style=" color:#c0c0c0;"> </span>Set<span style=" color:#c0c0c0;"> </span>to<span style=" color:#c0c0c0;"> </span>LTC6803<span style=" color:#c0c0c0;"> </span>for<span style=" color:#c0c0c0;"> </span>DieBieMS,<span style=" color:#c0c0c0;"> </span>set<span style=" color:#c0c0c0;"> </span>to<span style=" color:#c0c0c0;"> </span>LTC6803<span style=" color:#c0c0c0;"> </span>for<span style=" color:#c0c0c0;"> </span>EFoilBMSV1,<span style=" color:#c0c0c0;"> </span>set<span style=" color:#c0c0c0;"> </span>to<span style=" color:#c0c0c0;"> </span>LTC6804<span style=" color:#c0c0c0;"> </span>for<span style=" color:#c0c0c0;"> </span>EFoilBMSV2<span style=" color:#c0c0c0;"> </span>and<span style=" color:#c0c0c0;"> </span>set<span style=" color:#c0c0c0;"> </span>to<span style=" color:#c0c0c0;"> </span>LTC6804<span style=" color:#c0c0c0;"> </span>for<span style=" color:#c0c0c0;"> </span>DieBieMSHV.</p></body></html> + CELL_MONITOR_IC_TYPE + 0 + NoSource + Low current shunt + High current shunt + Low + high current shunt + CAN->DieBieShunt + CAN->Isabellenhutte + Shunt LC factor 1 @@ -376,7 +400,7 @@ p, li { white-space: pre-wrap; } -1 0 0.05 - -0.00517 + 0.05 100000 9 @@ -397,7 +421,7 @@ p, li { white-space: pre-wrap; } -1024 0 1 - 0 + 100 LSB 4 @@ -418,7 +442,7 @@ p, li { white-space: pre-wrap; } -1 0 0.05 - -2.6e-5 + 0.05 100000 9 @@ -439,7 +463,7 @@ p, li { white-space: pre-wrap; } -1024 0 1 - -4 + 100 LSB 4 @@ -504,18 +528,18 @@ p, li { white-space: pre-wrap; } 5 - Max enabled balanced resistors + Max active bleed resistors per IC 2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This value states the maximum amount of simultaneously active bleeding resistors. This value thus limits the worst case max power dissipated on the BMS trough the bleeding reisistors. The standard value is suitable for the DieBieMS in an enclusure. When the balancing portion of the BMS becomes to hot this value can be lowered.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This value states the maximum amount of simultaneously active bleeding resistors per monitor IC (monitor group). This value thus limits the worst case max power dissipated on the BMS (or its slave modules) trough the bleeding reisistors. When the balancing portion of the BMS becomes to hot this value can be lowered to limit the temperature.</p></body></html> CELL_BALANCE_MAX_SIMULTANEOUS_DISCHARGE 1 0 - 12 + 18 0 0 1 @@ -777,6 +801,138 @@ p, li { white-space: pre-wrap; } A 9 + + Battery temperature discharging max + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the maximum temperature of the battery during discharging.</p></body></html> + MAX_ALLOWED_TEMP_BATT + 1 + 1 + 0 + 100 + -20 + 0 + 5 + 75 + 100000 + °C + 9 + + + Battery temperature discharging min + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the minimum temperature of the battery during discharging.</p></body></html> + MIN_ALLOWED_TEMP_BATT + 1 + 1 + 0 + 100 + -20 + 0 + 5 + -20 + 100000 + °C + 9 + + + Battery temperature charging max + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the maximum temperature of the battery during charging.</p></body></html> + MAX_ALLOWED_TEMP_BATT + 1 + 1 + 0 + 100 + -20 + 0 + 5 + 50 + 100000 + °C + 9 + + + Battery temperature charging min + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the minimum temperature of the battery during charging.</p></body></html> + MIN_ALLOWED_TEMP_BATT + 1 + 1 + 0 + 100 + -20 + 0 + 5 + 0 + 100000 + °C + 9 + + + BMS Temperature max + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the maximum temperature of the BMS.</p></body></html> + MAX_ALLOWED_TEMP_BMS + 1 + 1 + 0 + 100 + -20 + 0 + 5 + 80 + 100000 + °C + 9 + + + BMS Temperature min + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the minimum temperature of the BMS.</p></body></html> + MIN_ALLOWED_TEMP_BMS + 1 + 1 + 0 + 100 + -20 + 0 + 5 + -20 + 100000 + °C + 9 + Display time battery dead 2 @@ -915,7 +1071,7 @@ p, li { white-space: pre-wrap; } 1000 0 1000 - 1200000 + 3600000 ms 5 @@ -935,7 +1091,7 @@ p, li { white-space: pre-wrap; } 0 0 1000 - 3000 + 1000 ms 5 @@ -959,6 +1115,21 @@ p, li { white-space: pre-wrap; } ms 5 + + State of charge method + 4 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The state of charge estimation method the BMS should use.</p></body></html> + CELL_SOC_METHOD + 1 + None + Coulomb counting + Coulomb counting + CellVoltage lookup + CAN ID 2 @@ -1020,6 +1191,26 @@ p, li { white-space: pre-wrap; } CAN_ID 1 + + Water sensor enable mask + 2 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tell what sensor input to use for the water detection system. The bitwise representation of this decimal value will show what sensor is enabled.</p></body></html> + TEMPERATURE_ENABLE_MASK_BMS + 1 + 0 + 32768 + 0 + 0 + 1 + 0 + + 4 + Temp sensor enable mask BMS 2 @@ -1048,13 +1239,13 @@ p, li { white-space: pre-wrap; } TEMPERATURE_ENABLE_MASK_BMS 1 0 - 8191 + 100000000 0 0 1 - 3080 + 7176 - 3 + 5 Temp sensor enable mask Battery @@ -1068,13 +1259,13 @@ p, li { white-space: pre-wrap; } TEMPERATURE_ENABLE_MASK_BATTERY 1 0 - 8191 + 100000000 0 0 1 - 0 + 7176 - 3 + 5 Use discharge output @@ -1140,6 +1331,32 @@ p, li { white-space: pre-wrap; } External operation Normal operation + + Charger enable opstate + 4 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Defines the state to be entered when the BMS is enabled by charge voltage present.</p></body></html> + CHARGE_ENA_OP_STATE + 0 + Charge operation + Normal operation + + + Invert DCDC Enable signal + 5 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Defines whether or not the signal to control a DCDC converter should be inverted or not. Some DCDC converters have an inverted enable input.</p></body></html> + CHARGE_ENA_OP_STATE + 1 + Pulse or toggle power button 4 @@ -1186,7 +1403,7 @@ p, li { white-space: pre-wrap; } <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The messages generated by an emergency button are received and used by the BMS to prefent unsafe power usage. Set to false to disable this feature.</p></body></html> USE_CAN_SAFETY - 0 + 1 Use delayed power down from CAN @@ -1198,7 +1415,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This feature puts a CAN device in control of the power state of the BMS. A device can postpone the power down moment of the battery. This can be used to do a gracefull power down of a device. When not used set this value to false.</p></body></html> USE_CAN_DELAYED_POWERDOWN - 0 + 1 Use relay output @@ -1224,6 +1441,62 @@ p, li { white-space: pre-wrap; } HC_USE_PRECHARGE 1 + + Use relay load detect + 5 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use the voltage drop acros the HC load output precharge resistor to detect a minimal load before enabling the path completely.</p></body></html> + HC_USE_LOAD_DETECT + 0 + + + Battery temperature discharging min + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Define the minimum temperature of the battery during discharging.</p></body></html> + MIN_ALLOWED_TEMP_BATT + 1 + 1 + 0 + 20 + 0 + 0 + 5 + 5 + 100000 + V + 9 + + + Load detect threshold + 1 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The high current output load detect threshold voltage acros the precharge resistor.</p></body></html> + HC_LOAD_DETECT_THRESHOLD + 1 + 1 + 0 + 20 + 0 + 0 + 5 + 0 + 100000 + V + 9 + Timeout precharge 2 @@ -1240,7 +1513,7 @@ p, li { white-space: pre-wrap; } 0 0 100 - 300 + 6000 ms 5 @@ -1405,7 +1678,7 @@ p, li { white-space: pre-wrap; } 3 - NTC HiAmp ext. top resistor + NTC HiAmp Ext. top resistor 2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -1425,7 +1698,7 @@ p, li { white-space: pre-wrap; } 5 - NTC HiAmp ext. 25 deg + NTC HiAmp Ext. 25 deg 2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -1445,7 +1718,7 @@ p, li { white-space: pre-wrap; } 5 - NTC HiAmp ext. Beta + NTC HiAmp Ext. Beta 2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -1520,10 +1793,70 @@ p, li { white-space: pre-wrap; } 1000 0 50 - 3590 + 4100 B 3 + + NTC HiAmp AUX top resistor + 2 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NTC Pullup resistor value</p></body></html> + NTC_TOP_RESISTOR_HIAMP_AUX + 1 + 0 + 1000000 + 10000 + 0 + 10000 + 100000 + Ohm + 5 + + + NTC HiAmp AUX 25 deg + 2 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NTC 25 degree resistor value</p></body></html> + NTC_25_DEG_HIAMP_AUX + 1 + 0 + 1000000 + 10000 + 0 + 10000 + 100000 + Ohm + 5 + + + NTC HiAmp AUX Beta + 2 + 1 + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; ; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NTC beta factor.</p></body></html> + NTC_BETA_HIAMP_AUX + 1 + 0 + 50000 + 1000 + 0 + 50 + 4390 + B + 3 + Mode 4 @@ -1654,7 +1987,8 @@ p, li { white-space: pre-wrap; } - noOfCells + noOfCellsSeries + noOfCellsParallel batteryCapacity cellHardUnderVoltage cellHardOverVoltage @@ -1667,6 +2001,7 @@ p, li { white-space: pre-wrap; } cellThrottleLowerStart cellThrottleUpperMargin cellThrottleLowerMargin + packCurrentDataSource shuntLCFactor shuntLCOffset shuntHCFactor @@ -1687,6 +2022,12 @@ p, li { white-space: pre-wrap; } minimalPrechargePercentage timeoutLCPreCharge maxAllowedCurrent + allowedTempBattDischargingMax + allowedTempBattDischargingMin + allowedTempBattChargingMax + allowedTempBattChargingMin + allowedTempBMSMax + allowedTempBMSMin displayTimeoutBatteryDead displayTimeoutBatteryError displayTimeoutBatteryErrorPreCharge @@ -1695,9 +2036,12 @@ p, li { white-space: pre-wrap; } notUsedCurrentThreshold notUsedTimeout stateOfChargeStoreInterval + stateOfChargeMethod CANID CANIDStyle + CANBaudRate emitStatusOverCAN + waterSensorEnableMask tempEnableMaskBMS tempEnableMaskBattery LCUseDischarge @@ -1710,6 +2054,8 @@ p, li { white-space: pre-wrap; } useCANDelayedPowerDown HCUseRelay HCUsePrecharge + HCUseLoadDetect + HCLoadDetectThreshold timeoutHCPreCharge timeoutHCPreChargeRetryInterval timeoutHCRelayOverlap @@ -1725,10 +2071,14 @@ p, li { white-space: pre-wrap; } NTCHiAmpPCBTopResistor NTCHiAmpPCB25Deg NTCHiAmpPCBBeta + NTCHiAmpAUXTopResistor + NTCHiAmpAUX25Deg + NTCHiAmpAUXBeta cellMonitorICType cellMonitorICCount extEnableState + chargeEnableState + DCDCEnableInverted powerDownDelay - CANBaudRate diff --git a/res/info.xml b/res/info.xml index 2482580..257639b 100644 --- a/res/info.xml +++ b/res/info.xml @@ -12,7 +12,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu';">The firmware version(s) that this version of DieBieMS Tool supports.</span></p></body></html> 0 - 0.23 + 0.24 CAN Forwarding diff --git a/startupwizard.cpp b/startupwizard.cpp deleted file mode 100644 index 4a27f87..0000000 --- a/startupwizard.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* - Original copyright 2018 Benjamin Vedder benjamin@vedder.se and the VESC Tool project ( https://github.com/vedderb/vesc_tool ) - Now forked to: - Danny Bokma github@diebie.nl - - This file is part of BMS Tool. - - DieBieMS Tool is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DieBieMS Tool is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "startupwizard.h" -#include -#include -#include -#include - -StartupWizard::StartupWizard(BMSInterface *vesc, QWidget *parent) : QWizard(parent) -{ - QSettings().setValue("intro_done", false); - - setPage(Page_Intro, new StartupIntroPage(vesc)); - setPage(Page_Usage, new StartupUsagePage(vesc)); - setPage(Page_Warranty, new StartupWarrantyPage(vesc)); - setPage(Page_Conclusion, new StartupConclusionPage(vesc)); - - setStartId(Page_Intro); - setWizardStyle(ModernStyle); - setPixmap(QWizard::LogoPixmap, QPixmap("://res/icon.png"). - scaled(40, 40, - Qt::KeepAspectRatio, - Qt::SmoothTransformation)); - resize(800, 450); - - setWindowTitle(tr("VESC Tool Introduction")); - - mSideLabel = new AspectImgLabel(Qt::Vertical); - mSideLabel->setPixmap(QPixmap("://res/logo_intro_wizard.png")); - mSideLabel->setScaledContents(true); - setSideWidget(mSideLabel); - - connect(this, SIGNAL(currentIdChanged(int)), - this, SLOT(idChanged(int))); -} - -void StartupWizard::idChanged(int id) -{ - if (id == Page_Intro || id == Page_Conclusion) { - setSideWidget(mSideLabel); - mSideLabel->setVisible(true); - } else { - setSideWidget(0); - } -} - -StartupIntroPage::StartupIntroPage(BMSInterface *vesc, QWidget *parent) - : QWizardPage(parent) -{ - mBrowser = new VTextBrowser; - mBrowser->setFrameStyle(QFrame::NoFrame); - mBrowser->viewport()->setAutoFillBackground(false); - - ConfigParam *p = vesc->infoConfig()->getParam("wizard_startup_intro"); - if (p != 0) { - setTitle(p->longName); - mBrowser->setHtml(p->description); - } else { - setTitle("Text not found."); - mBrowser->setText("Text not found."); - } - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(mBrowser); - setLayout(layout); -} - -int StartupIntroPage::nextId() const -{ - return StartupWizard::Page_Usage; -} - -StartupUsagePage::StartupUsagePage(BMSInterface *vesc, QWidget *parent) - : QWizardPage(parent) -{ - mBrowser = new VTextBrowser; - mAcceptBox = new QCheckBox("Yes, I understand and accept"); - - ConfigParam *p = vesc->infoConfig()->getParam("wizard_startup_usage"); - if (p != 0) { - setTitle(p->longName); - setSubTitle(p->valString); - mBrowser->setHtml(p->description); - } else { - setTitle("Text not found."); - setSubTitle("Text not found"); - mBrowser->setText("Text not found."); - } - - registerField("usageAccept*", mAcceptBox); - - connect(mBrowser->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(scrollValueChanged(int))); - connect(mBrowser->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), - this, SLOT(scrollRangeChanged())); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(mBrowser); - layout->addWidget(mAcceptBox); - setLayout(layout); -} - -int StartupUsagePage::nextId() const -{ - return StartupWizard::Page_Warranty; -} - -void StartupUsagePage::scrollValueChanged(int value) -{ - if (value == mBrowser->verticalScrollBar()->maximum()) { - mAcceptBox->setEnabled(true); - } else { - mAcceptBox->setEnabled(false); - mAcceptBox->setChecked(false); - } -} - -void StartupUsagePage::scrollRangeChanged() -{ - scrollValueChanged(mBrowser->verticalScrollBar()->value()); -} - -StartupWarrantyPage::StartupWarrantyPage(BMSInterface *vesc, QWidget *parent) - : QWizardPage(parent) -{ - mBrowser = new VTextBrowser; - mAcceptBox = new QCheckBox("Yes, I understand and accept"); - - ConfigParam *p = vesc->infoConfig()->getParam("wizard_startup_warranty"); - if (p != 0) { - setTitle(p->longName); - setSubTitle(p->valString); - mBrowser->setHtml(p->description); - } else { - setTitle("Text not found."); - setSubTitle("Text not found"); - mBrowser->setText("Text not found."); - } - - registerField("warrantyAccept*", mAcceptBox); - - connect(mBrowser->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(scrollValueChanged(int))); - connect(mBrowser->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), - this, SLOT(scrollRangeChanged())); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(mBrowser); - layout->addWidget(mAcceptBox); - setLayout(layout); -} - -int StartupWarrantyPage::nextId() const -{ - return StartupWizard::Page_Conclusion; -} - -void StartupWarrantyPage::scrollValueChanged(int value) -{ - if (value == mBrowser->verticalScrollBar()->maximum()) { - mAcceptBox->setEnabled(true); - } else { - mAcceptBox->setEnabled(false); - mAcceptBox->setChecked(false); - } -} - -void StartupWarrantyPage::scrollRangeChanged() -{ - scrollValueChanged(mBrowser->verticalScrollBar()->value()); -} - -StartupConclusionPage::StartupConclusionPage(BMSInterface *vesc, QWidget *parent) - : QWizardPage(parent) -{ - mBrowser = new VTextBrowser; - mBrowser->setFrameStyle(QFrame::NoFrame); - mBrowser->viewport()->setAutoFillBackground(false); - - ConfigParam *p = vesc->infoConfig()->getParam("wizard_startup_conclusion"); - if (p != 0) { - setTitle(p->longName); - mBrowser->setHtml(p->description); - } else { - setTitle("Text not found."); - mBrowser->setText("Text not found."); - } - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(mBrowser); - setLayout(layout); -} - -int StartupConclusionPage::nextId() const -{ - return -1; -} - -bool StartupConclusionPage::validatePage() -{ - QSettings().setValue("intro_done", true); - return true; -}