/* * handleBattery * * The Matrix controller has a separate battery whose voltage can be read. */ protected void handleBattery() { if ((firstBattery) || (spamPrevention.time() > SPAM_PREVENTION_FREQ)) { battery = mc.getBattery(); spamPrevention.reset(); firstBattery = false; } telemetry.addData("Battery: ", ((float) battery / 1000)); }