Commit graph

88 commits

Author SHA1 Message Date
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
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
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
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
41daff3d26 Reverted a buffer size to fix random print hang
Reverted STRING_LENGTH to 1029 to avoid random print hangs that occurred
using 0.57f firmware. Reduced max reported buffer size to fit within
this. Report additional memory usage detail in response to M111 S0.
2014-01-31 17:35:55 +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
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
82e23d4774 Make disconnected thermistor show temp as absolute zero again
In a previous commit I changed the temperature calculation to give more
accurate readings at extreme values. This change meant that a
disconnected thermistor no longer shows as absolute zero. Coupled with
the change in thermistor beta value, this meant that a disconnected
extruder thermistor would show as -28.2C, which is above the usual error
threshold of -30C. This commit introduces a special case for a
disconnected thermistor and restores the reading to absolute zero for
that case.
2014-01-15 13:42:59 +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
Adrian Bowyer
e7afc883c2 Merge remote-tracking branch 'dc42/duet' into duet 2014-01-12 17:37:01 +00:00
Adrian Bowyer
6188eff455 Some tidying. Increased SD delay to 20ms. 2014-01-12 17:35:56 +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
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
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
ef7e528bad README updated to include compile instructions. 2013-12-30 18:43:26 +00:00
Adrian Bowyer
71c1571c6c Synchronising duet branch with the mastr branch. 2013-12-27 15:02:04 +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
8b76430a9b RRP logo updated. 2013-11-30 15:48:03 +00:00
Adrian Bowyer
88a929eef4 One ether bug (starting the ether after reading config.g) fixed owing to Tony's brilliant debugging persistence. It still hangs if the ether is unplugged, so that's next on the list. 2013-11-26 21:04:25 +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
1792c68b49 Heater logic inverted for Duet v0.6. Remember to set HEAT_ON to 1 in platform.h for earlier versions, and to set it back _and_recompile_ before doing a commit for Duet v0.6 of higher 2013-11-25 16:39:46 +00:00
Adrian Bowyer
d89b8bace0 X axis endstop now done with Z Probe (if it's activated). 2013-11-25 09:32:13 +00:00
Adrian Bowyer
c33d1ac723 M503 implemented (tis time with added bug-free-ness...) 2013-11-19 18:34:48 +00:00
Adrian Bowyer
ec5f5fe536 M503 implemented. Prints the config file to USB. 2013-11-19 16:10:53 +00:00
Adrian Bowyer
926aabe078 Added z-probe type selection. See M558. 2013-11-19 15:00:23 +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
c7286905b2 Ability to specify bed Z probe points added. See M505. 2013-11-15 22:04:52 +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
8b3931c8cf Memory diagnostics added. Mem usage is printed whenever you turn debugging on (even if it is already on). 2013-11-13 18:16:43 +00:00
Adrian Bowyer
b94bb6c811 Added cooling fan control. 2013-11-12 15:53:49 +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
5707cc1eea Fixed the file listing bug. Either in the RepRap code, or somewhere in the SD file code, the #define for _USE_LFN is defined as fals for RepRap, true in the library file ff.c. The result is that ff.c tried to write long
file names into a structure created in RepRap that was too short for them.  Result - buffer overflow misery.  For the moment I've commented out the bit of code in ff.c that handles long names (look for the string ******), but this needs to be tracked down and dealt with properly.
2013-10-29 15:42:40 +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
eadac593cc Z probing now works using Jean-Marc's idea. Much better. 2013-10-19 17:38:31 +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
565117cba3 Move and ancilliary classes changed to store coordinates in machine units not mm internally to avoid cumulative errors. 2013-10-17 16:30:24 +01:00