Problem with arduino quadricopter code

Hi all :slight_smile:

It’s the first time I write here loocking for help…I’ve started only by a few weeks with arduino…

I’m trying to realize the code for an arduino quadricopter…I already realized the library but I’ve encountered a few problem…

here the console errors:

Drone:6: error: new types may not be defined in a return type
Drone.ino:6: note: (perhaps a semicolon is missing after the definition of ‘Quadricopter’)
Drone:6: error: two or more data types in declaration of ‘setup’
Drone.ino: In function ‘void loop()’:
Drone:21: error: switch quantity not an integer

except for the last error (the one on line 21) I can’t understand what is wrong…

thanks for any help you can give me, and sorry for english error I can have made…

Drone.ino (1.54 KB)

Quadricopter.cpp (1.7 KB)

Quadricopter.h (910 Bytes)

Class declarations end with a semicolon. Yours does not.

Right…I solved it…but I’m getting the same errors…
I’ve modified a little the code by deleting the pointer…but it doesn’t change anything…

Quadricopter.cpp (1.7 KB)

Quadricopter.h (915 Bytes)

Drone.ino (1.54 KB)

In several places you wrote 'costrain' when you meant 'constrain'. Spelling counts.

In the constructor you used "this." when you should have been using "this->".

After fixing those two errors it compiled for me.

The messages I get now are NOT the same messages I got earlier when I debugged your code. Why do you have so MUCH code that doesn't compile?

Why can't you spell constrain properly?

this is a pointer. You MUST use pointer notation (->), not object notation (.) to access members.