Class ShotStats

java.lang.Object
com.crossbotics.ftchelper.launcher.ShotStats

public final class ShotStats extends Object
Firing stats: what each fed piece did to the flywheel, for tuning the shot modes. The Launcher fills it in; its debug lines show it (PRACTICE profile only: at an event they are noise). For each piece: the shot mode, the speed when it was fed, the speed drop, the time back to "ready" (the recovery) and the time since the piece before it. After a volley: one line with the average and the worst.
 Shot 3        QUICK  fed at 2410/2450 rpm, drop 310, back in 0.21 s, 0.30 s after the last
 Volley (4)    drop avg 290 worst 340, recovery avg 0.20 worst 0.26 s
 
Docs: docs/modules/launcher.md
  • Constructor Details

    • ShotStats

      public ShotStats()
  • Method Details

    • count

      public int count()
      Pieces fed since the OpMode started.
    • last

      public ShotStats.Shot last()
      The newest piece, or null before the first.
    • volley

      public List<ShotStats.Shot> volley()
      The pieces of the volley going on now (or the newest one), oldest first (read only).
    • lastVolley

      public List<ShotStats.Shot> lastVolley()
      The volley before it, oldest first (read only; empty until a second volley starts).
    • summary

      public static String summary(List<ShotStats.Shot> shots)
      "drop avg 290 worst 340, recovery avg 0.20 worst 0.26 s" for these pieces ("" for none).
    • addTelemetry

      public void addTelemetry(RobotTelemetry t)
      The newest piece and the volley summary, as debug lines (PRACTICE profile only).