On 03/05/2017 11:54 PM, Jeff Epler wrote: > On Sun, Mar 05, 2017 at 01:47:06PM -0600, Jon Elson wrote: >> And, I get this error : >> >> timestamp=0x00: Invalid type character `*' > The related line in the source is: > src/hal/drivers/hal_ppmc.c:RTAPI_MP_ARRAY_INT(timestamp, MAX_BUS*8, > "bus/slot locations of timestamped encoders"); > due to a technical limitation, the second parameter to > RTAPI_MP_ARRAY_INT must be a literal number, not the result of a > calculation. This limitation is only present for "uspace" builds of > LinuxCNC, and is unfortunately not diagnosed at compile time, but rather > only when the parameter is used. Since MAX_BUS is 3, the fix is to > replace this instance of MAX_BUS*8 with the literal number 24, or do the > harder work of removing this limitation of RTAPI_MP_ARRAY macros on > uspace builds. > > WOW, thanks, Jeff, I would have NEVER figured this out myself. Curiously, it works on a uspace 2.7 system!
> This turns out to be easier to fix than I worried it would be. So, if I do a pull, now, it will contain the fix? I don't see a commit, yet. Maybe, on the other hand, one could do this : #define MAX_BUS 3 #define MAX_CARDS MAX_BUS*8 RTAPI_MP_ARRAY_INT(timestamp, MAX_CARDS, "bus/slot locations of timestamped encoders"); Thanks so much, this one was a bit beyond my level. Jon ------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
