General code cleanup, spacing

master
Scott Lahteine 7 years ago
parent 74d430cb97
commit 9bbc2df217

@ -422,7 +422,9 @@ void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
#define HAS_AXIS_UNHOMED_ERR (ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)))
#if HAS_AXIS_UNHOMED_ERR
bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
#endif

@ -1822,7 +1822,7 @@ static void clean_up_after_endstop_or_probe_move() {
#endif // HAS_BED_PROBE
#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
#if HAS_AXIS_UNHOMED_ERR
bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool z/*=true*/) {
#if ENABLED(HOME_AFTER_DEACTIVATE)

@ -57,8 +57,8 @@ extern const char errormagic[] PROGMEM;
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHOPAIR(name,value) SERIAL_PROTOCOLPAIR(name, value)
#define SERIAL_ECHOLNPAIR(name, value) SERIAL_PROTOCOLLNPAIR(name, value)
#define SERIAL_ECHOPAIR(pre,value) SERIAL_PROTOCOLPAIR(pre, value)
#define SERIAL_ECHOLNPAIR(pre,value) SERIAL_PROTOCOLLNPAIR(pre, value)
#define SERIAL_ECHO_F(x,y) SERIAL_PROTOCOL_F(x,y)
#define SERIAL_ERROR_START() (serialprintPGM(errormagic))
@ -68,10 +68,10 @@ extern const char errormagic[] PROGMEM;
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
// These macros compensate for float imprecision
#define SERIAL_PROTOCOLPAIR_F(name, value) SERIAL_PROTOCOLPAIR(name, FIXFLOAT(value))
#define SERIAL_PROTOCOLLNPAIR_F(name, value) SERIAL_PROTOCOLLNPAIR(name, FIXFLOAT(value))
#define SERIAL_ECHOPAIR_F(name,value) SERIAL_ECHOPAIR(name, FIXFLOAT(value))
#define SERIAL_ECHOLNPAIR_F(name, value) SERIAL_ECHOLNPAIR(name, FIXFLOAT(value))
#define SERIAL_PROTOCOLPAIR_F(pre, value) SERIAL_PROTOCOLPAIR(pre, FIXFLOAT(value))
#define SERIAL_PROTOCOLLNPAIR_F(pre, value) SERIAL_PROTOCOLLNPAIR(pre, FIXFLOAT(value))
#define SERIAL_ECHOPAIR_F(pre,value) SERIAL_ECHOPAIR(pre, FIXFLOAT(value))
#define SERIAL_ECHOLNPAIR_F(pre, value) SERIAL_ECHOLNPAIR(pre, FIXFLOAT(value))
void serial_echopair_P(const char* s_P, const char *v);
void serial_echopair_P(const char* s_P, char v);

@ -1029,11 +1029,11 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
void _lcd_babystep_zoffset_overlay(float zprobe_zoffset) {
void _lcd_babystep_zoffset_overlay(const float zprobe_zoffset) {
// Determine whether the user is raising or lowering the nozzle.
static int dir = 0;
static float old_zprobe_zoffset = 0;
if(zprobe_zoffset != old_zprobe_zoffset) {
if (zprobe_zoffset != old_zprobe_zoffset) {
dir = (zprobe_zoffset > old_zprobe_zoffset) ? 1 : -1;
old_zprobe_zoffset = zprobe_zoffset;
}
@ -1047,21 +1047,21 @@ void kill_screen(const char* lcd_msg) {
#endif
#if ENABLED(USE_BIG_EDIT_FONT)
const int left = 0;
const int right = 45;
const int nozzle = 95;
const int left = 0,
right = 45,
nozzle = 95;
#else
const int left = 5;
const int right = 90;
const int nozzle = 60;
const int left = 5,
right = 90,
nozzle = 60;
#endif
// Draw a representation of the nozzle
if(PAGE_CONTAINS(3,16)) u8g.drawBitmapP(nozzle + 6, 4 - dir,2,12,nozzle_bmp);
if(PAGE_CONTAINS(20,20)) u8g.drawBitmapP(nozzle + 0,20,3,1,offset_bedline_bmp);
if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp);
if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp);
// Draw cw/ccw indicator and up/down arrows.
if(PAGE_CONTAINS(47,62)) {
if (PAGE_CONTAINS(47, 62)) {
u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down);
u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up);
u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp);

Loading…
Cancel
Save