Skip to content

Commit

Permalink
Properly caches component properties
Browse files Browse the repository at this point in the history
The cached property is a SimpleProperty object, which would never match
the updated value and would always be sent to the car
This should now properly skip unnecessary updates
  • Loading branch information
hufman committed Sep 28, 2019
1 parent fcedb8d commit 5f2f0a8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RHMIApplicationIdempotent(val app: RHMIApplication): RHMIApplication(), RH
}

override fun setProperty(componentId: Int, propertyId: Int, value: Any?) {
if (components[componentId]?.properties?.get(propertyId) != value)
if (components[componentId]?.properties?.get(propertyId)?.value != value)
app.setProperty(componentId, propertyId, value)
}

Expand Down

0 comments on commit 5f2f0a8

Please sign in to comment.