MM-control-01 icon indicating copy to clipboard operation
MM-control-01 copied to clipboard

Delays for manual moving Selector necessary?

Open KarlZeilhofer opened this issue 6 years ago • 5 comments

What are these (annoying) delays of 500ms good for? Normally an action should be triggered, when a button is pressed, or at least, when it was released.

KarlZeilhofer avatar Oct 10 '18 23:10 KarlZeilhofer

void manual_extruder_selector()
{
	shr16_set_led(1 << 2 * (4 - active_extruder));

	if ((Btn::left|Btn::right) & buttonClicked())
	{
		delay(500);

		switch (buttonClicked())
		{
		case Btn::right:
			if (active_extruder < 5)
			{
				select_extruder(active_extruder + 1);
			}
			break;
		case Btn::left:
			if (active_extruder > 0) select_extruder(active_extruder - 1);
			break;

		default:
			break;
		}
		delay(500);
	}
}

KarlZeilhofer avatar Oct 10 '18 23:10 KarlZeilhofer

I'm guessing the later one is to give the extruder selection process time to finish - one could argue this should be done by the select_extruder() function.

The lead in one I don't get at all.

AbeFM avatar Oct 11 '18 06:10 AbeFM

The Functions are all blocking, so thats no argument.

KarlZeilhofer avatar Oct 11 '18 07:10 KarlZeilhofer

debounce function?

FaultyLine avatar Mar 05 '19 06:03 FaultyLine

I often get the button behaving wrong in a light press. Perhaps the read is to short to let the circuit settle, but the MMU buttons often act like one button to the right of the of pressed.

              Thanks!
                      -Abe.

Sent from my "smart"phone, please excuse brevity and Swype-oes

On Mon, Mar 4, 2019, 10:47 PM FaultyLine [email protected] wrote:

debounce function?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/prusa3d/MM-control-01/issues/56#issuecomment-469560922, or mute the thread https://github.com/notifications/unsubscribe-auth/AAClkWv86PW-Rniw0FgA3_fv-O6ROlvkks5vThMOgaJpZM4XWhyM .

AbeFM avatar Mar 05 '19 16:03 AbeFM