LVGL G-code preview. Legacy MKS WiFi Cura plugin compatibility (#20589)

This commit is contained in:
Victor Oliveira
2020-12-29 01:07:11 -03:00
committed by Scott Lahteine
parent 7b33ceebbb
commit eda5a884c6
5 changed files with 20 additions and 8 deletions

View File

@ -216,6 +216,7 @@
#define ANY_BUTTON(V...) DO(BTNEX,||,V)
#define WITHIN(N,L,H) ((N) >= (L) && (N) <= (H))
#define ISEOL(C) ((C) == '\n' || (C) == '\r')
#define NUMERIC(a) WITHIN(a, '0', '9')
#define DECIMAL(a) (NUMERIC(a) || a == '.')
#define HEXCHR(a) (NUMERIC(a) ? (a) - '0' : WITHIN(a, 'a', 'f') ? ((a) - 'a' + 10) : WITHIN(a, 'A', 'F') ? ((a) - 'A' + 10) : -1)