Class Starting

java.lang.Object
com.crossbotics.ftchelper.robot.Starting

public final class Starting extends Object
Two words you can write in Tunables.java in place of a number you do not know yet, so every setting is in the file from the first day and the file says which ones are still to do.

 import static com.crossbotics.ftchelper.robot.Starting.*;   // at the top of Tunables.java

 public static class Launcher {
     public static double kP = DEFAULT;          // from the motor in Robot.java (parts catalog)
     public static double speedRpm = DEFAULT;    // 60% of the motor's top speed
     public static double stepRpm = DEFAULT;     // the library's plain default (100)
 }
 public static class Lift {
     public static double min = MEASURE, max = MEASURE;        // INIT stops until you write them
 }
 
  • DEFAULT (or its older name DEFAULT_FROM_CATALOG): "use the library's starting value". The same as leaving the line out: the value worked out from the parts catalog where there is one (a launcher's gains, a lift's kP with .part(...), a servo's travelSec), else the library's default. INIT lists each one with the value it used. Never for a safety number (a lift's min and max, a hood's stops...): INIT stops, because a safety limit never comes from the catalog.
  • MEASURE: "a number you must find on the robot". INIT stops and names the tool that finds it (Motor Finder, Servo Finder...). Write the number in its place.

Only for double fields (the way Tunables.java writes numbers): an int cannot hold them (Java says so when it builds), and an on/off setting (boolean) or a table (double[][]) has no such word: leave the line out instead. The tuning menu shows the real value in use, and its "copy into Tunables.java" lines are real numbers to write in place of the word.

How they work: each is a "not a number" value (NaN) with its own bit pattern, which no calculation makes. The library reads the bits, so no real number can be taken for one of them. Docs: docs/guides/tunables.md (section "DEFAULT and MEASURE")

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Use the library's starting value: worked out from the part Robot.java names (the parts catalog) where the setting depends on the part, else the library's plain default.
    static final double
    The older, longer name for DEFAULT: exactly the same.
    static final double
    A number you must find on the robot: INIT stops and names the tool that finds it.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    True if the value is DEFAULT (the same as DEFAULT_FROM_CATALOG; not any other NaN).
    static boolean
    isMeasure(double v)
    True if the value is MEASURE (not any other NaN).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final double DEFAULT
      Use the library's starting value: worked out from the part Robot.java names (the parts catalog) where the setting depends on the part, else the library's plain default. The same as leaving the line out, but you can see it.
    • DEFAULT_FROM_CATALOG

      public static final double DEFAULT_FROM_CATALOG
      The older, longer name for DEFAULT: exactly the same.
    • MEASURE

      public static final double MEASURE
      A number you must find on the robot: INIT stops and names the tool that finds it.
  • Method Details

    • isDefaultFromCatalog

      public static boolean isDefaultFromCatalog(double v)
      True if the value is DEFAULT (the same as DEFAULT_FROM_CATALOG; not any other NaN).
      Parameters:
      v - a number read from Tunables.java
    • isMeasure

      public static boolean isMeasure(double v)
      True if the value is MEASURE (not any other NaN).
      Parameters:
      v - a number read from Tunables.java