No announcement yet.

Config File for testing different code blocks

  • Filter
  • Time
  • Show
Clear All
new posts

  • Config File for testing different code blocks

    With Android Studio, the hardware map doesn't get called/instantiated until the specific OpMode is used. This makes it easy to test multiple different opmodes all with different configuration needs and they can co-exist within the same code base. With AppInventor, though, it looks like the hardware map is instantiated immediately upon picking an OpMode. This means we have to have a full configuration file even if we only want to test one particular OpMode. When we are dealing with trollbots for testing, they don't have all the motor controllers/servos/etc. Is there any way that we can try to get AppInventor to "defer" instantiation or something? We've tried disabling certain code blocks that call the bits we don't want to use, but that doesn't seem to help, it still wants to instantiate everything upon starting.

    I know we can always create smaller programs and then use the BackPack to copy/paste, but we've run into some problems with that (they're 7th graders and don't always use consistent variable/motor names and that causes problems when pulling blocks back to a main).

    This may not be possible, I'm just hoping someone might have some similar experience with this problem.


  • #2
    The next release of App Inventor will address this problem.
    In the next release, it is not an error to have a hardware component in the project that corresponds to a hardware device that is currently missing from the robot. However, an error will occur when a block is executed that tries to use a hardware device that is missing.


    • #3
      Sounds perfect! Any idea on a time frame for that release?


      • #4
        Soon-ish. :)

        Tom Eng from FIRST is the one who decides when.