Announcement

Collapse
No announcement yet.

Robot Randomly Running Old Code

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

  • Robot Randomly Running Old Code

    While making programming changes we will make a change in the code and then test out that code a few times on the robot. Sometimes out of random the robot will run a previous program we had already overwritten. For example if we had code that drove the robot straight for 5 seconds and stopped and then later made changes to that code to add in a turn in the beginning, we would be testing that new code and then all of a sudden it would just go back to the previous version and run the straight for 5 seconds and stop.

    Is there a "history" that is stored in the phone that it might grab an old revision of a program we wrote and if so how do we clear that out?

    Thanks!

  • #2
    Uninstalling the app prior to installing the new app will force a clean install. However, it will take much longer than usual.

    The easiest way to avoid this is to watch the Android Studio build process. If it doesn't successfully download the APK, it didn't update.

    Comment


    • #3
      We suspect that a recent addition to Android Studio may be causing the problem.

      It typically occurs when you load a new program version, when the old one is still running and connected.

      One way to minimize the problem is to turn OFF instant run...

      Once your project is open in Android Studios... use the main menu to select:
      file/settings/Build-Execution-Deployment/Instant Run Un-select "Enable"


      If this doesn't help, then (as previously mentioned) the sure fire way to force a re-load of the code is to uninstall the old version manually...
      Just use settings/apps select the FTC Robot Controller app and click uninstall.
      If you have to do this, the next time you run, you'll have to select the active robot configuration, and you'll probably get a slew of those Device Association popups.

      Comment


      • #4
        Thanks for the response! We will try this out as we would hate for it to run old code at a competition.

        Comment

        Working...
        X