本文整理匯總了Java中edu.wpi.first.wpilibj.tables.ITable.putBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java ITable.putBoolean方法的具體用法?Java ITable.putBoolean怎麽用?Java ITable.putBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類edu.wpi.first.wpilibj.tables.ITable
的用法示例。
在下文中一共展示了ITable.putBoolean方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
public void initTable(ITable table) {
if (this.m_table != null) {
m_table.removeTableListener(m_listener);
}
m_table = table;
if (table != null) {
table.putNumber("p", getP());
table.putNumber("i", getI());
table.putNumber("d", getD());
table.putNumber("f", getF());
table.putNumber("setpoint", getSetpoint());
table.putBoolean("enabled", isEnable());
table.addTableListener(m_listener, false);
}
}
示例2: updateTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
default void updateTable() {
ITable table = getTable();
if (table != null) {
table.putString("~TYPE~", SMART_DASHBOARD_TYPE);
table.putString("Type", getClass().getSimpleName());
table.putNumber("Mode", getControlMode().getValue());
if (getControlMode().isPID()) {
table.putNumber("p", getP());
table.putNumber("i", getI());
table.putNumber("d", getD());
table.putNumber("f", getF());
}
table.putBoolean("Enabled", isEnabled());
table.putNumber("Value", get());
}
}
示例3: initTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
public void initTable(ITable table) {
m_table = table;
if (table != null) {
if (m_defaultCommand != null) {
table.putBoolean("hasDefault", true);
table.putString("default", m_defaultCommand.getName());
} else {
table.putBoolean("hasDefault", false);
}
if (m_currentCommand != null) {
table.putBoolean("hasCommand", true);
table.putString("command", m_currentCommand.getName());
} else {
table.putBoolean("hasCommand", false);
}
}
}
示例4: updateTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
public default void updateTable() {
ITable table = getTable();
if(table != null) {
table.putString("~TYPE~", SMART_DASHBOARD_TYPE);
table.putString("Type", getClass().getSimpleName()); // "CANTalon", "CANJaguar"
table.putNumber("Mode", getControlMode().getValue());
if (getControlMode().isPID()) {
// CANJaguar throws an exception if you try to get its PID constants
// when it's not in a PID-compatible mode
table.putNumber("p", getP());
table.putNumber("i", getI());
table.putNumber("d", getD());
table.putNumber("f", getF());
}
table.putBoolean("Enabled", isEnabled());
table.putNumber("Value", get());
}
}
示例5: initTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
public void initTable(ITable table) {
m_table = table;
if (table != null) {
table.putBoolean("pressed", get());
}
}
示例6: initTable
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@Override
public void initTable(ITable table) {
if (m_table != null) {
m_table.removeTableListener(m_listener);
}
m_table = table;
if (table != null) {
table.putString("name", getName());
table.putBoolean("running", isRunning());
table.putBoolean("isParented", m_parent != null);
table.addTableListener("running", m_listener, false);
}
}
示例7: putSourcePropertyValue
import edu.wpi.first.wpilibj.tables.ITable; //導入方法依賴的package包/類
@SuppressWarnings("JavadocMethod")
private static void putSourcePropertyValue(ITable table, VideoEvent event, boolean isNew) {
String name;
String infoName;
if (event.name.startsWith("raw_")) {
name = "RawProperty/" + event.name.substring(4);
infoName = "RawPropertyInfo/" + event.name.substring(4);
} else {
name = "Property/" + event.name;
infoName = "PropertyInfo/" + event.name;
}
switch (event.propertyKind) {
case kBoolean:
if (isNew) {
table.setDefaultBoolean(name, event.value != 0);
} else {
table.putBoolean(name, event.value != 0);
}
break;
case kInteger:
case kEnum:
if (isNew) {
table.setDefaultNumber(name, event.value);
table.putNumber(infoName + "/min",
CameraServerJNI.getPropertyMin(event.propertyHandle));
table.putNumber(infoName + "/max",
CameraServerJNI.getPropertyMax(event.propertyHandle));
table.putNumber(infoName + "/step",
CameraServerJNI.getPropertyStep(event.propertyHandle));
table.putNumber(infoName + "/default",
CameraServerJNI.getPropertyDefault(event.propertyHandle));
} else {
table.putNumber(name, event.value);
}
break;
case kString:
if (isNew) {
table.setDefaultString(name, event.valueStr);
} else {
table.putString(name, event.valueStr);
}
break;
default:
break;
}
}