/**
 * This file is part of the QCAD/CAM software.
 * Do NOT edit this file. Your changes will be lost when the software 
 * is updated or reinstalled. 
 * For details, please refer to the file README.txt in this directory.
 */
include("Grbl.js");

/**
 * Configuration for Grbl controllers.
 * Output in Inches.
 */
function GrblIN(documentInterface, camDocumentInterface) {
    Grbl.call(this, documentInterface, camDocumentInterface);

    this.decimals = 4;
    this.unit = RS.Inch;
    this.outputOffsetPath = true;

    // see https://www.shapeoko.com/wiki/index.php/G-Code
    // G20: Inch unit
    // G17: XY Plane select
    // G90: Absolute distance mode
    // G40: Cancel cutter radius compensation 
    //      (the only supported mode for Grbl)
    // G49: Cancel tool length offset
    // G80: Cancel motion mode
    // G70: Inch unit (might be supported or not)
    // G91.1: Incremental distance mode for I/J
    this.header = [
        "[N] G20 G17 G90 G40 G49 G80",
        "[N] G91.1"
    ];
}

GrblIN.prototype = new Grbl();
GrblIN.displayName = "GRBL (Offset) [in]";
