Welcome! Log In Create A New Profile

Advanced

Error message: "Marlin\SanityCheck.h:1325:1: error:

Posted by kd6hq 
Error message: "Marlin\SanityCheck.h:1325:1: error:
November 08, 2017 07:01AM
I'm trying to compile Marline ver. 1.1.x (1.1.6) and getting some errors.
If I change the settings back to the basic 4, it compiles, but with 6 fields I get errors.

Error message: "Marlin\SanityCheck.h:1325:1: error: static assertion filed: DEFAULT_MAX_ACCELERATION has too many elements.
I get the same error for all three settings.
What am I missing? Have I stated something incorrectly?

#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 3200, 190.45, 588.17, 357.88 }
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25, 25, 25 }
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000, 10000, 10000 }

SanityCheck.h
/**
* Require 4 or more elements in per-axis initializers
*/
constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT,
sanity_arr_2[] = DEFAULT_MAX_FEEDRATE,
sanity_arr_3[] = DEFAULT_MAX_ACCELERATION;
static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires 4 (or more) elements.");
static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires 4 (or more) elements.");
static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires 4 (or more) elements.");
static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.");
static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
Re: Error message: "Marlin\SanityCheck.h:1325:1: error:
November 08, 2017 08:05AM
Have you changed #define NUM_AXIS from 4 to 6
Re: Error message: "Marlin\SanityCheck.h:1325:1: error:
November 08, 2017 09:14AM
I was unaware of it. I found it in a file called "macros.h" and changed it to 6 but I still
get the same error message. Are there any others that may need changing.
Also I notice that in RC8 it is set to 4 but it compiles ok, so I'm not sure about it.

thanks for responding
Re: Error message: "Marlin\SanityCheck.h:1325:1: error:
November 08, 2017 10:32AM
It took me a while but it turns out I need to change 2 settings
from 4 to 6.
#define NUM_AXIS 6
#define XYZE 6

Thanks for the help. smiling smiley
Sorry, only registered users may post in this forum.

Click here to login