Commit Graph

408 Commits

Author SHA1 Message Date
Gina Häußge
63b62d8d4e Fixed in-line comments and escaping
* "G1 X1 ; test" was not executing "G1 X1" due to never leaving comment mode.
  * "M117 Hello \;)" printed "Hello \" to the display due to not replacing serial_char properly.

Tested with the following commands:
    * M117 Hello ; test => displays "Hello" on display, ignores "test"
    * G1 X1 ; foo => moves 1mm in X, ignores "foo"
    * ; test => completely ignored, not even acknowledged
    * M117 Hello \;) => displays "Hello ;)" on display
    * M117 Hello \\;) => displays "Hello \" on display, ignores ")"
2015-03-05 23:30:34 +01:00
C-o-r-E
99fb1bc3e8 Attempt to resolve #1568 and add basic escape character support 2015-03-05 15:22:37 -05:00
Scott Lahteine
cdc38aa783 Move gcode handlers into inline functions 2015-03-05 04:27:24 -08:00
Scott Lahteine
6d9e9a6bef Merge branch 'Development' into enhanced_g29
Latest upstream changes
2015-03-05 02:49:18 -08:00
Scott Lahteine
4db2179f5c Include 4th extruder support 2015-03-05 02:37:36 -08:00
OhmEye
f90a947e65 Fix autoretract
Autoretract was broken, looks like it was overlooked when the retracted flag was updated for multi extruders.
2015-03-04 20:28:08 -10:00
Scott Lahteine
2ef6b3d57a Fix wrong defines, broken syntax 2015-03-04 22:24:44 -08:00
Scott Lahteine
32744d41a9 Do sanity checking on LRFB values
- Setting boundaries based on configured limits, contrasting with G28
(which forgets these limits?)
2015-03-04 21:32:11 -08:00
domonoky
075507fb9a missed one X_ENABLE_PIN 2015-03-03 11:09:56 +01:00
Scott Lahteine
dfb38874f8 Some suggested changes for #1555 2015-03-03 00:48:20 -08:00
Scott Lahteine
7f8ea7105f Arrange ProbeAction values bitwise 2015-03-02 20:14:37 -08:00
Scott Lahteine
7684721977 Enhanced G29
- Adapted “Enhanced G29” code referred to in #1499 and posted at
[3dprintboard.com](http://3dprintboard.com/showthread.php?3105-Auto_Bed_
Leveling-Enhanced-G29-command)
- Compatible with current G29 while adding some new arguments
  - `V` sets the verbose level for serial out
  - `T` (or `V` > 2) send a Topology report to serial out
  - `E` works the same way as before
  - `P` works as before (source used `n` or `U`/`u`)
  - `L`, `R`, `B`, `F` work as before
- Still needs sanity checking for `LRBF`
2015-03-02 20:00:17 -08:00
C-o-r-E
874d3d3fc5 Add support for solenoid articulated extruders 2015-03-02 20:07:12 -05:00
domonoky
4a7aca2736 Merge remote-tracking branch 'remotes/upstream/Development' into Development 2015-03-02 17:52:12 +01:00
Scott Lahteine
e30bfedce4 Fix undefined *_PROBE_BED_POSITION error 2015-03-01 19:57:35 -08:00
alexborro
227ab8c665 Merge pull request #1503 from MarcelMo/patch-2
Support for simple customisable AutoZProbing area
2015-02-25 13:22:42 -03:00
Scott Lahteine
c9a3eb0c1a Spacing in calculate_volumetric_multiplier(s) 2015-02-23 20:35:18 -08:00
Scott Lahteine
0cf0c20532 Optimize calculate_volumetric_multiplier 2015-02-23 18:10:35 -08:00
domonoky
b55995aae8 Introduce a layer of macro indirection to all stepper pins. This allows other stepper drivers to redefine them, so they can use SPI/I2C instead of direct pin manipulation. 2015-02-23 16:12:35 +01:00
Scott Lahteine
08c236059e Merge pull request #1505 from thinkyhead/issue_1499
Bed leveling probe behavior issue?
2015-02-19 01:24:17 -08:00
MagoKimbra
159196d1e9 Reset Alert message when finish M600 command 2015-02-18 21:33:38 +01:00
Scott Lahteine
978d114c73 Bed leveling probe behavior issue?
The `float` keyword should not be on these vars because they conceal
the outer vars, preventing them from obtaining known values before
being passed in `set_bed_level_equation_3pts`. Possibly related to
`Z_RAISE_BETWEEN_PROBING` not functioning.
2015-02-15 20:51:27 -08:00
MarcelMo
d28f5b9e82 Support for simple customisable AutoZProbing area
When probing PCB´s I had the problem that i needed auto-leveling for specific areas (it´s never the same size).
Not much code, but very useful.
Now I use simply G29 L5 R55 F5 B35 P3 to probe a 4x6cm PCB before milling.
I used int for values... might be wrong...
I hope this time I got the right development tree. (tried first with https://github.com/MarlinFirmware/Marlin/pull/1130/commits)
2015-02-15 15:58:29 +01:00
Scott Lahteine
7866fa161f Merge pull request #1476 from Natealus/Development
Compiling errors with 4 Extruders defined and Viki 2 Implementation
2015-02-12 16:56:55 -08:00
Jérémie FRANCOIS
9d75a56b56 Merge remote-tracking branch 'upstream/Development' into Development
Conflicts:
	Marlin/Configuration.h
	Marlin/Marlin_main.cpp
2015-02-11 06:38:36 +01:00
Natealus
38a500d05c Viki 2 Implementation
I've insert the define and pointer entries for the Viki 2 and miniViki
from Panucatt in all of the example configs and main config. With these
additions and with pins done in the old single pin.h style...I was able
to get the display working fine save for needing to turn Delta Segments
per Second down. But that's a common graphics lcd issue being looked
into right now.

I need assistance in understanding how the new divided pins files fit
together because my previous attempts at trying to get it to work
appropriately didn't seem successful. This originally came from trying
to find out how to swap the XYZ Min and Max Endstop pins in the Azteeg
X3 Pro. It only comes with one set of connectors and they're Min
Endstops. My previous experience didn't turn out well trying to tell the
firmware to home to the Min Endstops so the best solution I found was to
swap the pins in the firmware. If I'm missing a conflict with a setup
other than delta please let me know, but it makes sense in my setup.
2015-02-08 03:14:59 -07:00
Jérémie FRANCOIS
85e5aa4011 Generalized enqueue_commands_P, and moved them to Marlin_main as they should 2015-02-07 23:24:20 +01:00
Scott Lahteine
0cb1029311 remove extra plan_buffer_line 2015-02-03 11:26:36 -08:00
Scott Lahteine
b97a950f53 Apply fix for M600 filament change
- Patch from #1453 for delta movement plan
- Fix: Set X with code X instead of adding to X
2015-02-03 09:57:16 -08:00
Scott Lahteine
9dc5de6166 Hide code that makes veteran geeks go "aha!" 2015-02-02 05:55:55 -08:00
Scott Lahteine
bd387068bb Apply loops for extruders elsewhere also 2015-02-02 05:27:27 -08:00
Scott Lahteine
4a146d584b Loop, since the pending feature can use an array 2015-02-02 05:16:17 -08:00
Scott Lahteine
bca884bf72 Realized it's not a bug, but cleanup code anyway 2015-02-02 04:41:31 -08:00
Philip Schell
fb7c636ecf Avoid compiling error
Only a missing ","... now it will compile again
2015-02-01 01:33:04 +01:00
Scott Lahteine
073c59c50a Clean up some formatting
- Also partial cleanup of Marlin_main.cpp with a smidgen of Doxygen.
2015-01-29 18:52:21 -08:00
Scott Lahteine
093fedfde8 Make EEPROM storage consistent
Update ConfigurationStore to always write dummy values for disabled
options, including FWRETRACT, DELTA, and SCARA. Update the EEPROM
version to “V15.” Also fixes a buffer overrun with axis_scaling in
Config_ResetDefault.
2015-01-28 01:08:48 -08:00
Jérémie FRANCOIS
dd301be52d Added suport for multiline G-code commands in the LCD menus 2015-01-26 18:50:29 +01:00
AnHardt
59315330dd Remove definition of VERSION_STRING and replace where usend with STRING_VERSION 2015-01-26 15:52:01 +01:00
MagoKimbra
986e723eeb Add 4th extruder 2015-01-24 13:37:58 +01:00
daid
53f971095d Revert "Reduce PROGMEM warnings" 2015-01-16 16:48:22 +01:00
Bo Herrmannsen
5151db5c2f Merge pull request #1349 from msutas/patch-2
Improvement - G29 Option for Not Retracting Servo
2015-01-15 10:56:31 +01:00
Bo Herrmannsen
ab074dac17 Merge pull request #1344 from grob6000/independent_pid
Independent PID parameters for each extruder
2015-01-13 12:10:37 +01:00
Bo Herrmannsen
d4a665694a Merge pull request #1350 from odewdney/Development
Reduce PROGMEM warnings
2015-01-13 11:26:50 +01:00
msutas
3a5a6f42fb Corrected the ABL grid option
G29 E was not retracting the probe on the last probe point when used with ABL grid. Corrected.
2015-01-12 11:07:46 +02:00
odewdney
538859669d Removing compiler warnings for progmem 2015-01-11 18:14:21 +00:00
grob6000
bf2c923db5 Make multiple PID parameters a config option
* Adds config parameter `PID_PARAMS_PER_EXTRUDER` - allows single PID
parameters to be used where this would be preferable (e.g. dual
identical extruders)
* When disabled, will use `float Kp, Ki, Kd, Kc;` as before.
Preprocessor macros used to switch between.
* ultralcd.cpp defines extra menus for extra parameters only where
required
* M301 reports `e:xx` only if independent pid parameters enabled
* EEPROM structure still leaves space for 3 extruders worth, when undef
will save single parameter to all extruder positions, but only read the
first
* Switching off saves approx 330 B with no LCD enabled, 2634B with LCD
(RRD) enabled: this is significant.
* LCD modifications should be tested.
2015-01-11 13:50:17 +11:00
msutas
e0beb98fd3 Improvement - G29 Option for Not Retracting Servo
This change introduces an improvement to G29 command on Marlin.

Auto bed leveling operation's reliability is based on the repeatability of the Z-probe switch and the servo. This change introduces an option to G29 command. When the G29 command is sent with an "e" option, during auto bed levelling the servo is not retracted between probes which decreases the bias on auto bed levelling resulting from servo.

G29 command does the auto bed probing as it is.

G29 E command engages the servo on first probing point, probes all points and retracts the servo after probing the last point.

Please comment your opinions, test on your printer and check the code on a programmer's perspective. (I am not a good programmer.)
2015-01-10 17:25:39 +02:00
grob6000
37c7e8300f Independent PID parameters for each extruder
* Variables Kp, Ki, Kd, Kc now arrays of size EXTRUDERS
* M301 gains (optional, default=0) E parameter to define which
extruder's settings to modify. Tested, works with Repetier Host's EEPROM
config window, albeit only reads/updates settings for E0.
* All Kp, Ki, Kd, Kc parameters saved in EEPROM (version now v14), up to
3 extruders supported (same as Marlin in general)
2015-01-10 16:35:12 +11:00
Erik van der Zalm
1aade4a8e2 Merge branch 'Development' of https://github.com/MarlinFirmware/Marlin into Development 2015-01-09 21:33:29 +01:00
Erik van der Zalm
8a2e84e3f1 Possible fix for FWRETRACT with 0 zlift. 2015-01-09 21:33:02 +01:00
Erik van der Zalm
3a30d45c2e Revert "issue 968 for dev branch" 2015-01-07 23:40:17 +01:00
Dan Royer
9472bbe51d issue 968 for dev branch
try, try again.

If 'OK' is garbled on sending PC won't receive it.  Both machines will
wait on each other forever.  This resends OK if nothing is heard from PC
for a while to avoid this bad case.
2015-01-04 12:17:46 -08:00
Bo Herrmannsen
a18b625534 Merge pull request #1261 from wgm4321/Development
Add Filament menu and add Filament/Retract settings to config store.
2015-01-02 15:35:29 +01:00
bkubicek
d02daec08f fixed compilation 2014-12-30 08:04:06 +01:00
Bernhard Kubicek
f24c5d82e3 Update Marlin_main.cpp
fixed minor typo
2014-12-29 17:17:30 +01:00
Wurstnase
8a6f098cc6 Expand manage_inactivity #1264
void manage_inactivity(bool ignore_stepper_queue=false)

standard is false so it is not necessary to change additional code. this
change should be better, hopefully nophead like this :)
2014-12-29 17:07:22 +01:00
Wurstnase
d1995aec7a Rename ignore_blocks_queued
more speaking name
2014-12-29 16:47:08 +01:00
Wurstnase
4122de9d17 change filament issue
make a more general solution
2014-12-29 16:31:00 +01:00
wgm4321
cb12161191 Add Filament menu and add Filament/Retract settings to config store. 2014-12-28 20:43:14 -05:00
fmalpartida
ec33df0554 Merge branch 'SAV-MkI_merge' into Development
Tested for SAV MKI and SAV 3D LCD on lewihe.
2014-12-28 19:54:06 +01:00
alexborro
3afe66bb0c Fix issues #1248, #1240
- Fixed issue when BAL area probing is shorter than it should be for
grid probing
- Warning when BAL activated with Delta Kinematics
- Fix XY_TRAVEL_SPEED when homing Z axis
2014-12-28 13:27:39 -02:00
Lukas Obermann
9eb6df17a7 Consider negative Z Offsets when auto bed leveling is active 2014-12-28 12:46:35 +01:00
Denis Chertykov
050ca9ca13 Move initialization of errormagic[] and echomagic[] to Marlin_main.cpp 2014-12-28 09:09:42 +03:00
alexborro
d74aabf259 Revert "Change Auto_Bed_Leveling to Auto_Bed_Compensation" 2014-12-21 10:06:05 -02:00
Bo Herrmannsen
60628864ca Merge pull request #1167 from thinkyhead/sd_freemem
Use SdFatUtil::FreeRam() for freeMemory() if there
2014-12-20 18:31:21 +01:00
Bo Herrmannsen
889d7ba218 Merge pull request #1177 from martin-pr/probing_z_speed
Split do_blocking_move() to XY and Z sections
2014-12-20 18:30:35 +01:00
Bo Herrmannsen
5e7bd2dc87 Merge pull request #1200 from chertykov/Marlin_v1
Fix syntax errors in #ifdef
2014-12-20 18:29:39 +01:00
Denis Chertykov
b086394178 Fix syntax errors in #ifdef. 2014-12-20 19:33:43 +03:00
John Davis
4315c2547a Update Marlin_main.cpp
Changed level and leveling to compensation (except with "verbose_level" and "lcd_reset_alert_level").
2014-12-19 17:41:29 -05:00
Bo Herrmannsen
03e489aaad Merge pull request #1197 from foosel/fix/issue_1147
Fixes commands not being acknowledged in the same order they are received in
2014-12-19 14:39:05 +01:00
Gina Häußge
acc0e75279 Fixes commands not being acknowledged in the same order they are received
in

G0 to G3 were previously acknowledged in the get_command method, causing
them to be possibly acknowledged before commands coming after them that
were acknowledged in process_commands.

This patch fixes this, moving the acknowledgement of G0 to G3 to the
process_commands method as well. These commands are therefore no
longer acknowledged when the enter the cmd_buffer but instead only
acknowledged when the enter the plan_buffer.

Guaranteeing that commands are acknowledged in the same order in which
they were received by the firmware allows host software to be able to
track the life cycle of commands and such a better management of the
firmware's serial buffers as well as better internal command processing
and response parsing without having to depend on throwing an epic
amount of regular expressions against each line received back from the
firmware.

Fixes ErikZalm/Marlin#1147
2014-12-19 14:20:36 +01:00
Scott Lahteine
07c6b5ab71 Using axis constants 2014-12-18 08:13:08 -08:00
Scott Lahteine
0450e83fa5 Use SdFatUtil::FreeRam() for freeMemory() if there 2014-12-17 23:26:52 -08:00
Scott Lahteine
60598b4cdd A few constants where they belong 2014-12-17 23:01:24 -08:00
Martin Prazak
2ef0669b19 Split do_blocking_move() to XY and Z sections to make sure that the Z homing feedrate is not exceeded 2014-12-07 15:31:46 +00:00
Neil Darlow
64139f5e5a Merge https://github.com/ErikZalm/Marlin into Marlin_v1 2014-12-04 21:09:03 +00:00
Scott Lahteine
7562183efc Skip over spaces first 2014-11-28 08:09:28 -08:00
Scott Lahteine
12b51d6060 Ignore S and P if no value >0 is included. 2014-11-26 21:05:11 -08:00
Scott Lahteine
d12b24758a Clear LCD to welcome_msg if not printing
The welcome message is more appropriate than “resuming print” if
nothing is printing.
2014-11-26 21:05:11 -08:00
Scott Lahteine
92e21d3ee2 M0-M1 Enhancements
Allow M0 and M1 to include a message string. Ignore clicks on “Wait for
user” so that the Info Screen stays up.
2014-11-26 21:05:10 -08:00
Neil Darlow
b81021f475 Merge https://github.com/ErikZalm/Marlin into Marlin_v1 2014-10-21 12:06:56 +01:00
Erik van der Zalm
058e446531 Merge pull request #1037 from filipmu/Filament-Sensor
Support for a filament diameter sensor
2014-10-11 22:56:01 +02:00
Erik van der Zalm
b360306881 Merge pull request #1073 from WingTangWong/wing-fix-float-delta
Wing fix float delta
2014-10-06 13:41:01 +02:00
Scott Lahteine
f989bd5435 Simple code cleanup. Rename "homeing" to homing. 2014-10-05 13:20:53 -07:00
Neil Darlow
6c5a460e65 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-10-05 12:54:54 +01:00
galexander1
cb4a6dd2dc Merge pull request #1065 from oliasmage/Marlin_v1
Corrected retract() call for use of auto probe without sled enabled.
2014-09-19 15:12:09 -04:00
Bracken Dawson
01e9b536cb Fix build for non-sled bed auto levelling
This function should only be used with sled, not all bed auto
levelling.
2014-09-19 19:42:32 +01:00
Wing Tang Wong
58eabd21fb Added ifndef 2014-09-16 14:31:58 -07:00
Wing Tang Wong
88d12a762a Added #ifndef DELTA wrapper to float delta 2014-09-16 14:29:44 -07:00
Charles Bell
3b8216bdd1 Corrected #endif and ifdef for Z_PROBE_SLED code. 2014-09-04 16:40:22 -04:00
Charles Bell
37799f70ba Corrected retract() call for use of auto probe without sled enabled. 2014-09-04 14:36:39 -04:00
Neil Darlow
1632e5e38a Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-09-04 12:21:35 +01:00
Erik van der Zalm
018b68a5c4 Merge pull request #976 from cocktailyogi/SCARA_by_Yogi
Implemented SCARA-Maths
2014-08-28 16:32:52 +02:00
Erik van der Zalm
9887555192 Merge pull request #998 from darconeous/pull-requests/fwretract
FWRETRACT fixes
2014-08-28 16:24:51 +02:00
Erik van der Zalm
68dd5e635e Merge pull request #1024 from oliasmage/Marlin_v1
Adding Z Probe via sled mounted endstop
2014-08-28 16:15:54 +02:00
Erik van der Zalm
25069ed4e9 Merge pull request #1031 from Roxy-3DPrintBoard/Z_PROBE_REPEATABILITY-with-correct-Defaults
Z probe repeatability with correct defaults
2014-08-28 16:14:10 +02:00
Filip Mulier
62db9848d3 Improvements and bug fixes in sensor delay buffer for filament sensor code
Improvement to avoid reinitializing delay buffer with every print. Fixed
issues in buffer indexing and memory out of bounds due to floating point
imprecision.  Simplified the code by avoiding conversion to standard
diameter and 1cu mm extrusion, which caused complications in determining
mm extruded.
2014-08-16 06:50:13 -05:00
Florian Baumann
5908fd5cec Fix reseting CHDK pin to LOW
chdkActive was set to false regardless of (millis() - chdkHigh) being bigger than the CHDK_DELAY or not. So if (millis() - chdkHigh) wasn't bigger than the delay the first time, the CHDK would never be set back to LOW.

Also, don't return from the function, as there might be other stuff to do, after the CHDK check.
2014-08-11 14:12:32 +02:00
Roxy-3DPrintBoard
0091865583 Z_PROBE_REPEATABILITY test
Z_PROBE_REPEATABILITY test for Auto Bed Leveling.
Implemented as M48 with extra user specified options.
Full support at
http://3dprintboard.com/showthread.php?2802-Auto_Bed_Leveling-Z-Probe-Repeatability-code
2014-08-09 15:37:23 -05:00
Filip Mulier
85649a4549 Real-time filament diameter measurement and control
This feature allows the printer to read the filament diameter
automatically and adjust the printer in real time.  Added code to read
an analog voltage that represents a filament diameter measurement.  This
measurement is delayed in a ring buffer to compensate for sensors that
are a distance away from the extruder.  The measurement is used to
adjust the volumetric_multiplier for the extruder.  Some additional g
codes (M404, M405, M406, M407) are used to set parameters and turn
on/off the control. g code M221 is updated.  Pins for RAMPS1.4, RAMBO,
and Printrboard are identified for analog input.  The configuration file
is updated with relevant user parameters.
2014-08-06 19:30:57 -05:00
Charles Bell
d2fcb3ee56 CAB: Added code for Z-probe with Z endstop mounted on a sled. 2014-08-01 11:29:59 -04:00
Neil Darlow
3cd7dbcc45 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-07-30 13:01:52 +01:00
daid
c13a831ea1 Merge pull request #1017 from foosel/fix/checksum_truncation_bug
Fix for a wrong checksum truncation for certain commands
2014-07-24 19:41:34 +02:00
Gina Häußge
2d22902d08 Fix for a wrong checksum truncation for certain commands
Positioning of string terminator to truncate checksum from the commands
M23, M28, M30, M32, M928 and M117 was off by one, causing the last
letter of the actual command to be truncated instead of just the
checksum.

In case of the SD commands this caused checksummed commands targeting
existing files to fail since the last letter of the filename was
truncated.

In case of M117 this caused the last given letter not to be displayed.

This patch fixes the off-by-one error and sets the null terminator
on the exact position of the * starting the checksum instead of the
character before that.
2014-07-24 12:04:02 +02:00
cocktailyogi
2f4a20257c imported last Marlin changes 2014-07-20 13:49:26 +02:00
daid
aacff0d361 Merge pull request #948 from Dim3nsioneer/Marlin_v1
Implementation of FW extruder change retract
2014-07-18 16:10:15 +02:00
Robert Quattlebaum
1fd9a7d476 Fix for FWRETRACT on DELTA printers.
Fixes #817
2014-07-09 09:24:26 -07:00
Neil Darlow
3f2c771d90 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-07-07 18:17:15 +01:00
Pablo Clemente
2242a84218 Changed the declaration of the variable to Marlin_main.cpp to fix issue on commit #965 2014-07-01 16:45:03 +02:00
Neil Darlow
6e3406d228 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-07-01 10:27:39 +01:00
Pablo Clemente
d86c3cf43c Changed the type of variable to bool, the name to "cancel_heatup", flags implementation and added this fix to M190 gcode too. 2014-06-30 15:12:13 +02:00
cocktailyogi
f0cab611db optimised some math-code 2014-06-24 18:43:36 +02:00
cocktailyogi
fae7d08698 fixed wrong compiler-option 2014-06-23 18:16:42 +02:00
cocktailyogi
512f2a3136 restore Branch from Backup
sorry for that
2014-06-23 17:09:57 +02:00
Pablo Clemente
cd3220d055 Inverted state logic for forced_heating_stop variable 2014-06-13 08:39:58 +02:00
Pablo Clemente
86b4b805d2 Fixed stop print LCD function on M104 2014-06-12 18:43:16 +02:00
Dim3nsioneer
3c927901a4 Implementation of FW extruder change retract
FW retraction is extended onto swap retraction invoked by 'G10 S1'.
Bookkeeping of the retract state of all extruders allows for having one
extruder fw standard retracted while another extruder is swap retracted.
An LCD menu item for the swap retract and recover length was added.
2014-06-02 17:02:10 +02:00
neildarlow
efb6d61413 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-05-24 13:08:58 +01:00
nothinman
38192cb5f3 Add M112 description to Marlin_main 2014-05-20 15:20:19 +01:00
nothinman
aed5ec008a Merge pull request #851 from DanNixon/estop
Implemented M112
2014-05-19 17:55:34 +01:00
Erik van der Zalm
cfb98ef682 More coverity fixes 2014-05-15 22:09:50 +02:00
Erik van der Zalm
9db9842aea Fixed error found by the free coverity tool (https://scan.coverity.com/)
===================================================
Hi,

Please find the latest report on new defect(s) introduced to ErikZalm/Marlin found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 15 of 15 defect(s)

** CID 59629:  Unchecked return value  (CHECKED_RETURN)
/Marlin_main.cpp: 2154 in process_commands()()

** CID 59630:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp: 319 in tone(unsigned char, unsigned int, unsigned long)()

** CID 59631:  Missing break in switch  (MISSING_BREAK)
/Marlin_main.cpp: 1187 in process_commands()()

** CID 59632:  Missing break in switch  (MISSING_BREAK)
/Marlin_main.cpp: 1193 in process_commands()()

** CID 59633:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 914 in disable_heater()()

** CID 59634:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 913 in disable_heater()()

** CID 59635:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 626 in analog2temp(int, unsigned char)()

** CID 59636:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 620 in analog2temp(int, unsigned char)()

** CID 59637:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 202 in PID_autotune(float, int, int)()

** CID 59638:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 214 in PID_autotune(float, int, int)()

** CID 59639:  Out-of-bounds write  (OVERRUN)
/Marlin_main.cpp: 2278 in process_commands()()

** CID 59640:  Out-of-bounds read  (OVERRUN)
/Marlin_main.cpp: 1802 in process_commands()()

** CID 59641:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 51 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()

** CID 59642:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 45 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()

** CID 59643:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 32 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()

________________________________________________________________________________________________________
*** CID 59629:  Unchecked return value  (CHECKED_RETURN)
/Marlin_main.cpp: 2154 in process_commands()()
2148                 }
2149               #endif
2150             }
2151           }
2152           break;
2153         case 85: // M85
   CID 59629:  Unchecked return value  (CHECKED_RETURN)
   Calling "code_seen" without checking return value (as is done elsewhere 66 out of 67 times).
2154           code_seen('S');
2155           max_inactive_time = code_value() * 1000;
2156           break;
2157         case 92: // M92
2158           for(int8_t i=0; i < NUM_AXIS; i++)
2159           {

________________________________________________________________________________________________________
*** CID 59630:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp: 319 in tone(unsigned char, unsigned int, unsigned long)()
313         else
314         {
315           // two choices for the 16 bit timers: ck/1 or ck/64
316           ocr = F_CPU / frequency / 2 - 1;
317
318           prescalarbits = 0b001;
   CID 59630:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
   "ocr > 65535U" is always false regardless of the values of its operands. This occurs as the logical operand of if.
319           if (ocr > 0xffff)
320           {
321             ocr = F_CPU / frequency / 2 / 64 - 1;
322             prescalarbits = 0b011;
323           }
324

________________________________________________________________________________________________________
*** CID 59631:  Missing break in switch  (MISSING_BREAK)
/Marlin_main.cpp: 1187 in process_commands()()
1181         case 2: // G2  - CW ARC
1182           if(Stopped == false) {
1183             get_arc_coordinates();
1184             prepare_arc_move(true);
1185             return;
1186           }
   CID 59631:  Missing break in switch  (MISSING_BREAK)
   The above case falls through to this one.
1187         case 3: // G3  - CCW ARC
1188           if(Stopped == false) {
1189             get_arc_coordinates();
1190             prepare_arc_move(false);
1191             return;
1192           }

________________________________________________________________________________________________________
*** CID 59632:  Missing break in switch  (MISSING_BREAK)
/Marlin_main.cpp: 1193 in process_commands()()
1187         case 3: // G3  - CCW ARC
1188           if(Stopped == false) {
1189             get_arc_coordinates();
1190             prepare_arc_move(false);
1191             return;
1192           }
   CID 59632:  Missing break in switch  (MISSING_BREAK)
   The above case falls through to this one.
1193         case 4: // G4 dwell
1194           LCD_MESSAGEPGM(MSG_DWELL);
1195           codenum = 0;
1196           if(code_seen('P')) codenum = code_value(); // milliseconds to wait
1197           if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
1198

________________________________________________________________________________________________________
*** CID 59633:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 914 in disable_heater()()
908          WRITE(HEATER_0_PIN,LOW);
909        #endif
910       #endif
911
912       #if defined(TEMP_1_PIN) && TEMP_1_PIN > -1
913         target_temperature[1]=0;
   CID 59633:  Out-of-bounds write  (OVERRUN)
   Overrunning array "soft_pwm" of 1 bytes at byte offset 1 using index "1".
914         soft_pwm[1]=0;
915         #if defined(HEATER_1_PIN) && HEATER_1_PIN > -1
916           WRITE(HEATER_1_PIN,LOW);
917         #endif
918       #endif
919

________________________________________________________________________________________________________
*** CID 59634:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 913 in disable_heater()()
907        #if defined(HEATER_0_PIN) && HEATER_0_PIN > -1
908          WRITE(HEATER_0_PIN,LOW);
909        #endif
910       #endif
911
912       #if defined(TEMP_1_PIN) && TEMP_1_PIN > -1
   CID 59634:  Out-of-bounds write  (OVERRUN)
   Overrunning array "target_temperature" of 1 2-byte elements at element index 1 (byte offset 2) using index "1".
913         target_temperature[1]=0;
914         soft_pwm[1]=0;
915         #if defined(HEATER_1_PIN) && HEATER_1_PIN > -1
916           WRITE(HEATER_1_PIN,LOW);
917         #endif
918       #endif

________________________________________________________________________________________________________
*** CID 59635:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 626 in analog2temp(int, unsigned char)()
620       if(heater_ttbl_map[e] != NULL)
621       {
622         float celsius = 0;
623         uint8_t i;
624         short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]);
625
   CID 59635:  Out-of-bounds read  (OVERRUN)
   Overrunning array "heater_ttbllen_map" of 1 bytes at byte offset 1 using index "e" (which evaluates to 1).
626         for (i=1; i<heater_ttbllen_map[e]; i++)
627         {
628           if (PGM_RD_W((*tt)[i][0]) > raw)
629           {
630             celsius = PGM_RD_W((*tt)[i-1][1]) +
631               (raw - PGM_RD_W((*tt)[i-1][0])) *

________________________________________________________________________________________________________
*** CID 59636:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 620 in analog2temp(int, unsigned char)()
614         if (e == 0)
615         {
616           return 0.25 * raw;
617         }
618       #endif
619
   CID 59636:  Out-of-bounds read  (OVERRUN)
   Overrunning array "heater_ttbl_map" of 1 2-byte elements at element index 1 (byte offset 2) using index "e" (which evaluates to 1).
620       if(heater_ttbl_map[e] != NULL)
621       {
622         float celsius = 0;
623         uint8_t i;
624         short (*tt)[][2] = (short (*)[][2])(heater_ttbl_map[e]);
625

________________________________________________________________________________________________________
*** CID 59637:  Out-of-bounds write  (OVERRUN)
/temperature.cpp: 202 in PID_autotune(float, int, int)()
196       {
197          soft_pwm_bed = (MAX_BED_POWER)/2;
198          bias = d = (MAX_BED_POWER)/2;
199        }
200        else
201        {
   CID 59637:  Out-of-bounds write  (OVERRUN)
   Overrunning array "soft_pwm" of 1 bytes at byte offset 1 using index "extruder" (which evaluates to 1).
202          soft_pwm[extruder] = (PID_MAX)/2;
203          bias = d = (PID_MAX)/2;
204       }
205
206
207

________________________________________________________________________________________________________
*** CID 59638:  Out-of-bounds read  (OVERRUN)
/temperature.cpp: 214 in PID_autotune(float, int, int)()
208
209      for(;;) {
210
211         if(temp_meas_ready == true) { // temp sample ready
212           updateTemperaturesFromRawValues();
213
   CID 59638:  Out-of-bounds read  (OVERRUN)
   Overrunning array "current_temperature" of 1 4-byte elements at element index 1 (byte offset 4) using index "extruder" (which evaluates to 1).
214           input = (extruder<0)?current_temperature_bed:current_temperature[extruder];
215
216           max=max(max,input);
217           min=min(min,input);
218           if(heating == true && input > temp) {
219             if(millis() - t2 > 5000) {

________________________________________________________________________________________________________
*** CID 59639:  Out-of-bounds write  (OVERRUN)
/Marlin_main.cpp: 2278 in process_commands()()
2272               tmp_extruder = code_value();
2273               if(tmp_extruder >= EXTRUDERS) {
2274                 SERIAL_ECHO_START;
2275                 SERIAL_ECHO(MSG_M200_INVALID_EXTRUDER);
2276               }
2277             }
   CID 59639:  Out-of-bounds write  (OVERRUN)
   Overrunning array "volumetric_multiplier" of 1 4-byte elements at element index 1 (byte offset 4) using index "tmp_extruder" (which evaluates to 1).
2278             volumetric_multiplier[tmp_extruder] = 1 / area;
2279           }
2280           break;
2281         case 201: // M201
2282           for(int8_t i=0; i < NUM_AXIS; i++)
2283           {

________________________________________________________________________________________________________
*** CID 59640:  Out-of-bounds read  (OVERRUN)
/Marlin_main.cpp: 1802 in process_commands()()
1796             int pin_status = code_value();
1797             int pin_number = LED_PIN;
1798             if (code_seen('P') && pin_status >= 0 && pin_status <= 255)
1799               pin_number = code_value();
1800             for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
1801             {
   CID 59640:  Out-of-bounds read  (OVERRUN)
   Overrunning array "sensitive_pins" of 28 2-byte elements at element index 55 (byte offset 110) using index "i" (which evaluates to 55).
1802               if (sensitive_pins[i] == pin_number)
1803               {
1804                 pin_number = -1;
1805                 break;
1806               }
1807             }

________________________________________________________________________________________________________
*** CID 59641:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 51 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()
45     }
46
47     LiquidCrystal::LiquidCrystal(uint8_t rs,  uint8_t enable,
48     			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
49     {
50       init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
   CID 59641:  Uninitialized scalar field  (UNINIT_CTOR)
   Non-static class member "_initialized" is not initialized in this constructor nor in any functions that it calls.
51     }
52
53     void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
54     			 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
55     			 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
56     {

________________________________________________________________________________________________________
*** CID 59642:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 45 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()
39     }
40
41     LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
42     			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
43     {
44       init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
   CID 59642:  Uninitialized scalar field  (UNINIT_CTOR)
   Non-static class member "_initialized" is not initialized in this constructor nor in any functions that it calls.
45     }
46
47     LiquidCrystal::LiquidCrystal(uint8_t rs,  uint8_t enable,
48     			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
49     {
50       init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);

________________________________________________________________________________________________________
*** CID 59643:  Uninitialized scalar field  (UNINIT_CTOR)
/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.cpp: 32 in LiquidCrystal::LiquidCrystal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)()
26
27     LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
28     			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
29     			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
30     {
31       init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
   CID 59643:  Uninitialized scalar field  (UNINIT_CTOR)
   Non-static class member "_initialized" is not initialized in this constructor nor in any functions that it calls.
32     }
33
34     LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
35     			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
36     			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
37     {

________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/2224?tab=overview
2014-05-14 21:59:48 +02:00
Neil Darlow
e541323741 Merge https://github.com/ErikZalm/Marlin into Marlin_v1 2014-05-09 15:02:50 +01:00
MyMakibox
21ec6b88c3 Update Marlin_main.cpp
Added description of autotemp flags to M109
2014-04-23 17:33:26 +08:00
Neil Darlow
6adbdf42e0 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-04-21 15:10:57 +01:00
whosawhatsis
27d544ac25 Speed up QUICK_HOME feedrate for diagonal move
Speed up the diagonal move while still keeping each individual axis at
or below its homing feedrate.
2014-04-19 17:29:20 -07:00
neildarlow
95ad6ec9a1 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-04-12 22:20:45 +01:00
Gabe Rosenhouse
27a7cf9fcf use existing strings 2014-04-07 05:01:48 -05:00
Gabe Rosenhouse
b0aeac117f Adjustable Z probe offset, via custom M-code 2014-04-06 19:45:56 -05:00
Neil Darlow
73b380d8d2 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-04-06 19:15:29 +01:00
nothinman
c23376f2e7 Merge pull request #837 from whosawhatsis/fwretract
FWRETRACT in mm/s
2014-04-04 11:47:58 +01:00
nothinman
9a5d23d96f Merge pull request #866 from sakunamary/Marlin_v1
fix bug for dual extruders not working
2014-04-02 18:27:42 +01:00
nothinman
303ee67896 Merge pull request #864 from whosawhatsis/M200
fix bug in M200 with multiple extruders
2014-04-02 18:26:15 +01:00
Tim
8759508319 fix bug for dual extruders not working
some guy find that marlin not working good for dual extruders delta .
when type T0 or T1 to active extruder and  E0 or E1  move causing XYZ
motion . so i locales the bugs and fix it , I have dry run the fix.
2014-04-01 09:26:19 +08:00
whosawhatsis
a65564eef6 fix bug in M200 with multiple extruders 2014-03-30 11:42:22 -07:00
whosawhatsis
aeaf9b9312 fix bug in M200 with multiple extruders 2014-03-30 11:41:57 -07:00
Dan Nixon
f643f4d674 Test and refactor 2014-03-21 20:42:00 +00:00
neildarlow
bbe8fbe13d Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2014-03-21 18:27:14 +00:00
Dim3nsioneer
3906f27c46 Individual extruder flow rate
Extension of M221, Tune menu
2014-03-15 18:09:46 +01:00
Dan Nixon
a38c90ee84 Added estop handling 2014-03-15 15:56:15 +00:00
Dan Nixon
272072fa20 Added M112 2014-03-14 23:19:43 +00:00
whosawhatsis
aab61e63c3 FWRETRACT in mm/s
Firmware retraction now stores the retract and recover speeds in mm/s
instead of mm/min. This makes it match the units of the maximum
feedrate, and fixes problems with modifying the value via LCD control
panel. From gcode, the values are still taken in mm/min to match the
units of G1 and similar, and they are converted to mm/s before they are
stored.

I also lowered the default retract feedrate to make it less likely to
cause problems for geared extruders when the user hasn’t bothered to
set a reasonable maximum feedrate, though users should be setting both
of these values to suit their hardware.
2014-03-14 15:17:28 -07:00
blddk
09af1b90b8 Added CHDK support
Added CHDK support to take pictures instead of doing an IR command, see more about how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
2014-03-10 21:57:08 +01:00
neildarlow
7325d7102e Activate LiquidTWI2 device detection and space-pad LCD status line. 2014-03-03 21:01:27 +00:00
Jim Morris
8ea5665ee2 Merge remote-tracking branch 'origin/Marlin_v1' into add/M665-set-delta-configuration
Conflicts:
	Marlin/Marlin_main.cpp
2014-02-26 00:19:28 -08:00
Cylindric
fdce91192e Various typo fixes - only in comments, no code changes. 2014-02-25 10:01:15 +00:00
whosawhatsis
77df0d689a autretract fix
I made these changes previously, but I can’t find the commit now. This
reapplies the changes to get auto retract working again.

Conflicts:
	Marlin/Configuration_adv.h
	Marlin/Marlin_main.cpp
2014-02-24 13:24:38 -08:00
Gabe Rosenhouse
174b8d99d5 Simplify 3-point probing using new code only 2014-02-19 21:48:05 -08:00
Gabe Rosenhouse
3b718b816c better documentation 2014-02-19 14:04:37 -08:00
Gabe Rosenhouse
34fd59c370 ABL at any points 2014-02-19 13:18:21 -08:00