Package org.emrick.project.dev
Class UnitInfo
java.lang.Object
org.emrick.project.dev.UnitInfo
Details a receiver reports in reply to the "info" serial command:
@INFO {"type":"receiver","fw":"abc1234","id":12,"label":"T10L",...}-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON -
type
-
fw
-
fwDate
-
id
public int id -
label
-
position
-
leds
public int leds -
token
public long token -
packets
public int packets -
verificationColor
-
batteryVolts
@SerializedName("battery_v") public double batteryVolts -
batteryPercent
@SerializedName("battery_pct") public double batteryPercent -
state
-
debug
public boolean debug -
mac
-
-
Constructor Details
-
UnitInfo
public UnitInfo()
-
-
Method Details
-
parse
- Parameters:
line- a line starting with "@INFO "- Returns:
- the parsed info, or null if the line isn't valid
-
fwCommit
- Returns:
- the firmware commit without a "-dirty" suffix, for comparing against a release
-