From: Keith Packard Date: Mon, 28 Oct 2013 06:23:59 +0000 (-0700) Subject: altos: Rename ao_orient to ao_sample_orient X-Git-Tag: 1.2.9.4~32 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=58f08c4b3cb9049d0c9cb02cde0d8dbdc3d33920;hp=c10cb9d31765e6ef0ba737bc484c5aed22a332f9 altos: Rename ao_orient to ao_sample_orient Keeps it clear where this name comes from. Signed-off-by: Keith Packard --- diff --git a/src/core/ao_pyro.c b/src/core/ao_pyro.c index 24c9fe99..a260aa99 100644 --- a/src/core/ao_pyro.c +++ b/src/core/ao_pyro.c @@ -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 diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c index a9d50cb2..47c5ea2e 100644 --- a/src/core/ao_sample.c +++ b/src/core/ao_sample.c @@ -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;