From 1d6ba89136fa8727e62906d1529f181392ed7bc8 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Thu, 10 Oct 2019 11:01:47 -0500 Subject: [PATCH] Small clarifications for finicky compilers. --- g2core/board/gquintic/0_hardware.cpp | 2 +- g2core/stepper.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/g2core/board/gquintic/0_hardware.cpp b/g2core/board/gquintic/0_hardware.cpp index c1ebf03b..9891e41a 100755 --- a/g2core/board/gquintic/0_hardware.cpp +++ b/g2core/board/gquintic/0_hardware.cpp @@ -177,7 +177,7 @@ void _get_id(char *id) char *p = id; const char *uuid = Motate::UUID; - Motate::strncpy(p, uuid, Motate::strlen(uuid)); + Motate::strncpy(p, uuid, strlen(uuid)); } /***** END OF SYSTEM FUNCTIONS *****/ diff --git a/g2core/stepper.cpp b/g2core/stepper.cpp index 2e106c93..2e66aa6f 100644 --- a/g2core/stepper.cpp +++ b/g2core/stepper.cpp @@ -879,7 +879,7 @@ void st_prep_dwell(float milliseconds) { st_pre.block_type = BLOCK_TYPE_DWELL; // we need dwell_ticks to be at least 1 - st_pre.dwell_ticks = std::max((uint32_t)((milliseconds/1000.0) * FREQUENCY_DWELL), 1UL); + st_pre.dwell_ticks = std::max((uint32_t)((milliseconds/1000.0) * FREQUENCY_DWELL), (uint32_t)1UL); st_pre.buffer_state = PREP_BUFFER_OWNED_BY_LOADER; // signal that prep buffer is ready } @@ -1193,11 +1193,13 @@ stat_t st_set_md(nvObj_t *nv) #ifdef __TEXT_MODE +#ifndef COMPILING_ALL_AT_ONCE static const char msg_units0[] = " in"; // used by generic print functions static const char msg_units1[] = " mm"; static const char msg_units2[] = " deg"; static const char *const msg_units[] = { msg_units0, msg_units1, msg_units2 }; #define DEGREE_INDEX 2 +#endif // COMPILING_ALL_AT_ONCE static const char fmt_me[] = "motors energized\n"; static const char fmt_md[] = "motors de-energized\n";