From f58fec87b270bf772c44cd697f90d7c2aa1260f1 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Thu, 3 May 2012 23:58:55 +0200 Subject: digital/beacon: laser_get_angle can be returned in raw format or in degree --- digital/beacon/src/laser.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'digital/beacon/src/laser.c') diff --git a/digital/beacon/src/laser.c b/digital/beacon/src/laser.c index 232ff229..4bd78c5c 100644 --- a/digital/beacon/src/laser.c +++ b/digital/beacon/src/laser.c @@ -91,14 +91,21 @@ void laser_engage_angle_confirmation(uint16_t value) } -/* This function returns the angle value */ -uint16_t laser_get_angle(void) +/* This function returns the angle value in raw format */ +uint16_t laser_get_angle_raw(void) { + uprintf("valeur de laser_get_angle_raw() = %d\r\n",laser.angle); return laser.angle; } +/* This function returns the angle value in degree */ +float laser_get_angle_degree(void) +{ + return codewheel_convert_angle_raw2degrees(laser.angle); +} + -/* This function sets the angle value */ +/* This function sets the angle value in raw format */ void laser_set_angle(uint16_t angle) { laser.angle = angle; -- cgit v1.2.3