g2core - The Next Generation
{fb:101.xx}
New features added. See linked issues and pull requests for details
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.
This release is just a default settings change release. It involves settings for Printrbots (#267) and Shapeoko (#258).
Thanks to @Dan211 for the Shapeoko fixes!
No functional changes, only a fix for G10 (#263) and an adjustment to Printrbot Simple Pro settings (#265).
Added support for the PrintrBot Simple Pro (a.k.a. 1608) HeatBed option. No other functional changes from 100.23.
Now you can 3D Print from your favorite Marlin-centric GUI, and print using gcode from your favorite slicer using RepRap-flavor gcode!
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:
M104
, M109
, M140
, M190
- temperature controlsM106
, M107
- fan controlsM105
, M108
, M114
- temperature/position pollingM110
- set next line numberM111
- debug controls (ignored quietly)M115
- report version informationM117
- display on screen (currently silently ignored)M84
, M85
, M18
- motor disable and motor disable timeout controlM82
, M83
- relative extruder mode enable/disableM20
, M21
, M22
, M23
- SD card commands respond that there is no card insertedAll 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
.
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.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.
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.
G28
go-to-position.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.)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.
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.
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.
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.)Fixes issues #216 (Startup into alarm state, caused by spindle checks) and #218 (Add other Printrbot models to default release).
Also the binary artifacts of the release (shown below) include the git tag in the file names.
Shopbot configs have been adjusted to use dual serial port by default.