Announcement

Collapse
No announcement yet.

OnBot hardware library different than Android Studio

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

  • OnBot hardware library different than Android Studio

    Have only worked with AS in the past but looking at OnBot. One thing that jumps out is an apparent difference between the imported libraries in the two environments, indicating a difference in the FTC SDK as downloaded and used with AS and what is embedded in OnBot.

    An example is the Servo class. AS compiles Servo.MAX_POSITION no problem. OnBot flags MAX_POSITION as unknown in the Servo class.

    So how do the library classes used by OnBot differ from those used by AS in the SDK download? Is OnBot separate in some manner from the controller app compiled with AS? Any doc on how OnBot is implemented would be helpful.

    A related topic is intellisense. OnBot does not seem to support intellisense yet sometimes I see a drop down list appear as if OnBot is trying to do intellisense but the offerings don't seem to make sense in terms of where the cursor is located when the drop down appears.

  • #2
    Originally posted by Crossle86 View Post
    Is OnBot separate in some manner from the controller app compiled with AS?
    Yes. OnBotJava compiles your OpMode right on the phone using javac. As such, it needs the source files for the parts of the SDK that the user will be using in their OpMode. Thus, those parts of the SDK are included in a source code JAR file, onbotjava-classes.jar, which is bundled inside the RobotCore AAR file.

    Originally posted by Crossle86 View Post
    A related topic is intellisense. OnBot does not seem to support intellisense yet sometimes I see a drop down list appear as if OnBot is trying to do intellisense but the offerings don't seem to make sense in terms of where the cursor is located when the drop down appears.
    OnBot autocomplete is garbage. Honestly if you're already familiar with Android Studio, why are you looking at OnBot at all? You can perform wireless downloads from Android Studio. Also, Android Studio gives you support for version control, external libraries, smart refactoring tools, and of course the excellent intellisense.

    Comment


    • #3
      Oops, my apologies, my memory failed me. The onbotjava-classes.jar is not a source code JAR, it is a compiled JAR.

      Comment


      • #4
        Originally posted by 4634 Programmer View Post

        Yes. OnBotJava compiles your OpMode right on the phone using javac. As such, it needs the source files for the parts of the SDK that the user will be using in their OpMode. Thus, those parts of the SDK are included in a source code JAR file, onbotjava-classes.jar, which is bundled inside the RobotCore AAR file.



        OnBot autocomplete is garbage. Honestly if you're already familiar with Android Studio, why are you looking at OnBot at all? You can perform wireless downloads from Android Studio. Also, Android Studio gives you support for version control, external libraries, smart refactoring tools, and of course the excellent intellisense.
        How long does your wireless download take? On my computer it is intolerably slow, I use usb because of that. I do most of my work in AS, then (when I think of it) load the opmode onto Onbot to tweak.

        Comment


        • #5
          Originally posted by 3805Mentor View Post

          How long does your wireless download take? On my computer it is intolerably slow, I use usb because of that. I do most of my work in AS, then (when I think of it) load the opmode onto Onbot to tweak.
          In Relic Recovery I had sub-10-second wireless downloads with OpenRC Turbo. Unfortunately OpenRC never got upgraded to v4.x because... reasons. Nonetheless, wireless downloads with the full SDK this past year weren't too bad, I never actually timed it though.

          Comment


          • #6
            Thanks 4634, that helps. The reason to look at OnBot is a room full of 8th graders of widely varying skill and interest. AS has proved a difficult way to handle that situation but our teachers have had better luck using OnBot. Thus I am integrating the use of OnBot into our curriculum. However, it is a significant problem that our example code set won't compile in both environments. This seems to me to be a serious problem with OnBot and I'd hope someone at FIRST who works on OnBot would address this.

            Comment


            • #7
              An update to this post. The SDK team has identified this problem as an issue with the embedded form of the SDK that is sent to the phone as a resource. It is out of sync with the "full" SDK. They plan to have this fixed in v5.1 later this summer.

              Comment

              Working...
              X