Commit graph

74 commits

Author SHA1 Message Date
David Crocker
3520c24546 Version 0.78m preliminary
1. Fixed  variable name of extrusion factors in JSON status response
2. Fixed bug: changing heat sample interval no longer messes up I and D
pid factors.
3. Ensure that name of file being printed is null-terminated.
4. Removed redundant function SetStepHypotenuse.
2014-08-24 22:49:01 +01:00
David Crocker
13f2ab5bfd Version 0.78k
Fixed combined xyz move bug (thanks zpl). Reversed default direction of
X motor. Added support for M569 command. Fixed bug in execution of M503
command via web interface.
2014-08-20 08:36:28 +01:00
David Crocker
46d78148b0 Version 0.78j
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
2014-08-17 22:14:33 +01:00
David Crocker
83d2732fd9 Version 0.78i
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
2014-08-11 15:16:15 +01:00
David Crocker
2a818bcfc0 Version 0.78h
Added a few more improvements from RRP's dev branch
Corrected M201 output
Added a few more minor fixes
2014-08-03 11:17:48 +01:00
David Crocker
30b67ff40a Version 0.78g
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
2014-07-30 15:54:17 +01:00
David Crocker
b9d6994ba5 Version 0.78f-dc42
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.
2014-07-28 18:02:14 +01:00
David Crocker
ba77d05bc3 Version 0.78e-dc42
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.
2014-07-21 10:39:52 +01:00
David Crocker
8bab7ab035 Version 0.78d-dc42
M116 now accepts a P parameter so that you can wait just for the heaters
associated with a particular tool
M220 and M221 commands report the current override factor if no S
parameter is provided
Multiple "Filament used" values from gcode files are reported to the web
interface
Active and standby temperatures for all heaters are reported to the web
interface
Bug fix: defining a tool with no drives or no extruders would cause it
to use a collection of drives or extruders depending on the values of
un-initialised array elements
Bug fix: running a macro file would reset the extruder position to a
value depending on what extrusion (if any) was requested by the last
movement command in the macro file
2014-07-17 00:28:26 +01:00
David Crocker
71037ee4cd Version 0.78c-dc42
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
2014-07-15 15:17:41 +01:00
David Crocker
3053359b30 Post-merge fixes
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
2014-07-06 23:06:49 +01:00
David Crocker
57704f033b Merge RRP's 0.78 version and my 0.65k version 2014-07-06 19:57:21 +01:00
David Crocker
85eb922504 Fixed FTP bug and added binary (version 0.65k-dc42)
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.
2014-07-05 15:47:45 +01:00
Adrian Bowyer
2b96c2b6f6 Version 0.78
Release.
2014-07-03 13:10:36 +01:00
David Crocker
4eaeac108b Merged in zpl's changes for FTP and Telnet 0.65k)
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.
2014-06-28 18:21:01 +01:00
David Crocker
8169d96d52 More bug fixes
Corrected returned values of speed factor and extrusion factor
When setting the machine name and password, stop at the first control
character, and remove trailing spaces
2014-06-21 22:53:27 +01:00
David Crocker
fe2b31a550 Version 0.65i
Improved speed of response to M220 command
Limit length of text returned in response to rr_name web command, stop
on first control character, and escape and quote or backslash characters
2014-06-21 14:01:23 +01:00
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
08f7d2e9b1 Support HTTP requests longer than TCP MSS
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.
2014-06-01 21:07:47 +01:00
David Crocker
9366ef8e84 Allow network requests to span multiple TCP pkts
Incoming network requests can now span multiple TCP messages. Max upload
buffer increased to 2048. Also return layerHeight and generatedBy values
when asking for fileinfo on a gcode file. This is an interim commit that
needs cleaning up before release.
2014-06-01 10:51:33 +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
ce0a2a799a Faster and more reliable file uploading
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.
2014-05-23 22:27:35 +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
Adrian Bowyer
dfeed15d53 Version 0.65c. The way that the Webserver class responds to a poll request
has been altered to send the X, Y, Z, and E coordinates first, followed by temperatures.
It was the other way round.  This led to compatibility problems between versions as
the experimental multiple tool versions (duet branch V0.70+) report many temperatures
and this was confusing the X Y Z stuff if the temps came first.  We can only realistically have one
live version of reprap.js (served from RepRapPro's Github to all running machines), so reprap.js
now expects coordinates first, and both this master version and all future master and experimental
versions will do that.
2014-05-08 21:17: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
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
David Crocker
f06527f67b Fix for slic3r 1.1.1
Changed code that looks for G1 Z commands to find object height, so that
it ignores G1 Z commands in the end-of-file comments added by slic3r
1.1.1
Increased max number of open files
2014-04-27 10:01:04 +01: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
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
Adrian Bowyer
33cf94e0cf Z probe averaging fixed. Loop timer added (try M122). Code reverted to the point where it worked... 2014-04-10 15:56:47 +01:00
David Crocker
009a2045d0 Concurrent HTTP connection support & more
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.
2014-04-08 13:20:06 +01:00
Adrian Bowyer
17b533fe2e Incorporating some of dc42's enhancements. This compiles BUT IT HASN'T BEEN TESTED. Use with extreme caution. 2014-04-07 22:15:19 +01:00
David Crocker
68e6ed2575 Preliminary version for serving all files for Duet
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
2014-04-06 22:50:24 +01: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
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
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
Adrian Bowyer
1129fa218f Added in David Crocker's improvements (many thanks to him). 2014-02-11 11:23:28 +00:00
David Crocker
3e4a22196b Web interface improvements
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.
2014-02-05 17:58:05 +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
603c0c79c5 Web server direct print support
Speed up web server direct print mechanism so that Matt's web interface
can do direct prints without stuttering
2014-01-29 15:32:10 +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
3071e89167 Corrected a speling errror 2014-01-11 20:57:12 +00:00
David Crocker
1e444839e0 Improved network recovery from errors and fixed small temp cal error
Improved network error recovery so that it it possible to reconnect
after some types of network error have occurred
Corrected calculation of temperatures to give more accurate results
towards the limits of the ADC range
2014-01-07 13:42:30 +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