274 Commits (e7dc174f30366570c07677ccf653dd04e2b3c6a3)

Author SHA1 Message Date
Scott Lahteine 3e5312f116 CORE support for st_set_position & plan_set_position 9 years ago
Scott Lahteine e087a99a10 Some cleanup of st_get_pos functions 9 years ago
Scott Lahteine dc19b69697 No casting needed for SERIAL_ECHOPAIR 9 years ago
esenapaj 7950b5268a Use SBI macro 9 years ago
Scott Lahteine 5d8036e554 Code cleanup around MOTOR_CURRENT_PWM options 9 years ago
Scott Lahteine 0da744b7b0 Further cleanup of comments, partial Doxygen-style
Following up on #3231
9 years ago
jbrazio 5e5d250832 Added gplv3 header to all Marlin files 9 years ago
Scott Lahteine af32a7d5d6 M120/M121 also set endstops non-homing state 9 years ago
Scott Lahteine c5857f96c8 Merge pull request #3182 from thinkyhead/rcbugfix_printrboard_revf
Add support for Printrboard RevF
9 years ago
Scott Lahteine 59483221d5 Move stepper DAC to a separate file 9 years ago
Scott Lahteine 5d0570cea0 Make digitalPotWrite depend on HAS_DIGIPOTSS 9 years ago
Stephanie 6843b78f99 Add support for Printrboard RevF
The PrintrBoard Rev F utilizes a mcp4728 DAC to set motor current. Printrbot's implementation utilizes 2 new M-codes to set and write the DAC settings to the DAC EEPROM: `M909` (Read DAC) and `M910` (Write DAC). `M907` is re-used to set value, `M908` for direct control.

The Pins file for the RevF board is included.
9 years ago
AnHardt 3f45a1acf9 Check probes only when deployed
Aim: Test probes in update_endstops only when activated

Changes:
Configurations
 Add define for FIX_MOUNTED_PROBE to handle the situation where formerly ENDSTOPS_ONLY_FOR_HOMING had to be set, or lowering the nozzle below Z_PROBE_OFFSET_FROM_EXTRUDER could give an "endstop hit" message.
 Add define for Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to indicate a common situation, that we have a probe but it is connected to an endstop pin
 Add some comments
 Shift some entries to have related things together.

Conditionals.h
 We have a probe (HAS_Z_MIN_PROBE) if one of the pins is defined AND one of the probes is defined.

SanityCheck.h
 Add some tests if the probe is connected and if we have defined a probe.

stepper.cpp
 Changes to test the probe only when it is deployed (z_probe_is_active).
 Test update_endstops() when the probe is deployed.

MarlinMain.cpp
 a. set and reset z_probe_is_active in deploy_z_probe(), stow_z_probe() and dock_sled()
 b. set and reset z_probe_is_active in the case a z-servo is moved to a defined position. The only remaining unhandled servo move is in M280 where we do not end in a defined position. If you want to handle a probe use M401/402
 c. skip deploying/stowing when already deployed/stowed in the dedicated deploy/stow functions.
 d. Handle the new FIX_MOUNTED_PROBE in parallel to a servo driven probe/endstop.

 To do: In another PR. handle all probes in deploy/stow_z_probe.
 Sort out SERVO_LEVELING vs. HAS_SERVO_ENDSTOPS.
9 years ago
Scott Lahteine 4634feaeab Merge pull request #3012 from thinkyhead/fix_command_injection
Use a serial line buffer to prevent queue corruption
9 years ago
Scott Lahteine e5fd43f343 Implement BABYSTEPPING for COREXY and COREXZ 9 years ago
Scott Lahteine 8fe7420310 Use a separate serial line buffer 9 years ago
Alexander Leisentritt 4338813814 save last extruder and set stepper directions too in case the extruder changed
fixes MarlinFirmware/Marlin#3144 and MarlinFirmware/Marlin#3083
9 years ago
Scott Lahteine 6e1bc03d3b Additional wrapping for #3140 9 years ago
Scott Lahteine 0c48eaf3de Expose motor current in more configs, disable by default 9 years ago
Elijah Snyder e8b10d2836 Adding PWM_MOTOR_CURRENT flag to help expose PWM_MOTOR_CURRENTS in Configuration_adv.h similar to DIGIPOT_MOTOR_CURRENT 9 years ago
Scott Lahteine 3fd31976c3 Reduce code in stepper.cpp with macros 9 years ago
Scott Lahteine ff13070b59 Use _BV macros, patch up others 9 years ago
Scott Lahteine 373e8a1ad4 Fixes for COREXY and COREXZ coordinates 9 years ago
Naruto-kyun 2932602643 Update stepper.cpp
Forgot Z2_MIN_PIN
9 years ago
Richard Wackerbarth 7a670e3911 Improve planner & stepper PR #263 9 years ago
Scott Lahteine 644c376e84 Use binary OR with endstop bits 9 years ago
Scott Lahteine 9bdab4f3a8 Clean up "else" and other spacing 9 years ago
Scott Lahteine 0c7f7ebcfb Styling adjustments (PR#2668 & PR#2670)
Keep "astyled" reformatting
9 years ago
Scott Lahteine 9f462f0cf5 Hack to address stuttering caused by ISR not finishing in time
(PR #138)

When the ISR does not finish in time, the timer will
wrap in the computation of the next interrupt time.

This hack replaces the correct (past) time with a time not far in the future.
9 years ago
Christian Lefrançois a7822e3ff7 Some renaming of Z_PROBE to Z_MIN_PROBE (PR#91)
* Fix a couple of renames omission and macro expansion errors.
9 years ago
Richard Wackerbarth 29b456ae07 Suppress some compiler warnings 9 years ago
AnHardt e2d69f66b2 Make Z_PROBE a Z_MIN_PROBE (PR#65)
Currently we use the probe exclusively as a device to find the build platform(bed).
For the currently supported setups this means, we use it as a additional min-endstop.
A triggered when not deployed probe disturbs the homing process for max-endstops.

Rename ENDSTOPPULLUP_ZPROBE to ENDSTOPPULLUP_ZMIN_PROBE
Rename Z_PROBE_ENDSTOP_INVERTING to Z_MIN_PROBE_ENDSTOP_INVERTING
Rename Z_PROBE_ENDSTOP to Z_MIN_PROBE_ENDSTOP
Rename DISABLE_Z_PROBE_ENDSTOP to DISABLE_Z_MIN_PROBE_ENDSTOP
Rename Z_PROBE_REPEATABILITY_TEST to Z_MIN_PROBE_REPEATABILITY_TEST
Rename Z_PROBE_ENDSTOP to Z_MIN_PROBE_ENDSTOP
Adjust comments accordingly
Remove Z_MAX  check for the probe in update_endstops().

Using an delta related idea of @clefranc from #61,
extended to the general change for all setups.

Tested with Prusa i3, max-z-endstop and permanently triggered z-probe.
Worked for @clefranc's delta.
10 years ago
AnHardt 6a6e863a47 Resolve #2581 by adding a missed ';' (PR#67) 10 years ago
Scott Lahteine 46453905d6 Apply remaining ENABLED/DISABLED conditionals 10 years ago
Richard Wackerbarth 4b9d5cd352 Use lowercase names for serial instances 10 years ago
Scott Lahteine c35fb88094 Overridable Options - Part 8 (PR#2560)
Apply `ENABLED` / `DISABLED` macros to stepper-related files.
10 years ago
AnHardt 27d7d2ccab Correct bracketing for COREXY-XZ 10 years ago
Scott Lahteine 278aa15301 Add COUNT macro and apply 10 years ago
Scott Lahteine 000a6fce46 Extract update_endstops from stepper ISR (PR#2474) 10 years ago
Scott Lahteine 9f53e2f0c9 Implement COREXZ in stepper.cpp and planner.cpp 10 years ago
Richard Wackerbarth e83575537a Compiler defines USBCON for USB devices (PR#2433) 10 years ago
Scott Lahteine 87a872e103 Use st_get_position_mm where possible (PR#2411) 10 years ago
Scott Lahteine d135b15bb8 Init all endstop bits to 0 (PR#2332) 10 years ago
AnHardt 0d9d21d15f Add a semicolon to make Z_DUAL_STEPPER_DRIVERS compile again. 10 years ago
Wurstnase 9c09967803 Merge pull request #2149 from Wurstnase/enstop_bits
faster compare
10 years ago
wurstnase 0f3f7d6835 clean up double endstops 10 years ago
Scott Lahteine d76a01194d Slight size reduction by adding idle() 10 years ago
wurstnase 94120740d8 faster compare
!(~(ab)&0x3) and ab == 0x3 are equal
10 years ago
Scott Lahteine f919a2fed1 Merge pull request #2134 from AnHardt/preheat-all
Shift call of start_watching_heater() into setTargetHotend()
10 years ago
wurstnase ff98b8632b new endstop bits 10 years ago
AnHardt bc0764894a Shift call of start_watching_heater() into setTargetHotend()
to warrant watching is set or reset.

Make setTargetBed() in _lcd_preheat() dependant of TEMP_SENSOR_BED.
Use disable_all_heaters() in lcd_cooldown() and abort_on_endstop_hit.
10 years ago
wurstnase 21ff773832 rework out_bits 10 years ago
Scott Lahteine c54a2ea042 Adjust spacing in Marlin_main.cpp and stepper.* 10 years ago
Scott Lahteine 072625ccad Update headings in Marlin_main.cpp and stepper.cpp 10 years ago
Wurstnase 1d5677cc3b add missing Z-bits 10 years ago
Wurstnase df12e68e7d add missing Z_PROBE-bit 10 years ago
Wurstnase b55f32f8a1 replace some bools
this PR replaces some bools with one char. this will safe 3 bytes and should also be sometimes a little bit faster.
10 years ago
Wurstnase 073e4af7e2 We don't need the old standard one. The STEP_ADD and STEP_IF_COUNTER are also good for non-Toshiba stepper driver. 10 years ago
Wurstnase 79a44a9de3 stepper.cpp macros rework
delete some tabs
10 years ago
Chris Palmer 483384aaa4 Fixed faulty comment merge 10 years ago
Chris Palmer cc6b7cf3ce Fixed some comment spellings. 10 years ago
Chris Palmer e4595fa24a Fixed jump in speed when using high accelerations on axes with lots of steps.
I.e., when acceleration * steps per mm > 2,000,000.
This was done by changing MultiU24X24toH16 to take a 32b bit operand.
Removed the claim that stepper.cpp uses the Leib algorithm.
10 years ago
Scott Lahteine 53be0f3399 Babystep delay 2us 10 years ago
Scott Lahteine 7336e6df07 Always define old_z, not always z2 10 years ago
Scott Lahteine 5dd87d2e74 Enable all old_z_*_endstop vars for Z_DUAL_ENDSTOPS
- Potentially addressing #1911
10 years ago
Scott Lahteine ccddc280be Apply three more commits 10 years ago
Scott Lahteine 8857b9e921 Use the extruder argument in plan_buffer_line 10 years ago
Scott Lahteine d867c18535 Fix compile error with Z_DUAL_ENDSTOPS 10 years ago
Scott Lahteine b98ebd517e disable / enable_all_steppers functions 10 years ago
Scott Lahteine c0ca26cd50 Merge branch 'Development' into fixup_probing
Latest upstream commits
10 years ago
Scott Lahteine 0e8182bbf2 Additional pin tests, cleanup 10 years ago
Chris Roadfeldt a57862e29f Cleaning up code in prep for merge with upstream. 10 years ago
Chris Roadfeldt a508d835db Changed Z_PROBE_AND_ENDSTOP to Z_PROBE_ENDSTOP.
Updated documentation in Configuration.h.
Cleaned up and commented some code relating to Z_PROBE_ENDSTOP.
Separated Z_MIN_ENDSTOP and Z_PROBE_ENDSTOP completely.
10 years ago
Chris Roadfeldt 45ece5afb1 Merge remote-tracking branch 'MarlinFirmware/Development' into Development 10 years ago
Chris Roadfeldt 17707e7479 Fixed Z_PROBE_PIN pullup bug.
Documented some additional areas that should be addressed if Z_PROBE is
fully separated from Z_MIN or Z_MAX.
Fixed a documentation error in sanity checks. Servos start at 0 not 1.
10 years ago
Scott Lahteine 3348b3bf0c Allow SD_FINISHED_RELEASECOMMAND to be undefined 10 years ago
Chris Roadfeldt ec1d9c0b8f Use Z_PROBE_ENDSTOP_INVERTING when checking pin status. 10 years ago
Chris Roadfeldt e08f8eed05 Revert 06f767d..cba5692
This rolls back to commit 06f767d608.
10 years ago
Chris Roadfeldt cba5692673 Merge remote-tracking branch 'MarlinFirmware/Development' into Development
Conflicts:
	Marlin/Marlin_main.cpp
	Marlin/stepper.cpp
10 years ago
Scott Lahteine baa6787393 Merge pull request #1740 from thinkyhead/fixup_homing
Apply leveling for DELTA
10 years ago
croadfeldt 06f767d608 Merge remote-tracking branch 'upstream/development' into development 10 years ago
Scott Lahteine d73b169de3 Apply leveling for DELTA,
- Fix `prepare_move` function not calling `adjust_delta`
- Add more shorthand for plan_buffer_line.
- Fix wrong `federate` usage, assuming they are all mm/m
- Minor `stepper.cpp` cleanup
10 years ago
AnHardt 2b959a7752 Some additional {} to make the compiler happy. 10 years ago
Chris Roadfeldt 324c14943b Bug fixes for Z_PROBE_AND_ENDSTOP.
Code cleanup for Z_PROBE_AND_ENDSTOP.
Added Z_PROBE_PIN to pins_RAMPS_13.h
10 years ago
Scott Lahteine afff968e88 ARRAY_BY_EXTRUDERS, shorthand to sync planner
- Add some documentation to planner and stepper headers
- Patch up RAMBO pins with undefs
- Add `sync_plan_position` inline to set current XYZE
- Swap indices in `extruder_offset` to fix initialization values
10 years ago
Chris Roadfeldt 92eb8109ab Fix declaration of old_z_probe_endstop. 10 years ago
Chris Roadfeldt 9f3ff14008 Enabled separate Z Probe and Z Axis endstop use at same time.
Typo fixes in comments in existing code.
10 years ago
Scott Lahteine ba871e46bf Fix compiler warnings
- Patched up for most included configurations
10 years ago
Scott Lahteine ffe0df4b36 Latest upstream commits 10 years ago
Scott Lahteine 55739a4efe Fix Z_APPLY_STEP 10 years ago
Scott Lahteine 19d418cd6a Fix up the code to eliminate warnings 10 years ago
Scott Lahteine 267d6bef15 Eliminate most warnings
- Fix a bug reading `code_value` for `M503 Sn`
- Hide and remove unused variables
10 years ago
alexborro 0ce3576685 New Feature: Z_DUAL_ENDSTOPS
Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z
steppers - Let's call them Z stepper and Z2 stepper.
That way the machine is capable to align the bed during home, since both
Z steppers are homed.
There is also an implementation of M666 (software endstops adjustment)
to this feature.
After Z homing, this adjustment is applied to just one of the steppers
in order to align the bed.
One just need to home the Z axis and measure the distance difference
between both Z axis and apply the math: Z adjust = Z - Z2.
If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it
is.. think about it) and the Z adjust would be positive.
Play a little bit with small adjustments (0.5mm) and check the
behaviour.
The M119 (endstops report) will start reporting the Z2 Endstop as well.
10 years ago
Scott Lahteine 34a41648ab Merge branch 'Development' into planner_oh_planner
Latest upstream commits
10 years ago
Scott Lahteine 582cd780cd Fix compile error with `*_DUAL_STEPPER_DRIVERS`
- Patch up macros in stepper.cpp
10 years ago
Scott Lahteine 13fbf42d95 Cleanup of planner code
- Use named axis indexes, `X_AXIS` etc.
- Replace `block.steps_A` with block.steps[A]`
- Replace `A_segment_time` with `segment_time[A]`
- Add `A_AXIS`, `B_AXIS` for `COREXY` axes
- Conditional compile based on `EXTRUDERS`
- Add BLOCK_MOD macro for planner block indexes
- Apply coding standards to `planner.h` and `planner.cpp`
- Small optimizations of planner code
- Update `stepper.cpp` for new `block` struct
- Replace `memcpy` with loops, let the compiler unroll them
- Make `movesplanned` into an inline function
10 years ago
Scott Lahteine 2176a22d42 Fix count_direction initializer
- Addressing #1625
10 years ago
alexborro e650d4044e Fix "Stop Print" function in the LCD menu
When one hit "Stop Print" option in LCD menu, the command buffer was not
cleared. The printer keep moving until the buffer has been emptied.
Actually I could not clear the command buffer as well.. I don't know
why, it doesnt work as expected.
I need to implement a routine inside Stepper ISR to handle such
situation.
10 years ago
wurstnase 05333f61b7 fix macro 10 years ago
alexborro cb676cdf39 Fix CoreXY homing bug introduced by PR #1606
The Check Endstop logic must be:

if (current_block->steps_x != current_block->steps_y || (TEST(out_bits,
X_AXIS) == TEST(out_bits, Y_AXIS)))
if (TEST(out_bits, X_HEAD))

not

if (TEST(out_bits, X_HEAD) && (current_block->steps_x !=
current_block->steps_y || (TEST(out_bits, X_AXIS) == TEST(out_bits,
Y_AXIS))))

Same applies for Y axis.
10 years ago