1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Apply changes on trailing edges only.

This commit is contained in:
Thomas Harte 2023-12-22 18:38:43 -05:00
parent 66bc1fd6fd
commit 54f1c31c94

View File

@ -175,8 +175,8 @@ void Chipset::DiskController::set_mtr_sel_side_dir_step(uint8_t value) {
const bool is_selected = !(value & select_mask);
// Both the motor state and the ID shifter are affected upon
// changes in drive selection only.
if(difference & select_mask) {
// the trailing edge of changes in drive selection only.
if(difference & select_mask & ~value) {
// If transitioning to inactive, shift the drive ID value;
// if transitioning to active, possibly reset the drive
// ID and definitely latch the new motor state.