diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-05-07 18:30:18 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-05-07 18:30:18 -0700 |
commit | daf5d894ef71c5674e83b11de8b408e3bdabe4c7 (patch) | |
tree | 37ab29946003c4d6b13d5f261c06f0737485241f /tools/orientationplot | |
parent | 59bbef0cd781f4933fd8a0a85b6067f36e529e02 (diff) | |
download | frameworks_base-daf5d894ef71c5674e83b11de8b408e3bdabe4c7.zip frameworks_base-daf5d894ef71c5674e83b11de8b408e3bdabe4c7.tar.gz frameworks_base-daf5d894ef71c5674e83b11de8b408e3bdabe4c7.tar.bz2 |
Small tweaks to orientation.
Improved threshold for detecting external acceleration.
Bug: 5976859
Change-Id: Iaf2298fba8eda72d1cacbb2f3aea72f460a9262f
Diffstat (limited to 'tools/orientationplot')
-rw-r--r-- | tools/orientationplot/README.txt | 12 | ||||
-rwxr-xr-x | tools/orientationplot/orientationplot.py | 8 |
2 files changed, 14 insertions, 6 deletions
diff --git a/tools/orientationplot/README.txt b/tools/orientationplot/README.txt index 0143510..d53f65e 100644 --- a/tools/orientationplot/README.txt +++ b/tools/orientationplot/README.txt @@ -16,15 +16,15 @@ USAGE The tool works by scaping the debug log output from WindowOrientationListener for interesting data and then plotting it. -1. Enable the Window Orientation Listener debugging data log using the - Development Settings in the Dev Tools application (Development.apk). - -2. Plug in the device. Ensure that it is the only device plugged in +1. Plug in the device. Ensure that it is the only device plugged in since this script is of very little brain and will get confused otherwise. -3. Run "orientationplot.py". +2. Enable the Window Orientation Listener debugging data log. + adb shell setprop debug.orientation.log true + adb shell stop + adb shell start -4. When finished, remember to disable the debug log output since it is quite verbose! +3. Run "orientationplot.py". WHAT IT ALL MEANS diff --git a/tools/orientationplot/orientationplot.py b/tools/orientationplot/orientationplot.py index f4e6b45..6fc3922 100755 --- a/tools/orientationplot/orientationplot.py +++ b/tools/orientationplot/orientationplot.py @@ -152,6 +152,7 @@ class Plotter: self.time_until_settled = self._make_timeseries() self.time_until_flat_delay_expired = self._make_timeseries() self.time_until_swing_delay_expired = self._make_timeseries() + self.time_until_acceleration_delay_expired = self._make_timeseries() self.stability_axes = self._add_timeseries_axes( 6, 'Proposal Stability', 'ms', [-10, 600], sharex=shared_axis, @@ -162,6 +163,8 @@ class Plotter: self.stability_axes, 'time until flat delay expired', 'green') self.time_until_swing_delay_expired_line = self._add_timeseries_line( self.stability_axes, 'time until swing delay expired', 'blue') + self.time_until_acceleration_delay_expired_line = self._add_timeseries_line( + self.stability_axes, 'time until acceleration delay expired', 'red') self._add_timeseries_legend(self.stability_axes) self.sample_latency = self._make_timeseries() @@ -253,6 +256,7 @@ class Plotter: self.parse_time_until_settled = None self.parse_time_until_flat_delay_expired = None self.parse_time_until_swing_delay_expired = None + self.parse_time_until_acceleration_delay_expired = None self.parse_sample_latency = None # Update samples. @@ -303,6 +307,7 @@ class Plotter: self.parse_time_until_settled = self._get_following_number(line, 'timeUntilSettledMS=') self.parse_time_until_flat_delay_expired = self._get_following_number(line, 'timeUntilFlatDelayExpiredMS=') self.parse_time_until_swing_delay_expired = self._get_following_number(line, 'timeUntilSwingDelayExpiredMS=') + self.parse_time_until_acceleration_delay_expired = self._get_following_number(line, 'timeUntilAccelerationDelayExpiredMS=') self._append(self.raw_acceleration_x, timeindex, self.parse_raw_acceleration_x) self._append(self.raw_acceleration_y, timeindex, self.parse_raw_acceleration_y) @@ -326,6 +331,7 @@ class Plotter: self._append(self.time_until_settled, timeindex, self.parse_time_until_settled) self._append(self.time_until_flat_delay_expired, timeindex, self.parse_time_until_flat_delay_expired) self._append(self.time_until_swing_delay_expired, timeindex, self.parse_time_until_swing_delay_expired) + self._append(self.time_until_acceleration_delay_expired, timeindex, self.parse_time_until_acceleration_delay_expired) self._append(self.sample_latency, timeindex, self.parse_sample_latency) self._reset_parse_state() @@ -349,6 +355,7 @@ class Plotter: self._scroll(self.time_until_settled, bottom) self._scroll(self.time_until_flat_delay_expired, bottom) self._scroll(self.time_until_swing_delay_expired, bottom) + self._scroll(self.time_until_acceleration_delay_expired, bottom) self._scroll(self.sample_latency, bottom) # Redraw the plots. @@ -368,6 +375,7 @@ class Plotter: self.time_until_settled_line.set_data(self.time_until_settled) self.time_until_flat_delay_expired_line.set_data(self.time_until_flat_delay_expired) self.time_until_swing_delay_expired_line.set_data(self.time_until_swing_delay_expired) + self.time_until_acceleration_delay_expired_line.set_data(self.time_until_acceleration_delay_expired) self.sample_latency_line.set_data(self.sample_latency) self.fig.canvas.draw_idle() |