The Configuration.h file entries for BL-Touch have been updated to:
```cpp
//#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are
turned off during probe event
```
The electro-magnetic interference from the bed and nozzle are affecting
the BL-Touch repeatability for some users. This problem can be helped
by shutting down the heaters during the actual probe event and then
quickly turning them back on.
Because this code is messing with the heaters, it is written in a
paranoid manner. It only turns the heaters back on if everything is
EXACTLY as it expects things to be. The BL-Touch probe must have been
put into a deployed state less than 20 seconds prior, or the stow()
function will NOT turn the heaters on.
This code has been tested and works for both G28 and probing functions.
Giving a negative number of probe points disables the tower angle
correction calibration ('4point' instead of '7point' solution)
EEPROM version updated
These are my two 'Nice' machines. Both are good example machines. The
FolgerTech i3-2020 is probably the best value kit on the market right
now. And it has developed a 'Cult Following' of hobbiests. I'll always
have an up to date Configuration.h file set for it, so it may as well be
an example configuration.
And the gCreate gMax 1.5+ is the best printer I've ever seen that runs
Marlin. For sure, I'll always have up to the minute Configuration.h
files for this printer also. I've moved over to using the gMax as my
primary development machine for Marlin. So... Besides being a good
machine, it is a nice convienience for me to have this Configuration.h
file as an 'Example'.
Also... The memory corruption issue may be fixed. The GCC compiler
was inlining static functions and this caused the G29() stack frame to
become much larger than the AVR could handle.
* relocated ubl state to config. store:
* removed a number of ubl state variables and padding which were largely unused - saved 58 bytes of both SRAM and EEPROM;
* modified ubl sanity_check - no longer checks removed state variables that were otherwise unused, where checking didn't seem to accomplish anything, ultimately;
* removed pre_initialized state, saving 64 bytes of SRAM;
* removed automatic saving of UBL state after UBL activation/deactivation;
* consolidated multiple GRID_MAX_POINTS_X/Y to 'Global Leveling' section of EEPROM;
* minor update to G29 Sx notes/instructions;
* renamed mesh load and save parameter to 'slot' from 'm' for clarity;
- Making M665 compatible with repetier (see
http://reprap.org/wiki/G_code#M665:_Set_delta_configuration)
- M665 B also sets the radius for manual calibration menu
- Converting tower ajustment definitions to arrays - tower angle
corrections compatible with Esher 3D wizzard
- Only tower angles need to be adjustable with M665 and stored to EEPROM
- tower radius and diag rod can be adjusted in the FW only with #define
This data corruption problem is very difficult. Just changing the code
a little bit changes whether the problem even happens and what is
affected. I need these changes in the main branch so I can operate with
the extra debug code always available and turned on.
Everything is setup such that if M100 is turned off or DEBUG(ECHO) is
turned off, the code is not affected. M100 has been made a little bit
more inteligent so it can display the serial command buffers in a more
meaningful way (because the data corruption seems to often times end up
in that area).
Configuration_store.cpp - changed a couple of print statements so the
values were printed. The old method resulted in the formula being
printed.
ubl_G29
1) added support for R option to P4. Now probes all points unless R is
present and the number is greater than 0.
2) P2 - moved map print statement so it showed the point that was
currently being probed, The old location did this only for the first
point.
3) P4 - Moved the map print for the same reason.
ultralcd.cpp - changed "Mesh Editor :" to "Mesh Editor" because the LCD
draw routine puts a ":" in automatically so you end up with an extra ":"
using the old message.
- On `DELTA` the `M665 H` option supplants `M206`
- On `DELTA` `NO_WORKSPACE_OFFSETS` only reverts `G92` behavior
- Spawn 4 conditionals based on `NO_WORKSPACE_OFFSETS`
- Optimize coordinate space conversion for `DELTA` workspace
- To keep EEPROM version, retain `home_offset[XYZ]`, just ignore XY
===============================================
make changes requested by reviewers
===============================================
add M43 test to Travis, fix EOL, remove trailing spaces
1. The CORExx printers were checking more endstop axis than needed.
2. Removed all the CORE_xx_NOT logic. The motor_direction(xx) routine
always returns the correct data so it is not needed. It was actually
cause the wrong direction to be checked in some cases.
3. Made the logic/defines for X, Y & Z axis all the same. The old logic
checked inappropriate configurations for Y and didn't check all the
correct configurations on Z.
4. Added a check for zero steps before the X, Y & Z axis. Previously
would check the they axis even if there were no movement.
All the memory accesses need to be unsigned char in order to avoid
false errors being detected. Two new features are available for
developers to call into the M100 functionality to look for data
corruption.
I use the movement options via LCD quite often. Especially to get the nozzle out of the way. I see no reason, why the 10mm option is disabled for the Z-Axis, this is why i always delete this line when i compile a new version.
If this is unwanted, please just close this PR
M100 had numerious changes and quit working. Part of the problem is
the overloading of the SERIAL_PROTOCOL functions. Also, some of the
address arithmatic was changed to use char *ptr and passing ptr into the
SERIAL_PROTOCOL functions caused them to try to print a string instead
of a number. M100 is working again. Let's keep it that way!
M100 has been expanded to now have a function int
free_memory_is_corrupted() that can be called from other code to see if
the free space is still contiguous. It may make sense to add a flag to
control its verbose nature but right now, the extra chit chat is very
helpful to know int free_memory_is_corrupted() is doing the right thing
and what it found at various points when it was called. A 'Show &
Tell' is coming up with int free_memory_is_corrupted().
Firmware was forgetting the z_fade_height in Planner, set by M420 Z<f>,
after each reset or loading settings from EEPROM. Added the float
z_fade_height to EEPROM-Storage, now remembers the value.
Pretty much... The code is in place. Still more work to do. But it
has a lot of hooks and variables in other code, so commit and merge
before I pick up a million 'Conflicts'.
# This is the 1st commit message:
MCP4728 consistency & fix ultralcd.cpp
The MCP4728 DAC controls the stepper motor current strenth on the
PRINTRBOARD Rev F and RIGIDBOARD V2 boards.
PR #5792 on 9 FEB 2017 implemented default drive percentages but only on
the RIGIDBOARD V2.
This change moves the default settings to Configuration_adv.h.
Also, ultralcd.cpp won't compile because of a type def conflict.
Changed it to match the one in stepper_dac.cpp
===========================================================
reword stepper curent section for clarity
===========================================================
change name & improve comments
===========================================================
changed name from A4JP to SCOOVO_X9H per PR #6139
# This is the commit message #2:
fix typo
==============================================
clarified BLTouch calculation & changed comment delimitters/flags
I found it hard to pickout the various sections in this area so I
changed most comments from // style to /** ... */
Made the BLTouch calculation simpler and clarified the units of measure
for the result.
============================================
add changes to example configurations
============================================
add TinyBoy2 to this PR & add BLTouch Delay
I've just uploaded a major change to pinsDebug.
The big change was creating an array in FLASH that contained every
active pin definition. That reduced the RAM memory usage considerably
but increased the FLASH usage.
Creating the array requires going through the pin list twice. Rather
than having two copies of it in the code I moved the list out to another
file (pinsDebug_list.h) and then just did two #includes.
From the user’s view they’ll see the following changes:
1. Now reports all the names assigned to a pin
2. The port is now reported in addition to the pin number.
3. When PWM0A & PWM1C share a pin, both PWMs are reported
4. More PWM/Timer info is reported
One new item that may cause some concern is the usage of the LINE
predefined preprocessor macro. It may not be available if the Arduino
IDE goes to a different compiler.
Includes support for 1284 & 1286 families.
Memory usage changes when enabling PINS_DEBUGGING:
ATmega2560
FLASH
. without 52576
. with new 64592
. with old 62826
. new-out 12016
. old-out 10250
. new-old 1766
.
RAM
. without 2807
. with new 2875
. with old 3545
. new-out 68
. old-out 738
. new-old -670
==================================================================
minor changes - mostly formatting
1) added newline to end of teensyduino file
2) changed flag name from TEENSYDUINO to TEENSYDUINO_IDE. Got warnings
about redefining TEENSYDUINO
3) removed some trailing spaces
reduce PROGMEM size & update pin list
Reduced PROGMEM usage by
1) converting often used macro to a function
2) moved as much as possible into the function
This required creating two arrays of address pointers for the PWM
registers.
==================================================================
update with new M3, M4, M5 pin names
==================================================================
report I/O status for unused/unknown pins
The offset for Z_DUAL_ENDSTOP (z_endstop_adj) is already in Marlin.
This PR just makes it a configuration item.
z_endstop_adj is initialized in two places so both had to be modified.
I've just uploaded a major change to pinsDebug.
The big change was creating an array in FLASH that contained every
active pin definition. That reduced the RAM memory usage considerably
but increased the FLASH usage.
Creating the array requires going through the pin list twice. Rather
than having two copies of it in the code I moved the list out to another
file (pinsDebug_list.h) and then just did two #includes.
From the user’s view they’ll see the following changes:
1. Now reports all the names assigned to a pin
2. The port is now reported in addition to the pin number.
3. When PWM0A & PWM1C share a pin, both PWMs are reported
4. More PWM/Timer info is reported
One new item that may cause some concern is the usage of the LINE
predefined preprocessor macro. It may not be available if the Arduino
IDE goes to a different compiler.
Includes support for 1284 & 1286 families.
Memory usage changes when enabling PINS_DEBUGGING:
ATmega2560
FLASH
. without 52576
. with new 64592
. with old 62826
. new-out 12016
. old-out 10250
. new-old 1766
.
RAM
. without 2807
. with new 2875
. with old 3545
. new-out 68
. old-out 738
. new-old -670
==================================================================
minor changes - mostly formatting
1) added newline to end of teensyduino file
2) changed flag name from TEENSYDUINO to TEENSYDUINO_IDE. Got warnings
about redefining TEENSYDUINO
3) removed some trailing spaces
reduce PROGMEM size & update pin list
Reduced PROGMEM usage by
1) converting often used macro to a function
2) moved as much as possible into the function
This required creating two arrays of address pointers for the PWM
registers.
==================================================================
update with new M3, M4, M5 pin names
==================================================================
report I/O status for unused/unknown pins
The fix in #6251 for bilinear Z offset was flawed and broke the Z parameter of G29 for bilinear levelling. This is reverted and a different fix is used for the double-addition of the Z-probe offset to the bilinear correction grid.
Since run_probe was altered to return the probe Z position rather than the nozzle Z position bilinear levelling has been broken because the Z-offset has been applied twice - once in the run_probe function, and then again in the G29 code for bilinear levelling.
The TB2 is a Indiegogo funded 3d printer. It uses a MKS SMELZI V1.0
main board (based on MELZI, i.e. Sanguinololu). I comes as a complete kit,
including display and panel.
Two variants exists, L10 and L16, with a height of 100 and 160 mm.
The heating function of the provided bed can enabled by soldering a
thermistor and some wires to it.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
The OLED is driven by an SSD1306, connected to the board via
I2C, the rotary encoder is connected to 3 GPIO pins.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Make all `unified_bed_leveling` data/methods static
- Move some UBL-related variables into the class
- Replace `map_[xy]_index_to_bed_location` with `mesh_index_to_[xy]pos`
With the the current definition of echo_command I cannot compile RCBugFix (Arduino IDE 1.8.1) with the error "invalid conversion from 'const char*' to 'char*'". This change resolves that.
After wraparound, pwm_count <= pwm_mask holds, thus soft_pwm_X <= pwm_count
guarantees soft_pwm_X < pwm_mask is true, and the heater will be switched
off in the first branch.
Do not evaluate the pwm conditions a second time, this reduces the
instruction count (4 instructions per PWM) and text size (6 byte).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
The compiler is not able to reuse the value of pwm_count, but reloads it
on every evaluation, if is stored in a static variable, as it cannot prove
it will be unchanged. A variable with local scope may not be modified from
the outside, so its value can be reused.
Doing so reduces text size and instruction count.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
If dithering is enabled, the remainder of the soft_pwm_X duty value at
turnoff time is added to the next cycle. If e.g. the duty is set to 9 and
SCALE is set to 2, the PWM will be active for 8 counts for 3 cycles and
12 counts on each fourth cycle, i.e. the average is 9 cycles.
This compensates the resolution loss at higher scales and allows running
fans with SOFT_PWM with significantly reduced noise.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
A 128 step PWM has 127 intervals (0/127 ... 127/127 duty). Currently, a
PWM setting of 1/127 is active for 2/128, i.e. double the expected time,
or, in general n+1/128 instead of n/127.
Fixes issue#6003.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Made the double touch portion a conditional compile based on the
PROBE_DOUBLE_TOUCH flag.
==============================================
Bugfix
The current G38 only stopped a move if it involved the Z axis.
Moved all the G38 code to it's own section and put it where it would
always be executed no matter what axis was moving or if the endstop was
enabled.
Also added a comment to configuration_adv to alert the user the double
tap had to be turned on.
==============================================
Change G38 back to using Z_MIN_PROBE
There's no Z_MIN endstop if Z_DUAL_ENDSTOPS is enabled and you have them
set to the top of the gantry.
G38 started out as using the Z_MIN_PROBE pin. I don't remember why we
changed it to the Z_MIN endstop.
The tool_change function saves the current_position to the destination
array soon after starting. Later in the switching extruder section, the
destination array is modified when moving the Z axis up & down. A later
section of tool_change moves the head back to the “original location”
using the destination array. This later section assumes that the
destination array hasn’t been modified.
The fix is to save the destination Z position and then restore it after
the Z movements have completed.
Going back to using the current_position array for the switching
extruder Z axis moves (and leaving the destination array untouched)
doesn’t fix the problem.
This bug was introduced by the “Make tool_change kinematic compatible”
commit # 847429eff4 which was merged on 10
Oct 2016 as part of PR 4982.
This bug was discovered in Issue 5966.