mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Fix PSC causing lag via selective update broadcasting (#28)
* Fix PSC causing lag via selective update broadcasting * add logging, update key * Fix current pipeline setting selective send Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
@@ -30,8 +30,11 @@ public class OutgoingUIEvent<T> extends DataChangeEvent<T> {
|
||||
this.updateType = updateType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public OutgoingUIEvent(UIUpdateType updateType, String dataKey, HashMap<String, Object> data) {
|
||||
this(updateType, dataKey, (T) data.get(dataKey));
|
||||
public static OutgoingUIEvent<HashMap<String, Object>> wrappedOf(
|
||||
UIUpdateType uiUpdateType, String commandName, String propertyName, Object value) {
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
data.put(propertyName, value);
|
||||
|
||||
return new OutgoingUIEvent<>(uiUpdateType, commandName, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user