Apply SEC_TO_MS and other fixes

This commit is contained in:
Scott Lahteine
2021-01-25 08:32:58 -06:00
parent fb67b9bdad
commit b8186b5081
10 changed files with 14 additions and 14 deletions

View File

@ -89,9 +89,10 @@
*/
void GcodeSuite::M81() {
thermalManager.disable_all_heaters();
print_job_timer.stop();
planner.finish_and_disable();
print_job_timer.stop();
#if HAS_FAN
thermalManager.zero_fan_speeds();
#if ENABLED(PROBING_FANS_OFF)

View File

@ -119,7 +119,7 @@ void GcodeSuite::M916() {
M91x_counter_max = 256; // KVAL_HOLD is 8 bits
uint8_t M91x_delay_s = parser.byteval('D'); // get delay in seconds
millis_t M91x_delay_ms = M91x_delay_s * 60 * 1000;
millis_t M91x_delay_ms = SEC_TO_MS(M91x_delay_s * 60);
millis_t M91x_delay_end;
DEBUG_ECHOLNPGM(".\n.");

View File

@ -282,7 +282,7 @@ public:
// Code value for use as time
static inline millis_t value_millis() { return value_ulong(); }
static inline millis_t value_millis_from_seconds() { return (millis_t)(value_float() * 1000); }
static inline millis_t value_millis_from_seconds() { return (millis_t)SEC_TO_MS(value_float()); }
// Reduce to fewer bits
static inline int16_t value_int() { return (int16_t)value_long(); }