From e28544863a991dc6c9d7bd25351096c905759c97 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 11 Nov 2014 15:37:48 +0100 Subject: ui: Simplify accel --- ui.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui.c b/ui.c index 6d32031..408724f 100644 --- a/ui.c +++ b/ui.c @@ -257,8 +257,7 @@ static void doAlarm () { */ static void doInit () { /* get initial orientation */ - h = accelGetHorizon (); - if (h != HORIZON_NONE) { + if (horizonChanged && h != HORIZON_NONE) { puts ("init->idle"); enterIdle (); -- cgit v1.2.3