altos: Rename ao_orient to ao_sample_orient
authorKeith Packard <keithp@keithp.com>
Mon, 28 Oct 2013 06:23:59 +0000 (23:23 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 28 Oct 2013 06:25:31 +0000 (23:25 -0700)
Keeps it clear where this name comes from.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_pyro.c
src/core/ao_sample.c

index 24c9fe99cc04bf758f70031e2dbe74373a692b9e..a260aa99f332cbaf7324e7e63f67956fb241719c 100644 (file)
@@ -115,11 +115,11 @@ ao_pyro_ready(struct ao_pyro *pyro)
 
 #if HAS_GYRO
                case ao_pyro_orient_less:
-                       if (ao_orient <= pyro->orient_less)
+                       if (ao_sample_orient <= pyro->orient_less)
                                continue;
                        break;
                case ao_pyro_orient_greater:
-                       if (ao_orient >= pyro->orient_greater)
+                       if (ao_sample_orient >= pyro->orient_greater)
                                continue;
                        break;
 #endif
index a9d50cb2535c528947d4cc3fb0f8b8aa06df5828..47c5ea2e3660d15d0dcb4d526c1136653bb729e5 100644 (file)
@@ -48,7 +48,7 @@ __pdata accel_t               ao_sample_accel_through;
 __pdata gyro_t         ao_sample_roll;
 __pdata gyro_t         ao_sample_pitch;
 __pdata gyro_t         ao_sample_yaw;
-__pdata angle_t                ao_orient;
+__pdata angle_t                ao_sample_orient;
 #endif
 
 __data uint8_t         ao_sample_data;
@@ -134,7 +134,7 @@ ao_sample_preflight_set(void)
        ao_sample_pitch_sum = 0;
        ao_sample_yaw_sum = 0;
        ao_sample_roll_sum = 0;
-       ao_orient = 0;
+       ao_sample_orient = 0;
 
        /* No rotation yet */
        ao_quaternion_init_zero_rotation(&ao_rotation);
@@ -212,7 +212,7 @@ ao_sample_rotate(void)
 
        ao_quaternion_rotate(&point, &ao_pad_orientation, &ao_rotation);
 
-       ao_orient = acosf(point.z) * (float) (180.0/M_PI);
+       ao_sample_orient = acosf(rotz) * (float) (180.0/M_PI);
 }
 #endif
 
@@ -349,7 +349,7 @@ ao_sample_init(void)
        ao_sample_pitch = 0;
        ao_sample_yaw = 0;
        ao_sample_roll = 0;
-       ao_orient = 0;
+       ao_sample_orient = 0;
 #endif
        ao_sample_data = ao_data_head;
        ao_preflight = TRUE;