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

Baby-stepping show millimeters on LCD #4028

Closed
wants to merge 6 commits into from
Closed

Baby-stepping show millimeters on LCD #4028

wants to merge 6 commits into from

Conversation

edwilliams16
Copy link
Contributor

Change babystepping so that mm not steps are displayed on the LCD.

}
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, itostr3sign(babysteps_done));
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, ftostr43sign(distance_done));
if (LCD_CLICKED) lcd_goto_previous_menu(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't need babysteps_done any more - drop it everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it in the latest update to get rid of some irritating rounding error from incrementing a float.

@edwilliams16 edwilliams16 changed the title Rc bug fix Baby-stepping show millimeters on LCD Jun 13, 2016
}
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, itostr3sign(babysteps_done));
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, ftostr43sign(distance_done));
Copy link
Member

@thinkyhead thinkyhead Jun 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do this here instead…

if (lcdDrawUpdate)
  lcd_implementation_drawedit(msg, ftostr43sign(
    0.001f * ((1000 * babysteps_done) / planner.axis_steps_per_mm[axis])
  ));

…then you don't need to define distance_done above, or set it to 0.0 below. And this won't be called except when the value changes, so it doesn't cost any extra CPU.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is certainly simpler than carrying distance_done around all over the code.
Right now, I'm working directly with my cloned repository at github. Once I've figured out how to connect that up with my Mac, I'll have a command-line (and a decent editor) to work with.

@thinkyhead
Copy link
Member

To squash commits is pretty straightforward from the command-line. git rebase -i opens up your default editor and you can use "fixup" to combine commits together. When done you can use git push -f to push the new commit(s).

@edwilliams16
Copy link
Contributor Author

OK. I thing I got the commits squashed together on my end - but it looks chaotic over here for such a simple fix...
I usually work in emacs shell-mode and I haven't yet made that git friendly.
At least it works fine on my machine...

@thinkyhead
Copy link
Member

thinkyhead commented Jun 15, 2016

If you have squashed your commits, please use git push -f to push the fixed-up commit(s). Otherwise, I will need to clone your branch, do the squashes myself, and create a new PR.

@edwilliams16
Copy link
Contributor Author

Do I have access to the command line on my github account? That's where I've been making the pull requests via the web. Or do I need to bypass that and somehow push to the Marlin account from my Mac?
Hopefully after I get beyond being a total git novice, I'll be less trouble.

Sent from my iPad

On Jun 14, 2016, at 17:55, Scott Lahteine [email protected] wrote:

If you have squashed your commits, please use git push -f to push the fixed-up commit(s). Otherwise, I will need to copy your branch, do the squashes myself, and create a new PR.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@lrpirlet
Copy link
Contributor

@edwilliams16 ... I know the feeling...

I am not a mac owner, but this URL does shows all the bits and pieces I
have appreciated...
https://git-scm.com/download/mac is the page with ref to a mac tool (seems
to be a command line interface as I like it),
There is the, or should is say THE reference book: Pro Git book
https://git-scm.com/book

Then you'll get help from the community to fill the gap...(gaps :-) )

2016-06-15 6:48 GMT+02:00 edwilliams16 [email protected]:

Do I have access to the command line on my github account? That's where
I've been making the pull requests via the web. Or do I need to bypass that
and somehow push to the Marlin account from my Mac?
Hopefully after I get beyond being a total git novice, I'll be less
trouble.

Sent from my iPad

On Jun 14, 2016, at 17:55, Scott Lahteine [email protected]
wrote:

If you have squashed your commits, please use git push -f to push the
fixed-up commit(s). Otherwise, I will need to copy your branch, do the
squashes myself, and create a new PR.


You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#4028 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ALEmPWnUqEQ1KQ6EUZk9VzX027gm9oQ5ks5qL4QWgaJpZM4I0Nv_
.

   Make LCD show mm displacement on LCD not steps
Reduce FLOP count and improve rounding. Reset initial distance done when changing axes.
  Got rid of redundant distance_gone
@thinkyhead
Copy link
Member

thinkyhead commented Jun 16, 2016

after I get beyond being a total git novice

I added some scripts to help working with Marlin and git from the command-line. They live in Marlin/buildroot/share/git and are described at #3567. The one script it doesn't include is one I would name mfinit which would just do this to make sure your repo is ready for the other scripts:

git remote add upstream [email protected]:MarlinFirmware/Marlin.git

To master git you should go through this interactive tutorial: http://learngitbranching.js.org/

@thinkyhead
Copy link
Member

thinkyhead commented Jun 16, 2016

Here is how I'm cleaning up this PR…

$ git remote add edwilliams16 [email protected]:edwilliams16/Marlin.git
$ git fetch edwilliams16
$ git checkout edwilliams16/RCBugFix -b rc_babysteps_mm
$ mfrb

Opens up an editor, where I edit it to say:

reword 780725f Update ultralcd.cpp
f 44d1903 Update ultralcd.cpp   
f 5fd480c Update ultralcd.cpp   
f 4c141b2 Update ultralcd.cpp   
f ff7d869 Update ultralcd.cpp   
f 9ff3bde put back file   

I save this, the editor reopens so the "reword" commit can be edited.
After saving, the git rebase -i is done, so I create a new PR…

$ mfpr

And the browser opens up, ready for me to create a PR.

@CONSULitAS
Copy link
Contributor

@edwilliams16
I have a Mac, too.

It is quite easy:

  • Download GitHub Desktop: https://desktop.github.com
  • Install
  • You will have the command line tools and you can use them in the Terminal app.
  • For most tasks you can use the GUI app.

@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
drewmoseley pushed a commit to drewmoseley/Marlin that referenced this pull request Nov 8, 2023
Merge duplicate strings in cmdqueue.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants