Skip to content

Conversation

@krkeegan
Copy link

@krkeegan krkeegan commented Aug 5, 2020

What does this pull request do?

This merges in the upstream commits from maslow into the release/holey branch. I had to fix a few conflicts.

I am unclear where I should be pushing this too. If this is the wrong repository or branch let me know, I can easily rebase off of the correct branch.

It seems like this is a necessary step before merging the holey calibration back upstream into maslow.

Does this firmware change affect kinematics or any part of the calibration process?

No

d) Has this PR been tested on actual machine and/or in fake servo mode (indicate which or both)?

Only in fake servo mode.

It has been a while since I have done this, someone should probably confirm that I didn't break anything.

How can this pull request be tested?

The B17-19 commands. Fake Servo testing with B99. The G2 command. I didn't edit anything, so if it works upstream it should work here as long as my conflict resolution isn't awful.

madgrizzle and others added 25 commits August 20, 2019 10:48
Any changes to values that are used during the kinematics::forward calculations should call kinematics.init() so sled position can be recalculated.  If its not, this can cause a "sled not keeping up" error, particularly after calibration.  If the sled is at an unadjusted position and a move is made, the move will be made with the adjusted parameters and that can exceed the positionErrorLimit.
 cnc_ctrl_v1.ino:
 - add global flag to signal Axis::computePID() and Motor::write()
 - check for saved state at startup and report it

 Gcode.cpp:
 - add 'B99 ' command
 - - if the line contains 'ON' set FAKE_SERVO_STATE otherwise clear it
 - - report the state
 - - save the value of FAKE_SERVO_STATE in the high byte of EEPROM to persiste over restarts
 - - note that Setings::settingsWipe(SETTINGS_RESTORE_ALL) writes '0' to that location, which turns FAKE_SERVO off

 Axis.cpp:
 - at start of Axis::computePID(), check 'if (FAKE_SERVO_STATE != 0)' to determine whether to fake the encoder change. The check adds very few microseconds to this importrant function.

 Motor.cpp:
 - at the start of Motor::write() add a check for (FAKE_SERVO_STATE == 0) to determine whether to set the speed of the motor. This check adds only a few microseconds. Adding this check keeps the motors inoperative dureing FAKE_SERVO mode.
add B99 command to control FAKE_SERVO mode
 - define a specific number value to indicate FAKE_SERVO as active in Config.h
 - in cnc_ctrl_v1 on startup, check the contents of EEPROM[ 4095 ] for that special value, if found enter FAKE_SERVO but if any othe value is found store a '0' there and indicate that FAKE_SERVO is 'off'
 - change the logic in Axis::computePID() and Motor::write() to check for the specific value ranther than non-zero.
…cess-control

tighten up FAKE_SERVO access
Remove comment characters between parentheses.
…if Z is not specified in gcode line. Set Z1 and Z2 to NAN if not provided. Update arc() to deal with NAN Z. Make Z calculations happen the same way as X&Y before movementUpdate(). Add Z end move same as X & Y.
…c-z-optional

gb0101010101-g2-arc-z-optional: Do not perform Z axis movement on G2 …
I have made some small tweaks to the code to be able to set upper and lower limits for the z axis in order to prevent motors from forcing the Z Axis beyond its limits.
Made changes per requests during review
…-support-radius

Add support for G2 & G3 commands that use radius R instead of I & J.
…emplate

Revert pull pull request template to original version
Cleaned up a few conflicts.

Conflicts:
	cnc_ctrl_v1/Axis.cpp
	cnc_ctrl_v1/Config.h
	cnc_ctrl_v1/GCode.cpp
	cnc_ctrl_v1/Settings.cpp
	cnc_ctrl_v1/Settings.h
	cnc_ctrl_v1/cnc_ctrl_v1.ino
Added $60 min speed and $61 spindle max speed for pwm output  Added S functionality to set spindle speed.  pwm setting is scaled from 0 to max with min being set as the start speed.
default is for pwm pin to be active and for relay to be active high
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.

7 participants