Original project changes: Vehicle - Fix RestartCellTemperatures to resize the correct vector
This commit is contained in:
parent
dab42140b8
commit
a95e6e4fa2
|
@ -153,7 +153,7 @@ void OvmsVehicle::BmsSetCellLimitsTemperature(float min, float max)
|
|||
|
||||
void OvmsVehicle::BmsSetCellVoltage(int index, float value)
|
||||
{
|
||||
//ESP_LOGV(TAG,"BmsSetCellVoltage(%d,%f) c=%d", index, value, m_bms_bitset_cv);
|
||||
// ESP_LOGV(TAG,"BmsSetCellVoltage(%d,%f) c=%d", index, value, m_bms_bitset_cv);
|
||||
if ((index<0)||(index>=m_bms_readings_v)) return;
|
||||
if ((value<m_bms_limit_vmin)||(value>m_bms_limit_vmax)) return;
|
||||
m_bms_voltages[index] = value;
|
||||
|
@ -275,7 +275,7 @@ void OvmsVehicle::BmsSetCellVoltage(int index, float value)
|
|||
|
||||
void OvmsVehicle::BmsSetCellTemperature(int index, float value)
|
||||
{
|
||||
//ESP_LOGV(TAG,"BmsSetCellTemperature(%d,%f) c=%d", index, value, m_bms_bitset_ct);
|
||||
// ESP_LOGV(TAG,"BmsSetCellTemperature(%d,%f) c=%d", index, value, m_bms_bitset_ct);
|
||||
if ((index<0)||(index>=m_bms_readings_t)) return;
|
||||
if ((value<m_bms_limit_tmin)||(value>m_bms_limit_tmax)) return;
|
||||
m_bms_temperatures[index] = value;
|
||||
|
@ -365,7 +365,7 @@ void OvmsVehicle::BmsRestartCellVoltages()
|
|||
void OvmsVehicle::BmsRestartCellTemperatures()
|
||||
{
|
||||
m_bms_bitset_t.clear();
|
||||
m_bms_bitset_v.resize(m_bms_readings_t);
|
||||
m_bms_bitset_t.resize(m_bms_readings_t);
|
||||
m_bms_bitset_ct = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue