Skip to content

get/setRadians misleading #424

Closed
Closed

Description

@karussell

Some minor notes, which I stumbled over when parsing the turn angle from json response in the java client:

  • getRadians should be renamed to getTurnAngle otherwise this is misleading naming. E.g. setRadian(getRadian()) should leave radian unchanged.
  • why are there two methods? .setRadian(deltaInOut).setDirOfRotation(deltaOut)
  • instead of 'double tmpRadian = Math.PI - clockwise * radian; tmpRadian *= clockwise;' shouldn't we do 'double tmpRadian = Math.PI * clockwise - radian;'
  • avoid encoder.K_ROUNDABOUT and use FlagEncoder.K_ROUNDABOUT

assigned @jansoe but of course I also can do this :)

Activity

  1. added this to the 0.5 milestone on May 27, 2015
  2. jansoe commented on May 27, 2015

    @jansoe
    Contributor

    I will do it.

    • rename getRadians to getTurnAngle is important!
    • refactor double tmpRadian = Math.PI * clockwise - radian
    • avoid encoder.K_ROUNDABOUT and use FlagEncoder.K_ROUNDABOUT
    • better documentation

    why are there two methods? .setRadian(deltaInOut).setDirOfRotation(deltaOut)

    set Radian just determines the radian (clockwise) between entrance (in) and exit (out).
    setDirOfRotation determines the driving direction. Thus they need different input.

  3. karussell commented on Jul 28, 2015

    @karussell
    MemberAuthor

    @jansoe do you agree with my changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions