summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-27 23:23:59 -0700
committerKeith Packard <keithp@keithp.com>2013-10-27 23:25:31 -0700
commit58f08c4b3cb9049d0c9cb02cde0d8dbdc3d33920 (patch)
tree8aaf05f114d06dc56c12dbefffad531302487cff
parentc10cb9d31765e6ef0ba737bc484c5aed22a332f9 (diff)
altos: Rename ao_orient to ao_sample_orient
Keeps it clear where this name comes from. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/core/ao_pyro.c4
-rw-r--r--src/core/ao_sample.c8
2 files changed, 6 insertions, 6 deletions
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;