X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=modules%2Fdevices%2Frobot%2Fposition_manager%2Fposition_manager.c;h=a1573a5f3865d7621b04a3efa2763e814bde553e;hp=60ed2609423475e78d7138ad5721f09ffecc4509;hb=b6b61358268cccf0fe5cd3f808ceab6b8402b74c;hpb=0b7e368f3918ec09a82f73ed2f2a86a4a6957ee0 diff --git a/modules/devices/robot/position_manager/position_manager.c b/modules/devices/robot/position_manager/position_manager.c index 60ed260..a1573a5 100644 --- a/modules/devices/robot/position_manager/position_manager.c +++ b/modules/devices/robot/position_manager/position_manager.c @@ -35,16 +35,16 @@ void position_init(struct robot_position *pos) } /** Set a new robot position */ -void position_set(struct robot_position *pos, int16_t x, int16_t y, int16_t a) +void position_set(struct robot_position *pos, int16_t x, int16_t y, double a_deg) { uint8_t flags; IRQ_LOCK(flags); - pos->pos_d.a = ((double)a * M_PI)/ 180.0; + pos->pos_d.a = (a_deg * M_PI)/ 180.0; pos->pos_d.x = x; pos->pos_d.y = y; pos->pos_s16.x = x; pos->pos_s16.y = y; - pos->pos_s16.a = a; + pos->pos_s16.a = a_deg; IRQ_UNLOCK(flags); }