Skip to content

Commit cf3761e

Browse files
committed
check status of packs during start button wait
1 parent e35b942 commit cf3761e

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packs/Nissan/LeafMultiPack.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,29 @@ void LeafMultiPack::periodicCallback()
129129
m_main_contactor.setSafeToOperate(true);
130130
m_main_contactor.close();
131131
}
132+
// check status of packs
133+
for (uint i=0; i<m_vmonitor.size(); i++)
134+
{
135+
if (m_vmonitor[i]->getPackStatus() != Monitor::NORMAL_OPERATION)
136+
{
137+
setPackStatus(Monitor::SHUTTING_DOWN);
138+
std::ostringstream sss;
139+
sss << "Mulitpack status changed due to pack " << (i+1) << " having not-NORMAL_OPERATION status";
140+
if (m_log) m_log->alarm(sss, __FILENAME__,__LINE__);;
141+
std::ostringstream ss;
142+
ss << "LeafMultiPack: status is " << monitor::getPackStatusTEXT(m_multipack_status);
143+
if (m_log) m_log->alarm(ss, __FILENAME__,__LINE__);;
144+
}
145+
}
146+
132147
break;
133148

134149
case Monitor::NORMAL_OPERATION:
135150
// DURING NORMAL OPERATION:
136151
// the inverter is driving the operation by polling for data
137152
updateFullyChargedDischargedStatus();
138153

154+
// check status of packs
139155
for (uint i=0; i<m_vmonitor.size(); i++)
140156
{
141157
if (m_vmonitor[i]->getPackStatus() != Monitor::NORMAL_OPERATION)

0 commit comments

Comments
 (0)