Commit graph

73 commits

Author SHA1 Message Date
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
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
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
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
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
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
c09afc035b Fixed slow printing over USB
Fixed printing over USB and via HTTP so that it uses the same lookahead
mechanism as for printing from SD provided the data arrives fast enough.
Added an incoming buffer for data arriving from USB. NOTE: Pronterface
needs to be patched  to send the data fast enough for this to work well.
Also changed signatures of some member functions to be const-correct
2014-01-11 20:56:53 +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
71c1571c6c Synchronising duet branch with the mastr branch. 2013-12-27 15:02:04 +00:00
Adrian Bowyer
c12ebed79c All axis homing now done with canned cycle files. 2013-12-23 18:07:16 +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
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
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
Adrian Bowyer
00a0ffd9b4 Homing against max endstop for Y (and X) implemented when there is a top
endstop but not a bottom one.
2013-11-25 11:03:36 +00:00
Adrian Bowyer
4c74c4eb30 Upload of reprap.htm implemented (M560). The file must end "<!-- **EoF** -->" without the quotes. 2013-11-20 22:13:23 +00:00
Jean-Marc Giacalone
3b0dd0ec58 Upload of configuration file config.g implemented with M559. 2013-11-20 10:25:44 +00:00
Adrian Bowyer
ec5f5fe536 M503 implemented. Prints the config file to USB. 2013-11-19 16:10:53 +00:00
Adrian Bowyer
21424714f7 File upload mechanism also now works with the web code. If we can open a user's GCode file in the Javascript this will allow web uploads. Horay! See: http://www.html5rocks.com/en/tutorials/file/dndfiles/ 2013-11-18 17:40:14 +00:00
Adrian Bowyer
3dc0c7a27e GCode file upload via USB working. 2013-11-18 15:04:32 +00:00
Adrian Bowyer
965f41e953 Shifted new M codes to start at M550. Added setting of Netmask and gateway. 2013-11-17 22:10:14 +00:00
Adrian Bowyer
104528ab66 Added user-selection of IP address via M502. 2013-11-17 17:58:30 +00:00
Adrian Bowyer
68e0f833df Marlin emulation implemented. Pretty much working, but not extensively tested. 2013-11-14 23:32:50 +00:00
Adrian Bowyer
bd51a7c3f0 Fixed Timer overflow bug. 2013-11-13 23:23:31 +00:00
Adrian Bowyer
f907e2253e All responses to GCodes routed through a single function in the class GCodes
to allow the firmware to emulate how other firmware (e.g. Marlin) responds.  Emulation not yet implemented, but should now be easy.
2013-11-11 17:39:17 +00:00
Adrian Bowyer
971fed0d02 Temperature range checking added (see Configuration.h). If temps repeatedly
fall outside the set range, it assumes the thermistor is bust and turns off the heater.
2013-11-10 21:55:44 +00:00
Adrian Bowyer
e8eafeda22 Hooks added for (I hope) the final and complete set of all parameter-changing
M Codes that we will need.  Network initialisation delayed until after the
config.g file is run, to allow machine name etc to be set from that.
2013-11-10 19:39:13 +00:00
Adrian Bowyer
fa9b0d1478 Fixed small bug that prevented absolute extrude moves working right. 2013-11-06 11:10:26 +00:00
Adrian Bowyer
4f703d86ec Various minor G/M codes implemented like M0. Z start speed and acceleration reduced; they were a bit fierce before. 2013-10-29 22:27:49 +00:00
Adrian Bowyer
708822a54e A couple of tidyings and additions:
1. Z home now moves home, rather than just setting the coordinate.
2. Wait for temps implemented.

Also the JSON requests for the g code filelist has been temporarily commented
out in reprap.htm.  It was causing the firmware to hang sometimes.  To be investigated.

Machine now prints nicely...
2013-10-22 18:27:12 +01:00
Adrian Bowyer
79c008d469 G31 modified to allow reporting of probe values, and setting of a Z value and threshold. (See http://reprap.org/wiki/G-code#G29-G32:_Bed_probing) 2013-10-20 22:48:26 +01:00
Adrian Bowyer
de96171b5d Z probe code improved, but still not there. It now uses hysteresis to
track up the low-precision slope of the IR probe before measuring down
the high-precision slope near 0 mm.  But this means that the probe has to
be set only a fraction of a mm higher than the nozzle itself.  Also (at
the moment for safety) the code thinks Z = 0 occurs when it is actually
0.2mm.  This is easy to fix when the rest is reliable.
2013-10-17 23:18:57 +01:00
Adrian Bowyer
49e9bc29c3 G92 Implemented. Tested interactively, but not from a G Code file. Should work though. 2013-09-27 18:15:49 +01:00
Adrian Bowyer
d525597ebb Z probing being implemented under G32. Not finished yet, so don't call G32... 2013-09-13 22:33:14 +01:00
Adrian Bowyer
e3fd24ca95 Configuration file (in sys/config.g) implemented. 2013-09-05 16:10:44 +01:00
Adrian Bowyer
07d323a41d Setting up latest Due code to work on the Duet. 2013-08-28 16:36:38 +01:00
Adrian Bowyer
7e282c96ea Added serial transmission of GCodes via USB. 2013-08-05 23:45:31 +01:00
Adrian Bowyer
f23b286f1d Fix added for feedrate "bug" in Slic3r. 2013-07-18 20:14:43 +01:00
Adrian Bowyer
874e6e0baf First working version. Horay! 2013-07-18 12:15:05 +01:00