Class UnitInfo

java.lang.Object
org.emrick.project.dev.UnitInfo

public class UnitInfo extends Object
Details a receiver reports in reply to the "info" serial command: @INFO {"type":"receiver","fw":"abc1234","id":12,"label":"T10L",...}
  • Field Details

    • GSON

      private static final com.google.gson.Gson GSON
    • type

      public String type
    • fw

      public String fw
    • fwDate

      @SerializedName("fw_date") public String fwDate
    • id

      public int id
    • label

      public String label
    • position

      public String position
    • leds

      public int leds
    • token

      public long token
    • packets

      public int packets
    • verificationColor

      @SerializedName("verification_color") public String verificationColor
    • batteryVolts

      @SerializedName("battery_v") public double batteryVolts
    • batteryPercent

      @SerializedName("battery_pct") public double batteryPercent
    • state

      public String state
    • debug

      public boolean debug
    • mac

      public String mac
  • Constructor Details

    • UnitInfo

      public UnitInfo()
  • Method Details

    • parse

      public static UnitInfo parse(String line)
      Parameters:
      line - a line starting with "@INFO "
      Returns:
      the parsed info, or null if the line isn't valid
    • fwCommit

      public String fwCommit()
      Returns:
      the firmware commit without a "-dirty" suffix, for comparing against a release