• yetAnotherUser@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    6 hours ago

    The functions just store all variables in a globally accessible JSON file. Compartmentalization is for programmers that aren’t capable of writing bug-free code.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      41 minutes ago

      While writing the comment above, I was thinking that there are some uncivilized languages that allow you to call functions in the same class without an explicit self.dont() or this.dont(), so technically you can magically transfer data like that.

      But having a variable goingToCrashIntoEachOther in a class would be a bit weird.

    • filcuk@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      5 hours ago

      The only logical way to coordinate multiple drones like this is to store the json on a local nas and have them take turns updating their vectors within

      • yetAnotherUser@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        5 hours ago

        I was thinking the drones would use Bluetooth to send the modified json to each other which negates the need for a NAS.

        Of course, two different drones may have modified the json nearly simultaneously so the json would need to be timestamped and the earlier timestamp overrules the later one in case of merge conflicts.