Commit graph

101 commits

Author SHA1 Message Date
David Crocker
f709cd082d Fixed USB output bug; added M80/M81 commands
Fixed problem with garbled USB output sometimes seen using version 057za
Added support for M80 and M81 commands
2014-04-16 10:35:40 +01:00
David Crocker
aaf6f7128e Better USB error recovery and diagnostics
Firmware now recovers from USB disconnection without halting. Needs
changes to Arduino core library.
Added a timeout in the Spin() functions, which causes diagnostic info to
be stored and the system to be reset if a Spin() function takes more
than 20 seconds.
2014-04-16 00:00:45 +01:00
David Crocker
9149a1eb3a Fix M201 issue and support long filenames
When processing an M201 command, leave the acceleration of any axis that
is not specified as the existing value instead of setting it to a silly
value.
Corrected Platform.cpp to work with long filenames - note that this fix
requires a commented-out section of code in file ff.c in the SD_HSMCI
library to be re-instated.
2014-03-28 22:14:46 +00:00
David Crocker
92fefbf598 Fixed G32 auto bed compensation
Fixed bug introduced at version 057o-dc42 that broke the G32 bed
compensation. Added the Z heights of the bed compensation points to the
information displayed by M111 S2. Simplified the code that does
Z-probing in fast and slow stages. Added function sncatf and used it to
simplify the code in several places.
2014-03-26 18:07:49 +00:00
David Crocker
aa55c61e1d Changed the way the step ISR decides when to step
Changed the step interrupt service routine to use the average step size
when calculating the step interval, instead of the actual step size
which depend son whether X and Y are moving simultaneously. This should
give smoother movement, because from an inertial point of view the axes
are independent. It also fixes a bug whereby the accelerations were
incorrectly calculated, because DDA::AccelerationCalculation assumes a
uniform step size directly from start point to end point, whereas the
ISR was assuming a zigzag path. Also fixed bug with resetting the
minimum z-probe value seen when using an ultrasonic transducer in
differential mode.
2014-03-25 14:04:11 +00:00
David Crocker
b1558648cb Movement speed fix & ultrasonic z-sensor support
1. Fixed bug whereby the first XY move after a Z move would often be at
a speed much higher than requested.
2. Added support for direct-mode ultrasonic sensor using command M558
P3. Command M558 P4 selects differential-mode ultrasonic sensor.
3. Changed temperature parameter in G31 command from T to S.
2014-03-23 22:26:41 +00:00
David Crocker
9686ae924b ADC correction facility + absolute extruder moves
Added L and H parameters to the M301 and M304 commands to allow SAM3X
ADC offsets to be corrected for. Also attempted a fix for absolute
extruder movement. - but this will still be affected by rounding error.
Removed some old binaries.
2014-03-17 11:29:10 +00:00
David Crocker
e848a48e86 Various changes
1. Fixed bug introduced at version 57r whereby axis travel limits were
not applied properly.
2. Increased maximum travel on 2nd phase of Z-probing from 1mm to 10mm
3. Added parameters R (thermistor 25C resistance) and B (thermistor
beta) to M301 command
4. Added support for M304 command with same parameters as M301 command
5. PID and thermistor parameters are now saved to flash memory
2014-03-05 20:02:49 +00:00
David Crocker
21d688ece0 Various improvements
Tidied up axis homing tracking.
When checking endstops, wait for move to complete before accepting
further moves, otherwise subsequent moves use the wrong coordinates.
Temperatures and Z probes are now monitored continuously using a tick
interrupt to kick off ADC conversions. ADC is now run in 12-bit mode.
Thermistor readings are passed through averaging filters. Thermistors
are monitored for overheat conditions and bad readings in the tick ISR
and the appropriate heater is turned off (useful because the main loop
sometimes gets suspended while trying to do USB communication).
Use watchdog timer to monitor the tick interrupt - needs patch to
Arduino Due core library. Add facility to test watchdog timer (M111
S1001). Added an error status word to record that errors have occurred
(e.g. over-temperature).
M111 command changes so that S0 turns debug off, S1 turns debug on, S2
reports free memory - also now reports the type of the last restart and
the error status word. Fixed problem whereby M111 debug reports were not
sent to the web interface.
Implemented M999 command, which resets the Duet.
Removed an unused variable.
Changed some more "char*" to "const char*".
Changed extruder PID parameters and added more explanation for them.
2014-03-02 23:26:14 +00:00
David Crocker
2305dc27c9 Fixed cooling fan support (M106 command)
Fixed M106 command so that the cooling fan is controllably by PWM and
works the right way round (0 = off, 1 = on). Also added optional P
parameter to specify the value that corresponds to maximum PWM.
2014-02-25 19:39:16 +00:00
David Crocker
2b7b9fc505 Fixed error with z-homing in previous release
Fixed a random hang after z-homing in the previous release. Also make Z
probe temperature coefficient default to zero always, and Z probe
calibration temperature default to current bed temperature always.
2014-02-25 00:32:04 +00:00
David Crocker
92c17dede2 Various changes relating to zprobe and non-volatile data
1. Z-probing is now done in two stages: a fast stage at the configured
home feed rate until within 10% of the target value, then a slow stage
at 20% of that feed rate.
2. Provisional support for ultrasonic Z-probe.
3. Added calibration temperature and height temperature coefficient to Z
probe parameters.
4. Z-probe parameters and Z-probe type are now saved to flash memory so
that they survive power-off and reset cycles. Separate parameters are
retained for IR and ultrasonic probes in case both are fitted.
5. Fixed issue with doing slow Z-moves immediately after Z-homing or
probing.
2014-02-24 14:17:11 +00:00
David Crocker
fe0d5f38ee Improved PID parameters and made them configurable
Implemented M301 command to get/set PID parameters. Improved the PID
parameters and made minor changes to the PID algorithm to improve PID
performance with Ormerod hot end.
2014-02-08 23:52:24 +00:00
David Crocker
2d61bba024 G32 and G92 improvements
1. G92 with a Z value now sets exactly that Z value even if bed
compensation is in effect.
2. If G32 is run before the Z axis is homed, the first bed probe in the
G32 sequence homes the Z axiws.
2014-02-07 23:06:20 +00:00
David Crocker
0ef9d66ff1 Doing a G30 is equivalent to homing the Z-axis
Now sets the axisIsHomed flag for the Z-axis when a G30 command has been
executed successfully, because that puts the Z-axis at a known height.
2014-02-05 17:50:38 +00:00
David Crocker
66c934a791 File upload improvements
Further increased upload speed
When uploading files, preserve comments
2014-01-30 16:24:58 +00:00
David Crocker
9edaed4ac1 Further improvements to web upload and tidy-up
Further improved web file upload speed
Dealt with Eclipse code analysis warnings
Made some more functions and parameters const-correct
2014-01-30 14:26:45 +00:00
David Crocker
0c47fbc923 Add movement limits
Remember whether each axis has been homed. Don't allow z-homing or G31
procedure unless X and Y have been homed. If axes have been homed, limit
travel to size of bed.
2014-01-29 15:30:58 +00:00
David Crocker
e227dab386 Improvements to support Matt's web interface
Increase incoming web gcode buffer size to 1200 chars to allow more
gcodes to be sent in each message
Include free buffer size in poll response
Include response sequence number in poll response
Implement M30 (delete file) via USB interface
Support M503 and M111 commands via web interface
2014-01-27 18:15:46 +00:00
David Crocker
bdca3b1e5d Extend web functionality for iamburny's web interface
Added new fields "zprobe" and "resp" to webserver poll response
Immutable string parameters are passed as const char* not char*
Increase max number of files displayed to 42
Range-check heater parameters in incoming commands to avoid buffer
overflow if heater number is out of range
2014-01-21 21:07:21 +00:00
David Crocker
618304c021 Support for modulated IR sensor
Add code to support sensors that allow the IR output to be modulated, to
reduce the sensitivity to ambient IR. Use M558 P2 command to enable
sensor modulation. Also changed the sensor reading averaging code to
give more consistent z-height seeking.
2014-01-14 19:03:42 +00:00
Adrian Bowyer
14b247053f Removed legacy support for Duet v0.4 heaters. Last commit before changes to max velocity code. 2014-01-13 15:04:00 +00:00
David Crocker
ee70ee22ed Improve performance of SD card upload via USB
This change approximately doubles the speed of SD-card uploading via USB
to 2.2Mbyte/sec on the test system, provided that Pronterface has been
patched to not wait for an acknowledgement after sending each line of
g-code.
2014-01-12 16:02:49 +00:00
Adrian Bowyer
95a54f763f Macros made so that they can call macros. Beware recursion.... 2014-01-05 16:49:42 +00:00
Adrian Bowyer
387dae22cd P parameter added to M559, so that macros can be uploaded. 2013-12-30 23:09:46 +00:00
Adrian Bowyer
f746616e8c Workround added for bug in Pronterface (it sends 2 M24 commands on second file print). M24 is now ignored if a file
is actively printing.
2013-12-30 17:25:38 +00:00
Adrian Bowyer
71c1571c6c Synchronising duet branch with the mastr branch. 2013-12-27 15:02:04 +00:00
Adrian Bowyer
be1a790c47 Added more efficient canned cycle for when all three axes are being homed. 2013-12-23 21:25:40 +00:00
Adrian Bowyer
c12ebed79c All axis homing now done with canned cycle files. 2013-12-23 18:07:16 +00:00
Adrian Bowyer
10bf338aa4 Homeing after bed transform applied bug fixed in the duet branch. The master branch will be updated after some further testing. The problem was the X endstop. If X is homed, that stop is triggered. Homeing Y then only moves Y, and so only the Y endstop is tested. But when the transform is applied X moves slightly when Y is homed (as it should) and the X endstop stoped the movement prematurely. You will need to update the files on the SD card as well as the firmware to activate the fix. 2013-12-21 16:46:42 +00:00
Adrian Bowyer
4ed66b8b01 Experimental macro/canned-cycle on the SD implemented. 2013-12-19 23:30:23 +00:00
Adrian Bowyer
4feab9afce Homing modified to correspond with Ian's documentation... 2013-12-19 18:53:17 +00:00
Adrian Bowyer
e9539d97f0 Added M27 response. 2013-12-18 16:51:57 +00:00
Adrian Bowyer
e2a2ccc64b Bug whereby heaters would not restart after an M0 is received fixed. 2013-12-17 23:28:57 +00:00
Adrian Bowyer
6f275e0df1 Bug where by selecting an already selected extruder did not reply (eg "ok" to Pronterface) fixed. 2013-12-13 14:49:05 +00:00
Adrian Bowyer
cfdb9dcd89 Dud temperature count now has to reach 6 (about a second) before a heater trips out (Ian's request). Also heater reset M code (M562) added. Use that with great caution. 2013-12-11 14:11:51 +00:00
Adrian Bowyer
7215696e8b Function added to set hypotenuse lengths for multi-axis steps. These were previously computed on initialisation, but are now re-done after every M92. 2013-12-07 18:56:56 +00:00
Adrian Bowyer
91efcc4e48 M82 changed so that it reports steps/mm when given no arguments. 2013-12-06 20:56:08 +00:00
Adrian Bowyer
2022e8ab28 Various bits of file tidying... 2013-12-05 17:24:53 +00:00
Adrian Bowyer
d29058cf9d Bug in Z probing (the Move class had no function to return the number of probe points) fixed. 2013-12-05 13:22:01 +00:00
Adrian Bowyer
dd978290b5 Emergency stop added to the web interface (and Home All taken away, as you almost never want to home Z with the other two.) SD files tidied. 2013-12-04 15:36:26 +00:00
Adrian Bowyer
1a8ffb2d00 Second degree (ruled quadratic surface) bed plane compensation added. Probe three points to get plane compensation. Probe 4 [0 = min, 1 = max: (x0, y0), (x0, y1), (x1, y1), (x1, y0) in that order] to get second degree compensation. Also M115 print version added. 2013-12-03 14:46:28 +00:00
Adrian Bowyer
27ae5f8730 Fixed (I hope) G92 bug found by Tony. 2013-11-30 17:22:16 +00:00
Adrian Bowyer
dfbc35d369 Bug found by Tony in the offsetting code fixed (I hope). 2013-11-29 23:50:59 +00:00
Adrian Bowyer
f0b7da252b M561 reset bed transform to identity added. 2013-11-29 10:55:43 +00:00
Adrian Bowyer
f9fe813610 Improved functionality for G30; can now be set from pre-recorded
measurements as well as doing live probing (automatic or manual).
2013-11-28 12:54:00 +00:00
Adrian Bowyer
409af6bb11 Manual Z probing added to G30 (see http://reprap.org/wiki/G-code). 2013-11-28 11:57:38 +00:00
Adrian Bowyer
a4d8f41271 G31 now waits for moves to end before measuring/reporting. G30 implemented. Has argument Pn n = 0,1,2 - takes probe reading at current XY and calls them point n for the purpose of bed plane calculation. Add an S field on the last probe (i.e. when n=2 usually, though you can do them in any order) to get it to fit the bed plane. 2013-11-27 22:59:37 +00:00
Adrian Bowyer
7b9894e543 M206 implemented. This commit has the ethernet enabled and heaters set on by 1 (i.e. Duet v0.5 or below). 2013-11-26 15:12:24 +00:00
Adrian Bowyer
c0b7b4bace Working on the ether/USB problem. The network can now be disabled (#define NETWORK in Configuration.h). With it disabled the USB works with or without a network cable plugged in. With it enabled the USB only works with a network cable plugged in too. You have to wait for the ether to reinitialise (ether socket lights go out for a couple of secs, then come on, then the green one starts flashing) before trying to talk via the USB. The ether is initialised before config.g is run, so the IP is the one defined in platform.h. The network is disabled in this commit. The heaters are set on by 0, not 1 (i.e. Duet board v0.6 or later). To change this see #define HEAT_ON in platform.h 2013-11-26 13:38:23 +00:00