Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache drive select and motor on moving it out of Greaseweazle #53

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrenters
Copy link
Contributor

@mrenters mrenters commented Feb 2, 2025

This change adds caching of the drive select and motor states in Adafruit_FloppyBase since it and its child classes manage these signals.

Update Greaseweazle code to use these new cached versions instead of its own version and only try to stop the motor in a loop() timeout if the drive is currently selected. The existing code may try to move head to track 0 and turn off the motor after a previous greaseweazle command or the last timeout deselected the drive resulting in the operation failing as attempting to seek track 0 will fail unless the drive is first selected. On SA400 drives, the head needs to load before seeks can be done and the track 0 signal becomes active and that makes a clacking sound each time which is unnecessary every few seconds.

@mrenters
Copy link
Contributor Author

mrenters commented Feb 2, 2025

Give me a bit more time before merging as I still want to test a few things.

@jepler jepler marked this pull request as draft February 4, 2025 22:41
@jepler
Copy link
Member

jepler commented Feb 4, 2025

I've converted this PR to a draft, you can mark it "ready for review" whenever you're satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants