Commit graph

116 commits

Author SHA1 Message Date
David Crocker
e94b299a88 Bug fixes
Got M221 command working again (broken by last merge)
Fix issue with printing Treito's file after a pause and reset
2014-06-09 18:23:56 +01:00
David Crocker
73724a4b9a Merged RepRapRro's 0.65e version in
Merged changes (mostly to handle multiple tools i.e. extruders) from
RRP's 0.65e version.
2014-06-04 17:39:36 +01:00
David Crocker
8464b5bfac 059d-dc42 release
1. Reworked network layer to be more robust in the presence of network
errors (hopefully). In particular, don't release transmit buffers if
they might still be needed to retry sending data because the ACK got
lost.
2. Fixed bug whereby fileinfo command looked for the print height and
filament used if the extensio was .gcode or .gc or .gco but not if it
was .g.
3. When the M25 (pause print) command is received, pause the current
gcode so that commands such as M116 (wait for temperatures) can be
interrupted.
2014-05-29 23:14:55 +01:00
David Crocker
156aa79c07 New file upload protocol
Introduced new file upload protocol that doesn't use gcodes and allows
upload errors to be reported back. Changed file system interface in
Platform to return success/fail status of Write and Close calls to
support this.
2014-05-22 16:30:55 +01:00
David Crocker
75829fcaad File upload + other improvements
Added new request code rr_data for file uploading, and made other
changes to improve file upload speed.
Implemented S parameter to M208 command, to allow the negative limits of
axes to be set. Also reports current limits of no X/Y/Z parameter.
Reduced max reported free buffer size to 950 bytes to avoid problems
with file upload from Windows 8.1.
2014-05-18 20:57:14 +01:00
David Crocker
a416c367d2 Various bug fixes and enhancements (version 0.59a)
Fixed bug whereby incoming gcodes were URI-decoded twice, which could
cause problems if a comment contain a % character
Fixed bug whereby M109 and M190 waited for all heaters to reach target
temperature instead of just the one involved
Fixed bug whereby files whose names contain an uppercase letter G could
not be uploaded or deleted
Increase buffer size for incoming gcodes
Removed parameter to set max PWM value in M106 command. Max PWM value is
now 255 as per recent RepRapPro change.
Changed the code that deals with dropping characters in unimportant
messages sent to USB such that we only drop characters at the end of a
line (adding ".\n" to whatever we send) or drop whole lines
2014-05-14 22:04:14 +01:00
David Crocker
ceae4df7a1 Fix jerky SD card printing when no network cable
Fixed problem whereby gcode files printed from SD card that used lots of
small fast moves in sequence would print jerkily if a network cable had
not been connected since reset.
Fixed problem whereby object height and filament needed were not
retrieved from the SD card file to be printed if the filename contained
spaces.
Added support for deprecated M190 command, because slic3r appears to
generate it sometimes
Added support for M564 command to allow movement without limits, copied
from RepRapPro dev branch
2014-05-05 18:47:22 +01:00
David Crocker
6c1aeb0277 Close file if necessary after network error
If a network error occurs when sending a file, we now close that file,
otherwise we would use up open file entries. Also added number of
available open file entries to M111 S2 command.
2014-05-02 20:37:57 +01:00
David Crocker
11bb293b10 Fixed file handling for pause/resume
Fixed bug in file handling that affected SD card pause/resume
operations. Merged changes from zombiepantslol to allow a height to be
set for a Z endstop switch. Reverted to blocking USB I/O but only for
debug and M503 output. Added return codes for file close and seek
operations. Increased the size of the tail of the file that we scan for
G1 Z commands from 32K to nearly 200K.
2014-05-01 01:49:37 +01:00
David Crocker
406a0c074f Fixed nested file bug, other minor changes
Fixed a bug when one file was called from another
M111 S2 command now displays time since last reset
M106 'I' parameter now only inverts fan PWM when >0
Non-homing moves when bed probing are now done at max speed
M999 reset command now delays 0.5 second to allow response to be sent
back to browser, otherwise it may retry the reset
2014-04-29 23:21:31 +01:00
dc42
81b213752b Merge pull request #1 from zombiepantslol/duet
Added new "I" parameter to M106
2014-04-29 19:02:20 +01:00
David Crocker
a8e9029478 Work around SDHC stack bug
Reduced block read size when retrieving file info to work around an
intermittent bug that causes the SDHC card/ FATfs stack to return data
from the wrong sector sometimes. Tidied up some other code.
2014-04-28 01:13:00 +01:00
zombiepantslol
fe72890dad Added new "I" parameter to M106. Any non-zero value will invert the cooling fan PWM value. 2014-04-26 16:34:12 +02:00
David Crocker
2e154a3e91 Various
Added new variable "extr" in Json response to report extruder positions
Added new fileinfo request type, returns file size, object height, and
total filament needed (if available)
Fixed bug in returning last command response in Json response
Disable interrupts when adding/removing network request structs from
linked lists, in case lwip does callbacks from ISR contexts
2014-04-25 23:15:17 +01:00
David Crocker
d9c9fa8f59 Network startup & other changes
Changed network startup to avoid long delay if no network cable is
connected
Enable DHCP support if IP address is configured as 0.0.0.0 (not working
yet)
Move thermistor parameters to M305, added parameter to configure series
resistance
Added B and W PID parameters
2014-04-19 14:14:54 +01:00
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