35 points

Whoah, coding and algorithms???

permalink
report
reply
5 points
*

I think you mean magic and miracles!

Magnets, how they work?

permalink
report
parent
reply
19 points

For a sufficiently defined “goingToCrashIntoEachOther” and “don’t”, isn’t that basically how it works?

permalink
report
reply
7 points

It definitely should be, but at some point in time, very intelligent people though that this was a Good Thing:

bReadLine(bPort,&arru8NumberList)

permalink
report
parent
reply
5 points

Well, even at that level of abstraction, it’s a bit weird, because goingToCrashIntoEachOther and dont() both need the information from where a collision is going to take place, so you’d expect something to be passed into dont().

Well, and it’s easy to dismiss this stuff as implementation details, but that if-statement needs to run as part of a loop. This loop should probably be on a separate thread, so it doesn’t get blocked by other stuff going on. Which means access to the motors needs to be behind some form of mutex, which it needs to be able to acquire fairly quickly. And then, yeah, those implementation details quickly add up to become the part that’s actually complex.

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
1 point

Couldn’t dont() just be an order to halt and goingToCrashIntoEachOther can be a simple true/false?

So the drones both stop, then start moving and immediately see they will crash into each other so they halt again. Drone version of you go, no no you go

permalink
report
parent
reply
2 points

In my head, the drones were going so fast that just slamming into the brakes wasn’t enough and you’d rather have to dodge. Not sure, if that’s only in my head or if I actually saw the video of these drones a long time ago.

But yeah, if they are going really slow, then that could work.
Maybe you’d even have them back up a bit and then turn at a random angle before trying to continue flying, so you don’t end up in the deadlock you described. 🙃

permalink
report
parent
reply
18 points

; }

permalink
report
reply
9 points
*

Crashes DESTROYED with CODING and ALGORITHMS.

permalink
report
reply
5 points

“big air” is hating these revolutions [spinning fan emoji]

permalink
report
parent
reply
7 points

plsAndThankYou

permalink
report
reply

memes

!memes@lemmy.world

Create post

Community rules

1. Be civil

No trolling, bigotry or other insulting / annoying behaviour

2. No politics

This is non-politics community. For political memes please go to !politicalmemes@lemmy.world

3. No recent reposts

Check for reposts when posting a meme, you can only repost after 1 month

4. No bots

No bots without the express approval of the mods or the admins

5. No Spam/Ads

No advertisements or spam. This is an instance rule and the only way to live.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

Community stats

  • 13K

    Monthly active users

  • 3.7K

    Posts

  • 89K

    Comments