Compare commits
2 commits
705a4d1d3a
...
b4486dd06e
Author | SHA1 | Date | |
---|---|---|---|
Carsten Schmiemann | b4486dd06e | ||
Carsten Schmiemann | a3bb202c6a |
|
@ -596,7 +596,11 @@ void canlog::LogInfo(canbus* bus, CAN_log_type_t type, const char* text)
|
|||
msg.origin = bus;
|
||||
msg.text = strdup(text);
|
||||
m_msgcount++;
|
||||
if (xQueueSend(m_queue, &msg, 0) != pdTRUE) m_dropcount++;
|
||||
if (xQueueSend(m_queue, &msg, 0) != pdTRUE)
|
||||
{
|
||||
m_dropcount++;
|
||||
free(msg.text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1502,6 +1502,12 @@ void OvmsVehicle::MetricModified(OvmsMetric* metric)
|
|||
NotifyChargeState();
|
||||
}
|
||||
}
|
||||
else if (metric == StandardMetrics.ms_v_charge_type)
|
||||
{
|
||||
std::string m = metric->AsString();
|
||||
MyEvents.SignalEvent("vehicle.charge.type", (void*)m.c_str(), m.size()+1);
|
||||
NotifiedVehicleChargeType(m);
|
||||
}
|
||||
else if (metric == StandardMetrics.ms_v_gen_state)
|
||||
{
|
||||
std::string state = metric->AsString();
|
||||
|
@ -1509,6 +1515,12 @@ void OvmsVehicle::MetricModified(OvmsMetric* metric)
|
|||
if (m_autonotifications)
|
||||
NotifyGenState();
|
||||
}
|
||||
else if (metric == StandardMetrics.ms_v_gen_type)
|
||||
{
|
||||
std::string m = metric->AsString();
|
||||
MyEvents.SignalEvent("vehicle.gen.type", (void*)m.c_str(), m.size()+1);
|
||||
NotifiedVehicleGenType(m);
|
||||
}
|
||||
else if (metric == StandardMetrics.ms_v_pos_speed)
|
||||
{
|
||||
// Collect data for trip speed average:
|
||||
|
|
|
@ -447,7 +447,9 @@ class OvmsVehicle : public InternalRamAllocated
|
|||
virtual void NotifiedVehicleDrivemode(int drivemode) {}
|
||||
virtual void NotifiedVehicleChargeMode(const char* m) {}
|
||||
virtual void NotifiedVehicleChargeState(const char* s) {}
|
||||
virtual void NotifiedVehicleChargeType(const std::string& state) {}
|
||||
virtual void NotifiedVehicleGenState(const std::string& state) {}
|
||||
virtual void NotifiedVehicleGenType(const std::string& state) {}
|
||||
|
||||
protected:
|
||||
virtual void ConfigChanged(OvmsConfigParam* param);
|
||||
|
|
Loading…
Reference in a new issue