Doodle3D / doodle3d-firmware

The API of the Doodle3D WiFi box. This can for example talk to print3d, save settings, update the firmware etc.
www.doodle3d.com
GNU General Public License v2.0
13 stars 9 forks source link

updated ultimaker2 startcode and endcode #65

Closed companje closed 8 years ago

companje commented 8 years ago

It now shows status info 'Doodle3D heat up...', 'Doodle3D printing...' and 'Doodle3D done!' on the display of the Ultimaker 2 (and 2go, extended etc, plus etc)

I've tested this on my Ultimaker 2go today by changing the startcode and endcode from the Doodle3D settings screen. I have not tested this yet after adjusting the conf_defaults.lua.

peteruithoven commented 8 years ago

By allowing people to override the setting we've made it hard to update their settings. Especially since we didn't put in enough time to do it properly. When users save the defaults are stored (this includes for example the start and end gcode of the selected printer). When users then update the defaults (from conf_defaults) aren't used. See: https://github.com/Doodle3D/doodle3d-firmware/blob/master/src/util/settings.lua#L163-L200

We have a way to override the settings, but when users changed this for a reason that would be problematic. We for example overrided the loglevel at one point: https://github.com/Doodle3D/doodle3d-firmware/blob/master/post-install.sh#L134

We could remove the printer_startcode and printer_endcode from the wifibox uci config, but again if people made customizations we might break their setup. The change that people tweaked the start / end gcode of Ultimaker2 printers is considerably smaller, maybe we could just delete the setting from all the ultimaker2 printer sections?

To give a better idea of how this works, this is how the printer specific settings are stored in the wifibox config:

config settings 'ultimaker2go'
    option printer_filamentThickness '2.89'
    option printer_dimensions_y '120'
    option printer_dimensions_x '120'
    option printer_dimensions_z '112'
    option printer_heatedbed '0'
    option printer_startcode ';Generated with Doodle3D (ultimaker2)\nM10000\nM10000\nM10001 X8 Y28 SDoodle3D heat up...\nM109 S{printingTemp} ;set target temperature \n{if heatedBed}M190 S{printin
gBedTemp} ;set target bed temperature\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 ; home to endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the 
extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\nM10000\nM10000\nM10001 X8 Y28 SDoodle3D printing...\n'
    option printer_endcode 'M10000\nM10000\nM10001 X20 Y28 SDoodle3D done!\nM107 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release 
some of the pressure\nG1 Z+5.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 ;home the printer\nM84 ;disable axes / steppers\nG90 ;absolute positioning\nM104 S{preheatTemp}\
n{if heatedBed}M140 S{preheatBedTemp}\n'

Or maybe this is all to much work. People can always manually retrieve the latest default config by pressing the Restore settings to defaults button. @companje what do you think?