Compiler Issues

Building a delta throttle? Make a thread here to share your progress and ask questions.

Re: Compiler Issues

Postby mike43110 » Sun Jun 14, 2015 5:37 pm

Nemesisghost wrote:You define the reports in the HID Descriptor. I know there are some limitations on how large each report can be, which is one of the reasons I didn't group the axes(something that's not entirely necessary, but is ascetically pleasing in the joystick properties screen). I didn't do multiple reports just because 1 was enough to do what I needed. But it was something I was looking into so I could group my axes.

Here's a good tutorial on how to build HID descriptors & how to align the bits to match. It has a link to the official USB HID documentation, which itself has an HID writing app. That app is what I used to build mine.


Thanks!

I am still going to be 2 months before I can start on my throttle thanks to shipping to my shitty ass country...

So I started to design a joystick to pair it with! Let's face it - self made is better when you can make sure that the parts are what you want. Though finding nice integrated HAT switches is a pain.

I did find a nice 8-way on mouser but I wanted to make sure I could actually set up all the buttons before I actually went and did it... 2 8-ways, 2 4-ways with centre push and I am already out of space if I want to have a 16-bit axis. 3 axis in one report and buttons in the other is my plan.

Figuring out how to do twist on the joystick was quite an interesting problem though! Thrust bearings are my friend for that.

I decided to put twist inside the handle as to minimise the gimbal size though. Now I am waiting on the x-ref update for fusion 360 before I continue. X-refs are really important for my workflow.

Getting further OT: Should I shove the files onto github when done? i.e. Would anyone like a joystick to go with the throttle?
mike43110
 
Posts: 21
Joined: Fri Apr 24, 2015 11:45 pm

Re: Compiler Issues

Postby Thovthe » Thu Jan 07, 2016 2:04 am

mike43110 wrote:Getting further OT: Should I shove the files onto github when done? i.e. Would anyone like a joystick to go with the throttle?


I think it would be good to get everyone's related designs and code on github. Anything that is directly to do with the throttle should be in forks or merged in.
Thovthe
 
Posts: 6
Joined: Tue Mar 17, 2015 10:15 am

Re: Compiler Issues

Postby Thovthe » Thu Jan 07, 2016 4:54 am

I'm throwing this out there just in case anyone want's to lend a novice a hand (though I understand if not). I keep getting this error when I try to compile the sketch with Arduino IDE 1.6.7:

Code: Select all
In file included from C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\USBAPI.h:38:0,

                 from C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:19:

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:54:71: error: 'USB_EP_SIZE' was not declared in this scope

  D_ENDPOINT(USB_ENDPOINT_OUT(CDC_ENDPOINT_OUT),USB_ENDPOINT_TYPE_BULK,USB_EP_SIZE,0),

                                                                       ^

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\USBCore.h:272:22: note: in definition of macro 'D_ENDPOINT'

  { 7, 5, _addr,_attr,_packetSize, _interval }

                      ^

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:55:71: error: 'USB_EP_SIZE' was not declared in this scope

  D_ENDPOINT(USB_ENDPOINT_IN (CDC_ENDPOINT_IN ),USB_ENDPOINT_TYPE_BULK,USB_EP_SIZE,0)

                                                                       ^

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\USBCore.h:272:22: note: in definition of macro 'D_ENDPOINT'

  { 7, 5, _addr,_attr,_packetSize, _interval }

                      ^

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:64:16: error: 'bool CDC_Setup' redeclared as different kind of symbol

 bool CDC_Setup(USBSetup& setup)

                ^

In file included from C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:19:0:

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\USBAPI.h:158:8: error: previous declaration of 'bool CDC_Setup(Setup&)'

 bool   CDC_Setup(Setup& setup);

        ^

C:\Users\Tho1efX\Desktop\arduino-1.6.7\hardware\arduino\avr\cores\arduino\CDC.cpp:64:16: error: 'USBSetup' was not declared in this scope

 bool CDC_Setup(USBSetup& setup)

                ^

exit status 1
Error compiling.


PS: I replaced the three files with files made from the code here.
Thovthe
 
Posts: 6
Joined: Tue Mar 17, 2015 10:15 am

Re: Compiler Issues

Postby Khan » Fri Jun 17, 2016 11:45 pm

Ok, complete noob here, but... I've been having some issues with the older version of arduino so I tried to use this on the newer version.
Now I must say I am a complete layman when it comes to coding and an illiterate at C++ so I really need the "grab my hand and walk me through this" kind of help.

When I try to compile the code, I get this

Code: Select all
Arduino: 1.6.8 (Windows 10), Board: "SparkFun Pro Micro, ATmega32U4 (3.3V, 8 MHz)"

D:\Impressora 3D\DeltaThrottle-master\Code\DeltaThrottle\DeltaThrottle.ino: In function 'void loop()':

DeltaThrottle:103: error: 'Joystick' was not declared in this scope

     Joystick.SetAxis(Joystick_::XAXIS, map(xVal, -100, 100, 0, 255));

     ^

DeltaThrottle:103: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::XAXIS, map(xVal, -100, 100, 0, 255));

                      ^

DeltaThrottle:104: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::YAXIS, map(yVal, -100, 100, 0, 255));

                      ^

DeltaThrottle:105: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::ZAXIS, map(zVal, -100, 100, 0, 255));

                      ^

DeltaThrottle:113: error: 'Joystick' was not declared in this scope

     Joystick.SetAxis(Joystick_::XAXIS, 0);

     ^

DeltaThrottle:113: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::XAXIS, 0);

                      ^

DeltaThrottle:114: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::YAXIS, 0);

                      ^

DeltaThrottle:115: error: 'Joystick_' has not been declared

     Joystick.SetAxis(Joystick_::ZAXIS, 0);

                      ^

DeltaThrottle:123: error: 'Joystick' was not declared in this scope

   Joystick.ReportState();

   ^

exit status 1
'Joystick' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


And I am not sure what to do or how to proceed because I simply have no idea of what is wrong. I tried googling but I simply lack the basics. Please help
Khan
 
Posts: 2
Joined: Fri Jun 17, 2016 11:36 pm

Re: Compiler Issues

Postby jeruw » Tue Jun 21, 2016 3:17 pm

You need to make sure you're using a version of the code that's compatible with newer Arduino IDEs for one. The original code on GitHub isn't compatible with newer versions. Check some of the threads here for information and links to a fork with updated code. Also, make sure you're following the instructions and getting the extra libraries put in the proper place. It looks like the stuff from here isn't being found: https://github.com/zdayton/DeltaThrottl ... aster/Code
jeruw
 
Posts: 80
Joined: Tue Feb 17, 2015 3:10 pm

Previous

Return to Build progress and showcase

Who is online

Users browsing this forum: No registered users and 0 guests

cron