26 Nov
2023
26 Nov
'23
9:26 a.m.
This code is from OvmsVehicleFactor::SetVehicle m_currentvehicle = NewVehicle(type); if (m_currentvehicle) { m_currentvehicle->m_ready = true; } m_currentvehicletype = std::string(type); StandardMetrics.ms_v_type->SetValue(m_currentvehicle ? type : ""); MyEvents.SignalEvent("vehicle.type.set", (void*)type, strlen(type)+1); My question is about what happens when NewVehicle() returns NULL. Should m_currecntvehicletype, v.type and the SignalEvent all be set as blank? Any particular reason why only the v.type is set as blank? //.ichael