-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add optional config for more thread specs, default thread/feed on start #255
base: master
Are you sure you want to change the base?
Conversation
40dc9d9
to
0dda30a
Compare
Here's some accompanying documentation for https://github.com/clough42/electronic-leadscrew/wiki/Configuration-Settings that you can copy in when merging this PR: ## Defaults
There are four `_INDEX` defines that allow you to choose the inch
and metric threads and feeds that are set by default at initialization.
They default to 24TPI inch threads, 0.5mm pitch metric threads,
5 thou inch feed, and .012mm metric feed. There are four tables in
Tables.cpp, and these select the offset in that table. Note that
the index starts at 0, so to default to 1 thou feed, you would
choose `#define INITIAL_INCH_FEED_INDEX 0`.
If you want additional thread specifications in inch or metric,
you can uncomment one or both of these configurations:
`//#define EXTENDED_INCH_THREADS`
`//#define EXTENDED_METRIC_THREADS`
Note that this will require cycling through more intermediate
thread pitches. |
Michael, I am interested in have a default feed rate when I start the controller. From reading your comment above, it looks like what you have implemented. How do I go about getting the code or at least some more specifics on how to implement it in the firmware. I have a fairly good understanding of the C++ language, but am struggling a little on the flow of the program and the variables used. |
This PR makes it easier to select the default rate, but the end of the commit shows where I change it from literal integer indexes to configuration. 0dda30a#diff-9952d6aafa9122f9852bae52a4ccd97a495f3bb3dbde28fdb21c2078cc5fdc01L244 |
Thank you, now I understand what you did. It wasn't clear to me where the able index #s |
Not having a blank between the RPM and the feed rate makes it hard to distinguish the two numbers in practice, especially when a whole number is displayed.
I prefer metric, at least, with leading zero, but I think I'm going to drop all those leading |
0dda30a
to
6b9e60d
Compare
After redesigning my hardware, I have been able to test this. I have not cut the full gamut of pitches, but the approach works, and using the position mode in @kwackers branch I have validated this more precisely than a thread gauge allows using a dial indicator to measure travel. @clough42 I would suggest that this is ready to merge. |
I think this branch may do what I need to do. As someone who has little knowledge of C++ I will need to ask a few dumb questions to implement this or derivatives. Please be gentle with me. |
@clough42 May I plead for merging this PR? There has been interest and I have seen questions in various places such as youtube comments and other places about supporting additional threads. By default it doesn't even enable the additional thread pitches; it just makes it easier to turn them on, and to add thread pitches that can't be supported by your mainline. |
The original thread tables are small, which makes sense for a UI in which you have to click through them all one by one, but there are other thread specs that a user might be interested in.
I have entered extra thread specs in both inch and metric. I used the threads that my G0709 supports natively as a model. Some of the thread specs could not be represented with the existing macros, so I increased their precision by an order of magnitude, and shifted the display to improve the experience scrolling through thread specs by making the decimal point move as little as possible.
I made the extra threads default to not being compiled in, such that by default the only user-visible change is a cosmetic change of justification for more consistency in decimal point location, and a leading zero for metric threads smaller than 1mm pitch (making it consistent with @kwackers' work, to make it easier to resolve the merge conflict there).
In order both to preserve the default thread pitches regardless of the thread table extension and make the default thread pitches configurable, I promoted the thread and feed default indexes to configuration.
Hopefully this also makes it easier for others to add custom thread pitches to their own custom tables, if they need the extra precision required for a few standard threads.
Fixes #254