Lines Matching refs:sensor
593 def setPowerOn(self, sensor, powered_on): argument
595 (("ON" if powered_on else "OFF"), sensor))
597 response == "ERR", "Unable to set sensor %s state" % sensor)
598 logging.info("Set %s %s", sensor, ("ON" if powered_on else "OFF"))
602 self, sensor, max_amperes_allowed, baseline_amps, user_request = None): argument
616 sensor, ("Under_Motion" if user_request is not None else "Still")))
620 print ("Running power test on %s under motion." % sensor)
622 print ("Running power test on %s while device is still." % sensor)
625 PowerTest.REQUEST_SENSOR_AVAILABILITY % sensor)
629 test_message = "Sensor %s not available on this platform" % sensor)
634 test_message = "Sensor %s not available on this device" % sensor)
640 self.setPowerOn(sensor, True)
649 response != "OK", "Unable to set sensor %s ON" % sensor)
652 print ("Collecting sensor %s measurements" % sensor)
657 with open("/tmp/cts-power-tests-%s-%s-sensor-data.log" % (sensor,
667 not measurements, "No measurements could be taken for %s" % sensor)