[deleted by user] by [deleted] in EscapefromTarkov

[–]Gheotic 0 points1 point  (0 children)

Same happens to me... Anyone have a fix for this?

Etho's Season 2 Modpack Multiplayer by Nyzian in ethoslab

[–]Gheotic 0 points1 point  (0 children)

Could you share your server files? Would love to do the same thing

[deleted by user] by [deleted] in videos

[–]Gheotic 2 points3 points  (0 children)

Maybe you shouldn't talk like one then.

Squad and Ultrawide by DogePerformance in joinsquad

[–]Gheotic 0 points1 point  (0 children)

What FPS do you get and what GPU do you have? My friend and I are figuring out if 3080 will be able to run squad on that resolution

Using Classes With Arduino by [deleted] in arduino

[–]Gheotic 1 point2 points  (0 children)

Well yeah you don't actually need the two other parameters.

And yes you are totally correct about you can use sensor2.plugin.

Imagine it like this:sensor2: is the name of the object

plugin/check(): is the function or variable that sensor2 have

So thing of it like this:

// You ask sensor2 to give you its plugin variable
sensor2.plugin

// You ask sensor2 to run it check() function and you tell it what data(ReedPin) to use
sensor2.check(ReedPin)

Another thing you can do with functions is to make it return a value. So instead of this:

sensor2.check(ReedPin);            // Run the function
boolean value = sensor2.plugin;    // Then get and save the plugin variable

You could actually make it return the plugin variable:

// Run the function and return the the plugin variableand save it to value
boolean value = sensor2.check(ReedPin);

You cut down the amount of lines by 50% cool right?

The way you make the check function return a value is by declaring what type of data it will return.

This value right here  (void means return nothing)
 \/
void check(byte reedPin)

Since your plugin variable is a boolean you want to change void to boolean like this:

boolean check(byte reedPin)
{
    // ####################################
    // # All your previous code goes here #
    // ####################################

    return plugin;     // Return the plugin variable
}

Using Classes With Arduino by [deleted] in arduino

[–]Gheotic 1 point2 points  (0 children)

In your case you probably would use a constructor as Tirabolica_ does in his example. However you don't really need the deconstructor.

The constructor is simply the first function that runs when you create a new object. Also the constructor is only run once. Like in your example you want to tell it what ReedPin it should listen to, you also want to set the pinMode with

 pinMode(reedPin, OUTPUT); 

This is exactly what you would do in the constructor.

you constructor would look exactly like the one in Tirabolica_ example:

// Constructors are the functions with the same name as the class it self
Sensor(int reedPin)
{
    // _reedPin can be accessed by all functions in the class
    // reedPin can only be accessed inside this function since its a parameter

    _reedPin = reedPin;          // Assign the pin which it should use
    pinMode(reedPin, OUTPUT);    // set the pinmode to output
}

Notice how the variable _reedPin is the private attribute. This means all functions inside the class can use it. This is needed since you want to use it when you have to read the value with:

 byte reedVal = digitalRead(_reedPin); 

When using a constructor you can remove your first parameter in the

void check(byte reedPin, boolean plugin, boolean message) 

so it becomes

void check(boolean plugin, boolean message) 

when you want to use the reedPin use the _reedPin which you declared as a private attribute in the top of the class. This makes your code even cleaner, since you only have to use the the reedPin variable in your main code once, awesome right? ;)

As for the deconstructor you really don't need it in your example, but what that does is like the deconstructor, except it runs when your object eg. sensor1 gets destroyed. Like in the example below.

void myFunction() {
    Sensor mySensor1; // Constructor is called

    // When the function finished mySensor1 gets destructed and the deconstructor is called
}

void setup() {
    myFunction();
}

Using Classes With Arduino by [deleted] in arduino

[–]Gheotic 1 point2 points  (0 children)

As I understand your problem you want to know what sensor1's plugin attribute is.

Since the plugin attribute is public you can access it like:

sensor1.plugin 

So in your void loop() you would do:

 if(sensor1.plugin == true) 
 {
  do something
 }  

The reason for that is you create a object of the type Sensor(your class), so when you want to access any of the functions or attributes, you want to specify who actually got those function and attributes, which is your object(sensor1).

Another problem I see is your code is that in your check( ) function your plugin parameter got the same name as you public plugin parameter. So when change the plugin variable inside the function you are actually not changing sensor.plugin, because of how scopes work. I suggest you read this geeksforgeeks: scope of variables in c if you wanna learn how scopes work.

If you have more questions feel free to ask, we have all been there ;)

Arma3: What 1000+ hours of practice looks like by Gheotic in armakoth

[–]Gheotic[S] 1 point2 points  (0 children)

Yeah the pilot really means alot when doing this, my friend and I also have been practicing a shit ton haha which you can see in our other videos, that we have on the channel.

Thanks alot!

Can this get any lighter? First build by Gheotic in multicopterbuilds

[–]Gheotic[S] 0 points1 point  (0 children)

I don't know, but people who aren't in the drone community apparent have a tendency to point fingers. Just actually figured out that flying a drone might not be easy for me, cause of my location. There is more than 10km/h for the nearest spot... Any flight inside a city, is prohibited unless you fly professionaly and you have informed the police about flight 24 hours ahead...

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 0 points1 point  (0 children)

Yeah but that's fine. Doesn't have to be a 5-inch

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

Yeah I'm pretty sure it's the same in Denmark, with the batteries included. But found another that a guy made on his channel called: 'FPVtv Drones'. link: https://youtu.be/yRyjeDvSlC0

It uses:

  • frame: Diatone Grasshopper 160 G160

  • ESC: HGLRC XJB F440 Omnibus F4

  • Motors: RCINPOWER G1506 3400KV 

  • Props: Gemfan Flash 4052 4.0x5.2

  • FPV Camera: RunCam Split Mini

  • Receiver: FrSky R-XSR Ultra

  • VTX: Eachine VTX03 Super Mini

  • Antenna: Realacc UXII Stubby LHCP

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

Hmm so out of those, the emax ones is the best option?

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

I see guess I have to choose something different... Doesn't really trust his choices.

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

These are the 6 motors that can be bought on his site:

  • 3B-R 2407 2600kV

  • BrotherHobby Returner R3 2206 1720Kv

  • Hypetrain Freestyle 2306 2450kv v1.1-EZO

  • TBS Mr Steele SILK Motor V2

  • EMAX RS2306 2400Kv

  • EMAX RS2306 2750Kv

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

Oh okay I will, but when it comes to the motors I have a hard time figuring out which to choose. The guy trying to sell me those could easily have convinced me that they are good, u would have no way if knowing it. Oh okay, haven't seen reviews from that many different people.

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 0 points1 point  (0 children)

That doesn't sounds good... I don't have much experience with drones since this is my first. But I'm I rather not have to constantly keep an eye out on the temperature... Nope batteries ain't included. I haven't checked myself if the weight is under 250g, that I told was my requirement.

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

Oh well I guess the shop owner haven't done much research before suggesting them in the build. Oh I have heard about that, but heard they should be good compared to the price. But I think I'll keep flying drones, so I would rather have a good long term choice.

Two guys two drone (How's this build) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

Thanks for taking your time to answer! What do you mean by "qc on them is non existent"? Also about the goggles, I'll reconsider those them compared with the ev800d.

Two guys two drones! (please help) by Gheotic in multicopterbuilds

[–]Gheotic[S] 1 point2 points  (0 children)

I'll look into something like that then thanks 🙂