diff options
Diffstat (limited to 'common/motion_orientation.c')
-rw-r--r-- | common/motion_orientation.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/motion_orientation.c b/common/motion_orientation.c index 9a20ff8499..1c52fe847e 100644 --- a/common/motion_orientation.c +++ b/common/motion_orientation.c @@ -1,4 +1,4 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. +/* Copyright 2020 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -18,9 +18,9 @@ static const intv3_t orientation_modes[] = { [MOTIONSENSE_ORIENTATION_UPSIDE_DOWN_LANDSCAPE] = { 0, 1, 0 }, }; -enum motionsensor_orientation motion_orientation_remap( - const struct motion_sensor_t *s, - enum motionsensor_orientation orientation) +enum motionsensor_orientation +motion_orientation_remap(const struct motion_sensor_t *s, + enum motionsensor_orientation orientation) { enum motionsensor_orientation rotated_orientation; const intv3_t *orientation_v; @@ -31,7 +31,8 @@ enum motionsensor_orientation motion_orientation_remap( orientation_v = &orientation_modes[orientation]; rotate(*orientation_v, *s->rot_standard_ref, rotated_orientation_v); - rotated_orientation = ((2 * rotated_orientation_v[1] + - rotated_orientation_v[0] + 4) % 5); + rotated_orientation = + ((2 * rotated_orientation_v[1] + rotated_orientation_v[0] + 4) % + 5); return rotated_orientation; } |