Refactored printing to strings and web server json response handling in
preparation for adding support for LCD display via serial link
Added a timer to record how long block writes to SD card take
Changed compiler optimization option to -O2 (was accidentally reset to
-Os in previous release)
Set the number of decimal places reported in the responses to various M
commands
Integrated zpl's changes to returning lists of files, returning info for
file being printed, and some network layer changes
Fixed bug: if 5 point bed compansation was used then doing G32 more than
once would try to move the head off the edge of the bed unless the first
4 probe coordinates were reset between them.
Fixed bug: if the last command in a a macro file did not end in newline
then it might not be fully executed
Bug fix: potential array underrun in Gcodes::Pop()
Reduced Z dive height back to 5mm
M563 command extended to allow the tool number origin to be adjusted. If
there is no P parameter in the command then the S parameter specifies an
offset to be added to tool numbers in T, G10, M104 and M109 commands.
This is so that multi-media gcode files generated by slic3r can be
printed without having to edit all the tool numbers in the gcode file
first. This extension is intended to be temporary, until slicer provides
a mechanism for specifying the tool numbers. A separate offset is
maintained for each data source (USB, web or SD card) and the offset for
data from the SD card is reset to zero when a new file is started. To
use this facility to print slic3r multi-media gcode files, add M563 S1
to your start gcode.
M104 and M109 commands now accept an optional T parameter to specify the
tool number, as generated by slic3r in multi-media gcode files.
Movement code from RepRapPro's dev branch incorporated, including
5-point manual or automatic bed compensation mechanism.
Heater status (off/standby/on) is included in the status poll response
for the web interface. This will be used in a future version of the web
interface.
Incorporated code from RepRapPro dev branch to allow many more
M-commands to return values as well as set them.
Incorporated code from RepRapPro dev branch to implement the M119 and
M135 commands. There is currently a bug in the M135 (set heat sample
interval) command, which means that if you change the interval from its
default value of 0.5 seconds then you need to adjust the I parameter by
the same ratio and the D parameter by the inverse ratio.
Extrusion totals are reset to zero when starting a new print from SD
card.
M301 and M304 commands to set PID parameters now take an additional S
parameter. This allows for variations in cartridge heater power and
supply voltage to be taken into account more easily.
Temperature errors are reported to the web server as well as to USB.
The Heat section of the M122 diagnostics report now shows the
accumulated PID I-term.
G90 and G91 commands now affect only the the axes, not the extruders.
Bug fix: numerous calls to strncat were being made with a 'nchars'
parameter that was larger than space available in the destination
buffer.
Bug fix: print moves received just prior to an M109 or M190 command were
not executed until after the heater had reached temperature instead of
before.
Bug fix: using G10 to set oly the active temperature caused the standby
temperature to be set to an undefined value, and vice versa
G10 can now be used to retrieve the active and standby temperatures as
well as set them
Bug fix: I and D parameters were set to incorrect values when the M301
and M304 commands were used. They also reported the incorrect values.
New T parameter added to M301 and M304 commands, to allow the I term to
be preset to a suitable value when PID kicks in
Adjusted default PID parameters for lower overshoot and less oscillation
Bug fix: when axis or bed compensation was enabled a homing move to seek
for one endstop could be prematurely terminated by another endstop
M122 command only outputs LWIP stats if debug is enabled. Prevents a
hang if no UDB cable is connected when M122 is executed.
Bug fix: when resetting, the heaters used to power up for a short time
M0 and M1 commands now turn the heaters off instead of to standby
Web server status poll response now includes the selected tool number
Fixed M122 so that diagnostics are sent to the web interface as well as
USB
Fixed M220 command to respond to speed change requests faster
Count the number of active extruders and heaters, and only send their
values to the web interface, subject to a minimum of 2 heaters and 1
extruder
Fixed buffer overrun bug in FTP LIST command that caused a subsequent
FTP delete command to crash. Increased file list buffer to 2000 bytes.
Added binary RepRapFirmware-057k-dc42.bin.
Merged in zpl's changes. The FTP server is not yet reliable, in
particular trying to delete a file via FTP after copying another may
result in the Duet rebooting due to the webserver module getting stuck
in a spin loop. Also the copied file has on one occasion been observed
to be shorter than the original.
Changed webserver to support HTTP requests that span multiple TCP
messages. Changed upload code to to block file writes direct fro the
received message. Increased maximum upload message size. Changed
fileinfo command to report layer height and what program generated the
gcode file, if available.
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.
Rewrote the web server command parsing as a state machine. Added support
for persistent connections, used for file uploading. Changed file upload
protocol to pass status information back. Added web message type for
deleting files.
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.
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.
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
Turn Z probe type 2 LED on even if an M558 P1 is sent. This means that a Probe 2 will
emulate a Probe 1 if the user mistakenly sends M558 P1 to it. Also both Probe 1
and Probe 2 will work properly if they are properly selected (as before).
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.
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.
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
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
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
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.
/*Fixed to work with multiple concurrent extruder drives:
* Default or M160 S1 (set use only one extruder drive)
* "G1 En.n" adds the float n.n to the move buffer for the selected
head
* There is no change in behaviour for one extruder drive setups, or
multiple extruder
* setups where only one drive is used at any one time.
*
* M160 Sn (set to use "n" extruder drives) eg
* "M160 S3"
* "G1 En.n:m.m:o.o" adds the floats to the move buffer in the
following way:
* moveBuffer[AXES+selectedHead) = n.n
* moveBuffer[AXES+selectedHead+1) = m.m
* moveBuffer[AXES+selectedHead+2) = o.o
* so if selectedHead=0 move buffer ends up looking like this for a 5
extruder drive setup:
* {x.x, y.y, z.z, n.n, m.m, o.o, 0.0,0.0, f.f}
* where x,y,z are the axes and f is the feedrate.
* If selected head > 0 then there is the possibility that more drives
can be set than
* exist, in that case the last values are discarded e.g:
* "T3"
* "M160 S3"
* "G1 En.n:m.m:o.o"
* would leave the move buffer on a 4 extruder drive setup looking
like this:
* {x.x, y.y, z.z, 0.0, 0.0, 0.0, n.n,m.m, f.f}
*/
Completed changes to support multiple concurrent HTTP file requests.
Added support for new poll response for future support of additional
heaters and multiple extruders. Fixed a bug in reporting extruder
distance.
Changed webserver and network code to support multiple concurrent
connections
Removed support for differential-mode ultrasonic z-sensor
Reduced X and Y instantDv from 15 to 10 mm/sec to allow outlines of
holes to e drawn at lower speed
Changed temperature reading code to give thermistor disconnected reading
of -273C when there is a negative high ADC offset correction
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.
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.
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.
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.
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.
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
This will allow for multi extruder printing support in future pull
requests. It works fine for single extruder setups as well as the
selected head is always E0.
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.
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.
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.
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.
Increase TCP window size from 1 to 2 packets and increase maximum amount
of web data sent to 1460. This decreases the page load time fro a
Windows client fro 6 seconds to less than 1 second. It also fixes a
problem whereby when using a Ubuntu client, file upload and direct print
didn't work unless the reprap.js file was edited to reduce the maximum
amount of data sent per request. Also we now initialize unused memory
with known data so that in response to the M111 S1 command we can better
estimate the amount of free memory.