Disallow setting NT pipeline index below 0 (#145)

This commit is contained in:
Banks T
2020-10-19 13:29:25 -04:00
committed by GitHub
parent 869e4628ce
commit 35a6c0bfa4

View File

@@ -71,6 +71,12 @@ public class NTDataPublisher implements CVPipelineResultConsumer {
var newIndex = (int) entryNotification.value.getDouble();
var originalIndex = pipelineIndexSupplier.get();
// ignore indexes below 0
if (newIndex < 0) {
pipelineIndexEntry.forceSetNumber(originalIndex);
return;
}
if (newIndex == originalIndex) {
// TODO: Log
return;