Skip to content

@giseburt giseburt released this May 13, 2018 · 27 commits to edge since this release

Firmware Build 101 {fb:101.xx}

Feature Enhancements

New features added. See linked issues and pull requests for details

Internal Changes and Bug Fixes

Many things have changed in the internals for this very large pull request. The following list highlights some of these changes but is not meant to be comprehensive.

  • Added explicit typing and type testing to JSON variables.
  • As part of the above, 32bit integers are not float casts, and therefore retain full accuracy. Line numbers may now reliably go to 2,000,000,000
  • Movement towards getters and setters as initial stage of refactoring the Big Table :)
  • Bugfix: Fixed root finding problem in feedhold exit velocity calculation
  • Bugfix: fixed bug in B and C axis assignment in coordinate rotation code
  • PR #334 A, B, C axes radius defaults to use motors 4, 5, & 6
  • PR #336, Issue #336 partial solution to coolant initialization
  • PR #299, Issue #298 fix for reading nested JSON value errors
Assets 18
Pre-release

@giseburt giseburt released this Mar 22, 2017 · 365 commits to edge since this release

Now you can 3D Print from your favorite Marlin-centric GUI, and print using gcode from your favorite slicer using RepRap-flavor gcode!

Usage

The Marlin-protocol is auto-detected. When the machine is compiled to enable Marlin compatibility mode, an addition 2-second delay is inserted before the connection banner is displayed. During that time, the g2core will also detect and respond to a minimal set of STK550v2 commands - enough for a Marlin GUI to ask if it is an STK500v2 bootloader, and to tell it to "exit" to the main program - as well as normal G and M codes.

If any STK500v2 was spoken or any of the Marlin-specific M codes that are protocol-only are recognized (poll for temperature, for example), then the protocol will be switched to "Marlin compatible" and instead of a JSON response a Marlin "OK" (or error) will be sent back for each line.

Marlin line-number-order restrictions and checksum testing is honored, along with resend requests.

If any of the hallmarks of Marlin-flavor gcode are found (M codes otherwise not supported, such as the temperature controls, or an E word), then the gcode-flavor is switched to Marlin-flavor.

This means a Marlin-GUI can send either a Marlin-flavor gcode file or a g2core-flavor gcode file. Also, a g2core UI can send a Marlin-flavor file without loss of functionality or feedback.

Upon disconnection from the host the protocol and gcode flavor are rest to g2core.

Supported M-codes and G-codes

Supported M-codes:

  • M104, M109, M140, M190 - temperature controls
  • M106, M107 - fan controls
  • M105, M108, M114 - temperature/position polling
  • M110 - set next line number
  • M111 - debug controls (ignored quietly)
  • M115 - report version information
  • M117 - display on screen (currently silently ignored)
  • M84, M85, M18 - motor disable and motor disable timeout control
  • M82, M83 - relative extruder mode enable/disable
  • M20, M21, M22, M23 - SD card commands respond that there is no card inserted

All other M-codes used for configuration of a machine running Marlin should be accessible through JSON commands instead.

The g2core equivalent M100 and M101 commands with JSON active comments are also available and can be freely mixed with Marlin M-codes. Note: At this time an M101 wait for at-temperature will not switch on the Marlin temperature reporting that an M109 or M190 will.

Additional differences from g2core gcode:

  • G0/G1 - a G0 with an Fnnn will be treated as a G1.
    • This poses an issue with Ennn during retractions. To use retraction speed (configured using {avm:nnn} with a numeric value for nnn, and as A_VELOCITY_MAX in the configuration file) any move with just an Ennn axis change will be treated as a true G0 and the Fnnn will be ignored.
    • Otherwise, there's no way to achieve a true G0 while the gcode flavor is switched to Marlin.
  • Ennn - the synthetic E axis is treated as an A axis when T0 is applied (the default), and the B axis when T1 is applied.
    • Note that this is NOT a volumetric E axis. That is a work in progress, along with the retraction codes G10 and G11.
  • G28 is accepted as an alias for g2core G28.2 homing.
    • Note that this means that when gcode is being interpreted as Marlin-flavor, it is impossible to invoke a G28 go-to-position.
  • Axis words X, Y, etc. will be accepted without a following number where normally that would be rejected.
  • T words are interpreted 0-based where normally they are 1-based with 0 being the current tool.
    • T words are applied immediately on the line they were issued on instead of requiring an M6 command.
  • G29 "bed leveling" is a synthetic command and must be specifically configured at compile-time with list of commands to execute. (Explained more below.)

Enabling and configuration

In the board pinout file TEMPERATURE_OUTPUT_ON must be defined with a value of 1:

#define TEMPERATURE_OUTPUT_ON 1

In the settings file MARLIN_COMPAT_ENABLED must be defined as true:

#define MARLIN_COMPAT_ENABLED       true

And in order to configure G29 you must define MARLIN_G29_SCRIPT as shown:

#define MARLIN_G29_SCRIPT \
    "G1 X0 Y145 Z6 F20000\n" \
    "G38.2 Z-10 F200\n" \
    "G1 Z5 F20000\n" \
    "G1 X210 Y65 F20000\n" \
    "G38.2 Z-10 F200\n" \
    "G1 Z5 F20000\n" \
    "G1 X0 Y10 F20000\n" \
    "G38.2 Z-10 F200\n" \
    "G1 Z5 F20000\n" \
    "M100 ({\"tram\":true})" \

Note that every line must have a \n inside the string, and each line except the last must have a \ at the end of the line to concatenate the lines into one long string.

In the script above, G38.2 probes are used at three points in order to store the probe positions for the {"tram":true} command to be able to create the tramming rotation matrix.

Assumptions

Currently the following output and inputs are assumed (these will later be configurable):

Fan controls M106 and M107 assume {out4:n} is the output for the print fan.
Extruder 1 (T0) is assumed to be on {out1:n} and use kADC1_PinNumber.
Extruder 2 (T1) is assumed to be on {out2:n} and use kADC2_PinNumber.
Head Bed 2 (T3) is assumed to be on {out11:n} and use kADC0_PinNumber.

The extruder fan is assumed to be on {out3:n} and is controlled by the temperature of Extruder 1. (Note: This is a bug, and will be fixed in a later version. Extruder 1 and Extruder 2 should both influence this fan.) The settings for this fan are all configurable through the {he1:null} object.

Assets 16

@giseburt giseburt released this Feb 23, 2017 · 458 commits to edge since this release

Note: This is the same as 100.20, but fixes a broken TravisCI config. There are no code changes.
Note 2: If you pulled the code and got a 110.20 tag (note the 110, not 100) then delete that local tag. From the command line that is git tag -d 110.20 . Sorry for the inconvenience.

Changelog:

  • Various fixes for SAM3X USB implementation. Cleanup queue flush for USB. (#209, #224, #225, #226, #231)
  • Fix problems with lines over 254 characters (#206) , and upped the limit to 512 (eff4939).
  • Fix arcs (G2 and G3) where no parameters are provided. This is OK, but wasn't accepted before. (#234)
  • Fixed an issue with TravisCI and Linux 32-bit binaries. (#245, #246)
  • Added DEBUG=3 command line option for deep debugging with Semihosting. Fixed unspecified or DEBUG=0 to not throw warnings about IN_DEBUG not being defined. (Various.)
  • Minor adjustments to the planner/stepper interface to fix a rare stall condition (838166d).
  • Added experimental (and read-only) in-flash file capability. (620fd81)
Assets 16
You can’t perform that action at this time.