Announcement

Collapse
No announcement yet.

Bug: inconsistent timing units in Get Competition Mode.vi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug: inconsistent timing units in Get Competition Mode.vi

    Who maintains the LabVIEW WPI Robotics Library? I found a bug today.

    Playing around with the robot program, I wanted to do something based on how long the robot was in a disabled state. The "Disabled Elapsed Seconds" element of the "Match Info" output cluster from Basic Get Mode vi seemed the natural place to get the amount of time the robot spends in disabled.

    Probing that cluster showed something odd. During disabled, the value was obviously in milliseconds, but after disabled it switched to showing seconds. I traced it down to the Get Competition Mode vi, where it uses Tick Count (ms). It explicitly divides by 1000 whenever the mode changes to store the elapsed time in the Match Info cluster, but it uses the raw milliseconds while it's counting during a mode.

    I changed my copy of the vi to be consistent. There's a division by 1000 after the timer delta computation at the bottom left of the "False/False/False/False" nested cases. I added an identical division at the left middle of the "False/False/False/True" case. Now my Match Info values are always in seconds.

  • #2
    Re: Bug: inconsistent timing units in Get Competition Mode.vi

    Good catch. I'm not sure if there will be any more patches this year, but we may put up the single VI and certainly want to fix it for next year.

    Greg McKaskle

    Comment

    Working...
    X