Lines Matching refs:uhdev
40 uhdev = self.uhdev
41 evdev = uhdev.get_evdev("Accelerometer")
44 r = uhdev.event(accel=(x, None, None))
45 events = uhdev.next_sync_events("Accelerometer")
46 self.debug_reports(r, uhdev, events)
55 r = uhdev.event(accel=(None, y, None))
56 events = uhdev.next_sync_events("Accelerometer")
57 self.debug_reports(r, uhdev, events)
64 r = uhdev.event(accel=(None, None, z))
65 events = uhdev.next_sync_events("Accelerometer")
66 self.debug_reports(r, uhdev, events)
73 uhdev = self.uhdev
74 evdev = uhdev.get_evdev("Accelerometer")
77 r = uhdev.event(gyro=(rx, None, None))
78 events = uhdev.next_sync_events("Accelerometer")
79 self.debug_reports(r, uhdev, events)
88 r = uhdev.event(gyro=(None, ry, None))
89 events = uhdev.next_sync_events("Accelerometer")
90 self.debug_reports(r, uhdev, events)
97 r = uhdev.event(gyro=(None, None, rz))
98 events = uhdev.next_sync_events("Accelerometer")
99 self.debug_reports(r, uhdev, events)
106 uhdev = self.uhdev
108 assert uhdev.power_supply_class is not None
113 uhdev.battery.capacity = i
114 uhdev.event()
115 assert uhdev.power_supply_class.capacity == i
118 if uhdev.bus == BusType.BLUETOOTH:
119 uhdev.battery.cable_connected = False
120 uhdev.battery.capacity = 45
121 uhdev.event()
122 assert uhdev.power_supply_class.status == "Discharging"
124 uhdev.battery.cable_connected = True
125 uhdev.battery.capacity = 5
126 uhdev.event()
127 assert uhdev.power_supply_class.status == "Charging"
129 uhdev.battery.capacity = 100
130 uhdev.event()
131 assert uhdev.power_supply_class.status == "Charging"
133 uhdev.battery.full = True
134 uhdev.event()
135 assert uhdev.power_supply_class.status == "Full"
140 uhdev = self.uhdev
141 evdev = uhdev.get_evdev("Touch Pad")
144 r = uhdev.event(touch=[t0])
145 events = uhdev.next_sync_events("Touch Pad")
146 self.debug_reports(r, uhdev, events)
154 r = uhdev.event(touch=[t0])
155 events = uhdev.next_sync_events("Touch Pad")
156 self.debug_reports(r, uhdev, events)
166 uhdev = self.uhdev
167 evdev = uhdev.get_evdev("Touch Pad")
172 r = uhdev.event(touch=[t0])
173 events = uhdev.next_sync_events("Touch Pad")
174 self.debug_reports(r, uhdev, events)
183 r = uhdev.event(touch=[t0, t1])
184 events = uhdev.next_sync_events("Touch Pad")
185 self.debug_reports(r, uhdev, events)
202 r = uhdev.event(touch=[t0, t1])
203 events = uhdev.next_sync_events("Touch Pad")
204 self.debug_reports(r, uhdev, events)
211 r = uhdev.event(touch=[t1])
213 events = uhdev.next_sync_events("Touch Pad")
214 self.debug_reports(r, uhdev, events)
233 while self.uhdev.dispatch(10):
237 for k, v in self.uhdev.led_classes.items():
242 assert self.uhdev.hw_leds.get_led(idx)[0] == bool(v.brightness)
245 self.uhdev.dispatch(10)
246 assert self.uhdev.hw_leds.get_led(idx)[0] is False
249 self.uhdev.dispatch(10)
250 assert self.uhdev.hw_leds.get_led(idx)[0]