|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
UINTs not working?
Hi! I am a programmer for team 1086, and we were trying to run last years code in eclipse. However, we have 76 errors worth of UINTs not work. Quick sample below of our drive motors. We used the UINTs for all solenoids and motors and sensors on the robot, and don't know why it isn't working in eclipse. Any assistance is thankful. We program in C++. The exact error is
Quote:
Zach Quote:
Last edited by Darkseer54 : 13-01-2015 at 18:42. |
|
#2
|
||||
|
||||
|
Re: UINTs not working?
We noticed this too when we copied in an old gamepad utility class. UINT32 and its ilk are not built-in C++ types; they're part of WPILib. If you dug around you might be able to find a file with "typedef UINT32 unsigned int" or something like that. As best I can tell, WPILib no longer uses the "UINT32" style of names for these types. Now they write them like "uint32_t", which is more typical style for naming custom types.
Technically speaking, C++ types such as "int" do not correspond to a specified amount of memory, although in practice int is always 32-bit. The WPILib people want a more a clear/unambiguous system, so they define their own type names, like UINT32 or uint32_t instead of "unsigned int". There's no reason to use that in your code though; just replace all your UINT's with int or unsigned int. ctrl-f followed by "replace all" is how we did it. Last edited by alopex_rex : 13-01-2015 at 18:50. Reason: edited for clarity |
|
#3
|
|||
|
|||
|
Re: UINTs not working?
Yeah we had the same problem too, Like another poster mentioned, you could just replace the values to unsigned int or include <cstdint> and change them all to uint32_t's if you really want that data type.
|
|
#4
|
||||
|
||||
|
Re: UINTs not working?
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|