Java 类edu.wpi.first.wpilibj.networktables.NetworkTableKeyNotDefined 实例源码

项目:Stronghold-2016    文件:Sensors.java   
public double getHeight() { 
    double height = table.getNumber("HEIGHT", 0);
    if (height == 0) {
        try{
            height = SmartDashboard.getNumber("Height");
        }catch(@SuppressWarnings("deprecation") NetworkTableKeyNotDefined e){
            System.out.print(e.getStackTrace());
            SmartDashboard.putNumber("Height", table.getNumber("HEIGHT", 0));
        }
    }
    if (height != 0) targetVisible = true;
    else targetVisible = false;

    return height;
}