Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
10d855cb
Commit
10d855cb
authored
Feb 4, 2019
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Sanity check USER_GCODE formatting
parent
d97bb4c4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/inc/SanityCheck.h
+23
-0
23 additions, 0 deletions
Marlin/src/inc/SanityCheck.h
with
23 additions
and
0 deletions
Marlin/src/inc/SanityCheck.h
+
23
−
0
View file @
10d855cb
...
...
@@ -2024,6 +2024,29 @@ static_assert(sanity_arr_3[0] > 0 && sanity_arr_3[1] > 0 && sanity_arr_3[2] > 0
#error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
#endif
#if ENABLED(CUSTOM_USER_MENUS)
#ifdef USER_GCODE_1
constexpr
char
_chr1
=
USER_GCODE_1
[
strlen
(
USER_GCODE_1
)
-
1
];
static_assert
(
_chr1
!=
'\n'
&&
_chr1
!=
'\r'
,
"USER_GCODE_1 cannot have a newline at the end. Please remove it."
);
#endif
#ifdef USER_GCODE_2
constexpr
char
_chr2
=
USER_GCODE_2
[
strlen
(
USER_GCODE_2
)
-
1
];
static_assert
(
_chr2
!=
'\n'
&&
_chr2
!=
'\r'
,
"USER_GCODE_2 cannot have a newline at the end. Please remove it."
);
#endif
#ifdef USER_GCODE_3
constexpr
char
_chr3
=
USER_GCODE_3
[
strlen
(
USER_GCODE_3
)
-
1
];
static_assert
(
_chr3
!=
'\n'
&&
_chr3
!=
'\r'
,
"USER_GCODE_3 cannot have a newline at the end. Please remove it."
);
#endif
#ifdef USER_GCODE_4
constexpr
char
_chr4
=
USER_GCODE_4
[
strlen
(
USER_GCODE_4
)
-
1
];
static_assert
(
_chr4
!=
'\n'
&&
_chr4
!=
'\r'
,
"USER_GCODE_4 cannot have a newline at the end. Please remove it."
);
#endif
#ifdef USER_GCODE_5
constexpr
char
_chr5
=
USER_GCODE_5
[
strlen
(
USER_GCODE_5
)
-
1
];
static_assert
(
_chr5
!=
'\n'
&&
_chr5
!=
'\r'
,
"USER_GCODE_5 cannot have a newline at the end. Please remove it."
);
#endif
#endif
#if ENABLED(BACKLASH_COMPENSATION) && IS_CORE
#error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
#endif
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment