def __init__(self): """Instantiates a SendableChooser. """ from networktables import StringArray self.choices = StringArray() self.values = [] self.defaultChoice = None self.defaultValue = None
def initTable(self, subtable): self.table = subtable from networktables import StringArray, NumberArray self.commands = StringArray() self.ids = NumberArray() self.toCancel = NumberArray() self.table.putValue("Names", self.commands) self.table.putValue("Ids", self.ids) self.table.putValue("Cancel", self.toCancel)