fix: DataCache & State domain fixes

This commit is contained in:
Piotr Dec 2024-07-30 19:50:24 +02:00
parent af2b3cce5c
commit 6f3643a2b4
Signed by: stawros
GPG key ID: F89F27AD8F881A91
2 changed files with 22 additions and 18 deletions

View file

@ -38,24 +38,7 @@ class DataCache {
// Merge states
fun update(state: State) {
if (state.lineArrows != null) {
stateCache.lineArrows = state.lineArrows
}
if (state.lineOutlines != null) {
state.lineOutlines = state.lineOutlines
}
if (state.direction != null) {
stateCache.direction = state.direction
}
if (state.distance != null) {
stateCache.distance = state.distance
}
if (state.speed != null) {
stateCache.speed = state.speed
}
if (state.arrival != null) {
stateCache.arrival = state.arrival
}
stateCache.merge(state)
}
// maneuver