Announcement

Collapse
No announcement yet.

ftc_http: (a utility for syncing files between computer and OnBot Java)

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

  • ftc_http: (a utility for syncing files between computer and OnBot Java)

    Do you love the speed an convenience of OnBot Java but feel too constrained by the web-based code editor? Would you like to edit source files with your favorite editor, and beam them back and forth to the robot controller without needing to plug in a usb cable? If so, then ftc_http is for you! Our team has developed this tool over the past 3 months and we now feel it is ready to be shared with the wider FTC community.

    Github Repo: https://github.com/TheLostLambda/ftc_http

    Documentation can be found on the above github page, and we've also made a quick tutorial video here:

    https://www.youtube.com/watch?v=gZabYO8g9mU

    We would love your feedback on this, and please share with other teams if you find it useful.

    Team 8969

  • #2
    I've been waiting for someone to create this. I really like the ability to build as well - I wasn't expecting that.

    Comment


    • #3
      Good job on writing this in Rust...

      A helpful hint if you choose to pursue this project further, let JSON be your friend.

      (Note: I am not endorsing nor trying to dissuade anyone from this project, I am just providing a hint towards one of the many directions this can go in)

      Comment


      • #4
        Very good job ! Works without any problem with Android studio. We created external tool for each command so we can push cod3 from menu.

        Comment


        • #5
          Note: if you use this tool with Android Studio, make sure you don't ever actually build and deploy the code (using Android Studio).

          If you have the same opmodes built into the RC APP, as you do in OnBotJava, the system gives priority to one of them and it can get very confusing.
          Even if you have different class names, but leave the Opmode "name" the same, you only get one on the Driver Station.

          Question: Is there a way to Build the code in Android Studio without it trying to deploy to a phone or simulator,,, eg: a Compile without deploy?

          Comment


          • #6
            I believe that Build > Make Project will do that (compile without deploy).

            Comment


            • #7
              Originally posted by Philbot View Post
              Note: if you use this tool with Android Studio, make sure you don't ever actually build and deploy the code (using Android Studio).

              If you have the same opmodes built into the RC APP, as you do in OnBotJava, the system gives priority to one of them and it can get very confusing.
              Even if you have different class names, but leave the Opmode "name" the same, you only get one on the Driver Station.
              ...
              A general rule of thumb is that OnBotJava classes take precedence. Of course, its complicated, so exceptions exist.

              Comment


              • #8
                I feel like if you're going to use OnBot it makes sense to just stick with the robot controller APK as provided by FIRST. As long as you don't connect your robot controller phone with USB or wireless ADB there's no chance of deploying a new version from Android Studio.

                Comment


                • #9
                  Thanks Philbot for caution. That is what we are doing. we have RC app downloaded from google store. We use android studio now just as editor and ver control and use this utility to upload files to RC and compile on RC. works faster that ADB. Now we don't connect RC to Android studio using USB or ADB.

                  Comment


                  • #10
                    Originally posted by Philbot View Post
                    Note: if you use this tool with Android Studio, make sure you don't ever actually build and deploy the code (using Android Studio).

                    If you have the same opmodes built into the RC APP, as you do in OnBotJava, the system gives priority to one of them and it can get very confusing.
                    Even if you have different class names, but leave the Opmode "name" the same, you only get one on the Driver Station.

                    Question: Is there a way to Build the code in Android Studio without it trying to deploy to a phone or simulator,,, eg: a Compile without deploy?

                    build > rebuild project will only compile and not deploy.

                    Comment


                    • #11
                      Our team was very happy to see this, as we are so sick of disconnecting/reconnecting our phone for every change. However, we are not able to get the build step to work. I don

                      Comment


                      • #12
                        Our team was very happy to see this, as we are so sick of disconnecting/reconnecting our phone for every change. However, we are not able to get the build step to work. I do not have the error in front of me (will post more details when we meet tonight), but can anyone suggest the most obvious things to check for when the build fails?

                        We took the following steps:
                        0. Build the project successfully within Android Studio, and download via wire many times successfully. So we know our code SHOULD build with ftc_http.
                        1. Open terminal window inside Android Studio. That puts us at the top directory of our project automatically.
                        2. Run

                        Comment


                        • #13
                          Sorry for the multiple post... apparently the forum does not react well to quote characters in posts...

                          Our team was very happy to see this, as we are so sick of disconnecting/reconnecting our phone for every change. However, we are not able to get the build step to work. I do not have the error in front of me (will post more details when we meet tonight), but can anyone suggest the most obvious things to check for when the build fails?

                          We took the following steps:
                          0. Build the project successfully within Android Studio, and download via wire many times successfully. So we know our code SHOULD build with ftc_http.
                          1. Open terminal window inside Android Studio. That puts us at the top directory of our project automatically.
                          2. Run ftc_http -u. We saw the files go across, no problem there.
                          3. Run ftc_http -b. We saw the build start, but it finished with errors which seemed to indicate that some dependency/library was missing. (I

                          Comment


                          • #14
                            Our team was very happy to see this, as we are so sick of disconnecting/reconnecting our phone for every change. However, we are not able to get the build step to work. I do not have the error in front of me (will post more details when we meet tonight), but can anyone suggest the most obvious things to check for when the build fails?

                            We took the following steps:
                            0. Build the project successfully within Android Studio, and download via wire many times successfully. So we know our code SHOULD build with ftc_http.
                            1. Open terminal window inside Android Studio. That puts us at the top directory of our project automatically.
                            2. Run ftc_http -u. We saw the files go across, no problem there.
                            3. Run ftc_http -b. We saw the build start, but it finished with errors which seemed to indicate that some dependency or library was missing. (I will post more details tonight).

                            The next attempt will be to delete the FTC app from the phone and run http_http -w before making another attempt to download and build. Does anybody have any other suggestions?

                            We are using a Samsung Galaxy 5 phone, if that matters.

                            Thanks for any help, and thanks especially to Lost Lambda for posting this tool!

                            Comment


                            • #15
                              You should not point to project directory of android studio. Point to TeamCode folder only. You will be uploading only teamcode and will get compile on phone like OnBot. If you have additional libraries like OpenCV then you need to build FTC app and deploy it once through AS using usb cable. Assuming after that you are not changing anything in external libraries and your only changes will be in TeamCode then this utility works very well.

                              Comment

                              Working...
                              X