fromRobot static method

PowerSensor fromRobot(
  1. RobotClient robot,
  2. String name
)

Get the PowerSensor named name from the provided robot.

final myPowerSensor = PowerSensor.fromRobot(myRobotClient, "my_power_sensor");

For more information, see Power Sensor component.

Implementation

static PowerSensor fromRobot(RobotClient robot, String name) {
  return robot.getResource(PowerSensor.getResourceName(name));
}