Spindle/coolant rare bug fixes. Free more flash.

[new] Altered the way default settings are stored and restored. Saved about 300 bytes(!) of flashed size. Should free up enough for certain configurations of CoreXY machines.

[fix] When the optional M7 mist coolant IO was enabled, coolant overrides was not disabling correctly.

[fix] Coolant override states was not restored correctly after a parking motion in certain situations. It would restore programmed state, rather than current overridden state.

[fix] Now allow coolant overrides to operate during jogging motion.

[fix] Invert control pin mask typo.

[new] Added a new build info feedback mechanism for enabling the safety door input pin.
This commit is contained in:
Sonny Jeon 2018-06-14 10:10:58 -06:00
parent a84aa1800c
commit 332acada88
13 changed files with 157 additions and 112 deletions

View file

@ -268,10 +268,10 @@ uint8_t gc_execute_line(char *line)
word_bit = MODAL_GROUP_M8;
switch(int_value) {
#ifdef ENABLE_M7
case 7: gc_block.modal.coolant = COOLANT_MIST_ENABLE; break;
case 7: gc_block.modal.coolant |= COOLANT_MIST_ENABLE; break;
#endif
case 8: gc_block.modal.coolant = COOLANT_FLOOD_ENABLE; break;
case 9: gc_block.modal.coolant = COOLANT_DISABLE; break;
case 8: gc_block.modal.coolant |= COOLANT_FLOOD_ENABLE; break;
case 9: gc_block.modal.coolant = COOLANT_DISABLE; break; // M9 disables both M7 and M8.
}
break;
#ifdef ENABLE_PARKING_OVERRIDE_CONTROL
@ -953,8 +953,7 @@ uint8_t gc_execute_line(char *line)
// NOTE: Coolant M-codes are modal. Only one command per line is allowed. But, multiple states
// can exist at the same time, while coolant disable clears all states.
coolant_sync(gc_block.modal.coolant);
if (gc_block.modal.coolant == COOLANT_DISABLE) { gc_state.modal.coolant = COOLANT_DISABLE; }
else { gc_state.modal.coolant |= gc_block.modal.coolant; }
gc_state.modal.coolant = gc_block.modal.coolant;
}
pl_data->condition |= gc_state.modal.coolant; // Set condition flag for planner use.