Lines Matching refs:FLAGS
51 FLAGS = flags.FLAGS variable
157 power_monitors = do_import("power_monitors.%s" % FLAGS.power_monitor)
789 if not [f for f in useful_flags if FLAGS.get(f, None) is not None]:
791 print FLAGS.MainModuleHelp()
794 if FLAGS.avg and FLAGS.avg < 0:
798 if FLAGS.voltage is not None:
799 if FLAGS.voltage > 5.5:
804 FLAGS.voltage)
810 if not FLAGS.power_monitor:
815 power_monitors = do_import("power_monitors.%s" % FLAGS.power_monitor)
817 mon = power_monitors.Power_Monitor(device = FLAGS.device)
824 if FLAGS.voltage is not None:
826 if FLAGS.ramp is not None:
827 mon.RampVoltage(mon.start_voltage, FLAGS.voltage)
829 mon.SetVoltage(FLAGS.voltage)
831 if FLAGS.current is not None:
832 mon.SetMaxCurrent(FLAGS.current)
834 if FLAGS.status:
838 if FLAGS.usbpassthrough:
839 if FLAGS.usbpassthrough == "off":
841 elif FLAGS.usbpassthrough == "on":
843 elif FLAGS.usbpassthrough == "auto":
847 sys.exit("bad pass-through flag: %s" % FLAGS.usbpassthrough)
849 if FLAGS.samples:
868 while emitted < FLAGS.samples or FLAGS.samples == -1:
870 need = (native_hz - offset + FLAGS.hz - 1) / FLAGS.hz
878 offset += need * FLAGS.hz
882 if FLAGS.timestamp: print int(time.time()),
884 if FLAGS.avg:
886 if len(history_deque) > FLAGS.avg: history_deque.pop()
907 if FLAGS.run:
908 if not FLAGS.power_monitor:
914 PowerTest.runTests(FLAGS.max_baseline_amps)
937 sys.exit(main(FLAGS(sys.argv)))