Merge "Add timestamp for continuously property." into rvc-dev am: e5a22f2fa1
Change-Id: I704d3a902c9077cddb3aa8be4a057371db7d3b6a
This commit is contained in:
commit
6780365567
2 changed files with 6 additions and 1 deletions
|
@ -58,6 +58,8 @@ bool VehiclePropertyStore::writeValue(const VehiclePropValue& propValue,
|
|||
return false;
|
||||
}
|
||||
// update the propertyValue.
|
||||
// The timestamp in propertyStore should only be updated by the server side. It indicates
|
||||
// the time when the event is generated by the server.
|
||||
valueToUpdate->timestamp = propValue.timestamp;
|
||||
valueToUpdate->value = propValue.value;
|
||||
if (updateStatus) {
|
||||
|
|
|
@ -126,7 +126,9 @@ VehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get(
|
|||
*outStatus = v != nullptr ? StatusCode::OK : StatusCode::INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
|
||||
if (v.get()) {
|
||||
v->timestamp = elapsedRealtimeNano();
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -283,6 +285,7 @@ void EmulatedVehicleHal::onContinuousPropertyTimer(const std::vector<int32_t>& p
|
|||
}
|
||||
|
||||
if (v.get()) {
|
||||
v->timestamp = elapsedRealtimeNano();
|
||||
doHalEvent(std::move(v));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue