#include "flatembroidery.h"

FlatEmbroidery::FlatEmbroidery()
{
    //添加各种参数到列表中
    initSpindleTestParasList();
    initRootParasList();
    initRootTraverseSetParasList();
    initRootHMIConfigurationList(m_allParasList);//超级用户界面配置
    initRootIOTConfigurationList(m_allParasList); //超级用户物联网配置
    initLockTestParasList();//锁头测试参数
    initColorPatternPatchParasList();
    initNeedlePatternPatchParasList();
    initPatternsParasList();
    initPatternOutlineParasList();
    initSoftwareParasList(m_allParasList);
    initTimeParasList(m_allParasList);
    initEmbCommonFunParasList(m_allParasList);
    initMcParasList();
    initWkParasList();
    initHeadParasList();
    initTowelHeadParasList();
    initEXBUpgradeParaList();
    initTowelDebugParasList();
    initTowelColorParasList();
    initCoilHeadParasList();
    //初始化控制动作列表
    initOutCtrlList();

    //初始化快捷功能列表
    initShortCutList();

    //初始化辅助功能列表
    initAssistList();

    //初始化花样设置功能列表
    initPatternSetList();

    //初始化参数设置功能列表
    initParaSetList();

    //初始化刺绣功能列表
    initEmbFunctionList();

    //初始化传感器列表
    initSensorList();

    //初始化错误代码列表
    initErrorCodeAndStateList();
}

FlatEmbroidery::~FlatEmbroidery()
{

}

//主轴研车(试机)参数
void FlatEmbroidery::initSpindleTestParasList()
{
    // 平绣主轴圈数, 范围 1--S32_MAX，单位无，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_SPINDLETEST,
                                        0,1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Embroidery spindle circle"),// 平绣主轴圈数
                                        10, 1, S32_MAX, 10, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    // 平绣主轴转速, 范围 1--3000，单位r/min，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_SPINDLETEST,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle speed of embroidery"),// 平绣主轴转速
                                        500, 1, 3000, 500, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));
}

//超级用户参数(包括机器参数、工作参数和遍历设置)
void FlatEmbroidery::initRootParasList()
{
    //超级用户参数---------------------------
    //绣花机-超级用户参数-界面配置；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HMICONFIGURATION, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI Configuration"),//界面配置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0000 , factory));

    //超级用户参数-界面进入调试模式；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_DEBUGMODE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Interface debug mode"),//界面进入调试模式
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , root));

    //超级用户参数-删除config.ini配置文件；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_DELETEINI, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Delete configure file"),//删除配置文件
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , root));
    //超级用户参数-导入csv文件；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_IMPORTCSV, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Import CSV file"),//导入csv文件
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , factory));

    //超级用户参数-删除csv文件；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_DELETECSV, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Delete CSV file"),//删除csv文件
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , factory));

    //超级用户参数-重置安装调试进度；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_RESETCSV, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Reset CSV file"),//重置安装调试进度
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , factory));

    //绣花机-超级用户参数-机器参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_MACHINEPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Machine parameters"),//机器参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, factory));

    //绣花机-超级用户参数-工作参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_WORKPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Work parameters"),//工作参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0002, factory));
    //等于绣花机 产品类型为纯平绣
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_EMB)
    {
        //绣花机-超级用户参数-机头板参数；单位：无    -rq
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_EMBHEADPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("EMB head board parameters"),//平绣机头板参数
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0003, root));
    }

    //等于绣花机，并为带毛巾功能
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if( (towel == 1)||
            (g_emProductType == PRODUCT_CHEN))
    {
        //绣花机-超级用户参数-毛巾机头板参数；单位：无   -rq
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_TOWELHEADPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Chenille head board parameters"),//毛巾机头板参数
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0003, root));

        //绣花机-超级用户参数-毛巾换色板参数；单位：无
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_TOWELHCPSPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Chenille color board parameter"),//换色板参数
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0004, root));

        //超级用户参数-毛巾主轴齿轮比测试;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_TOWELSPINDlLEGEARRATIO, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Chenille Spindle Gear Ratio Test"),//毛巾主轴齿轮比测试
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));

        //超级用户参数-毛巾设置可工作区域;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_CHENWORKAREA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("chenille set working area"),//毛巾设置可工作区域
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));
    }

    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil == 1)
    {
        //绣花机-超级用户参数-缠绕机头板参数；单位：无   -rq
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_COILHEADPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Coil head board parameters"),//缠绕机头板参数
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0003, root));

        //超级用户参数-缠绕设置可工作区域;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_COILWORKAREA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Coli set working area"),//缠绕设置可工作区域
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));
    }

    int foot = g_pSettings->readFromInHMIiFile("HMI/foot").toInt();//是否有独立压脚
    if(g_emMacType == MACHINE_EMB && foot == 1)
    {
        //超级用户参数-独立压脚测试;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_FOOTTEST, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Independent presser foot test"),//独立压脚测试
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));
    }

    //    //绣花机-超级用户参数-换色板参数；单位：无       -rq绣花机先注释掉
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_ROOT,
    //                                        0 ,
    //                                        ROOT_HCPSPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
    //                                        tr("Change color board parameter"),//换色板参数
    //                                        0, 0, 0, 0, 0, tr(""), tr(""),
    //                                        tr(""),
    //                                        0, 0, 0x0004, factory));

    //绣花机-超级用户参数-花样参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_PATTERNPARAMETERS, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Pattern parameters"),//花样参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0004, factory));

    //绣花机-超级用户参数-遍历设置；单位：无-
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_TRAVERSESET, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Traverse settings"),//遍历设置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0005, factory));

    //绣花机-超级用户参数-机头板总线检测；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HEADBOARDBUSDETECT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Machine head board bus detection"),//机头板总线检测
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0006, factory));

    //绣花机-超级用户参数-自动定软限位；单位：无-
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_AUTOSETSOFTLIMIT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Auto set softlimit"),//自动定软限位
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0007, factory));
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_EMB)
    {
        //绣花机-超级用户参数-平绣锁头测试；单位：无
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_EMBLOCKTEST, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("EMB lock test"),//平绣锁头电机测试
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0008, factory));

        //绣花机-超级用户参数-平绣勾刀测试；单位：无
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_EMBHOOKTEST, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("EMB hook test"),//平绣勾刀测试
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0009, factory));
    }

    //绣花机-超级用户参数-花样总清；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_CLEARPATTERN, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Pattern clear"),//花样总清
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000A, factory));

    //绣花机-超级用户参数-界面解密；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HMIDECRYPT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI decrypt"),//界面解密
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000B, factory));

    //绣花机-超级用户参数-修改一级密码；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_CHANGEPASSWORD, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Modify the first level password"),//修改一级密码
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000C, root));

    //超级用户参数-物联网配置;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_IOTCONFIGURATION, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("InternetofThings  configuration"),//物联网配置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000D, factory));

    //超级用户参数-动框角度设置;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_FRAMEANGLESETTING, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Frame angle setting"),//动框角度设置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000E, factory));
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_EMB)
    {
        //超级用户参数-平绣主轴齿轮比测试;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_EMBSPINDlLEGEARRATIO, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("EMB Spindle Gear Ratio Test"),//平绣主轴齿轮比测试
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));

        //超级用户参数-平绣设置可工作区域;
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOT,
                                            0 ,
                                            ROOT_EMBWORKAREA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("EMB set working area"),//平绣设置可工作区域
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x000E, factory));
    }

    //超级用户参数-动框参数导入;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_FRAMEIMPORTPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Frame parameter import"),//动框参数导入
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000E, factory));

    //超级用户参数-动框参数导出;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_FRAMEEXPORTPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Frame parameter export"),//动框参数导出
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000E, factory));

    //超级用户参数-删除花样fcg文件;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_ROOT,
    //                                        0 ,
    //                                        ROOT_CLEARPATTERNFCG, 0, 0, PARA_VALUE_TYPE_CLICK,
    //                                        tr("Pattern Fcg clear"),//删除花样fcg文件
    //                                        0, 0, 0, 0, 0, tr(""), tr(""),
    //                                        tr(""),
    //                                        0, 0, 0x000E, factory));

    //超级用户参数-重置花样配置-删除花样fcg文件影响fileid的数据;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_CLEARPATTERNFCG_FILEID, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Reset pattern configuration"),//重置花样配置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000E, factory));

#ifdef Q_OS_WIN
    //绣花机-超级用户参数-退出程序；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        PSE_SOFTWAREPARA_EXIT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI exit"),//退出程序
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000F, factory));
#endif
    //超级用户参数---------------------------
}

//超级用户遍历设置参数
void FlatEmbroidery::initRootTraverseSetParasList()
{
    //超级用户遍历设置参数---------------------------
    //绣花机-超级用户遍历设置参数-协议类型；单位：无 ,范围：目前就一个
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Agreement type"),//协议类型
                                        5, 5, 5, 5, 0, tr(""), tr(""),
                                        tr("HeadboardPact:5"),//机头板协议:5
                                        5, 5, 0x0000, factory));

    //绣花机-超级用户遍历设置参数-节点类型；单位：无 ,范围 1-2，默认1
    //平绣:1;冲孔:2;毛巾5
    /*
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        1, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Node type"),//节点类型
                                        FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                        (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Punching:"))+QString::number(PUNCH)+(tr(";Toweling:"))+QString::number(TOWEL)),
                                        FLATEMB, FLATEMB, 0x0001, factory));
*/
    //绣花机里先不加冲孔的遍历节点类型    -rq
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    int both1 = towel & coil;
    if (both1 == 1)//毛巾和缠绕都有
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 0, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型
                                            FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Coil:"))+QString::number(COIL)+(tr(";Chenille:"))+QString::number(TOWEL)),
                                            FLATEMB, FLATEMB, 0x0001, factory));
    }
    else if(towel == 1)
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 0, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型
                                            FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Chenille:"))+QString::number(TOWEL)),
                                            FLATEMB, FLATEMB, 0x0001, factory));
    }
    else if (coil ==1)
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 0, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型
                                            FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Coil:"))+QString::number(COIL)),
                                            FLATEMB, FLATEMB, 0x0001, factory));
    }
    else if ( g_emProductType == PRODUCT_CHEN)
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 1, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型//只读
                                            TOWEL, FLATEMB, TOWEL, TOWEL, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Chenille:"))+QString::number(TOWEL)),
                                            TOWEL, TOWEL, 0x0001, factory));
    }
    else
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 1, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型
                                            FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+(tr(";Toweling:"))+QString::number(TOWEL)),
                                            FLATEMB, FLATEMB, 0x0001, factory));
    }

    //绣花机-超级用户遍历设置参数-遍历次数；单位：无 ,范围1或机头个数(只有这两个数)
    //全部遍历模式的机头个数需要从主控读取，这里设置为2，写入主控时需要用机头个数去设置
    //单独遍历模式是1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        2, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Number of traverses"),//遍历次数
                                        1, 1, 2, 1, 0, tr(""), tr(""),
                                        tr("TraverseAlone:1;TraverseAll:2"),//单独遍历:1;全部遍历:2
                                        1, 1, 0x0002, factory));

    //绣花机-超级用户遍历设置参数-机头号(起始ID)；单位：无，范围1-32，默认1
    //全部遍历模式下平绣是11，冲孔是11+平绣机头数量
    //单独遍历模式下平绣是10+第几个平绣机头号，冲孔是10+平绣机头数量+第几个冲孔机头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Nose number"),//机头号
                                        1, 1, 32, 1, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0003, factory));
    if(g_emProductType == PRODUCT_EMB_EMB)
    {
        // 平绣机头个数，无单位， 范围1-32，默认1，只读，不可改变,
        // 此参数索引值为2不可改变，这是机器参数的参数索引值
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//父类为遍历参数
                                            PARA_TYPE_MACH,//子类为机器参数
                                            2, 0, 1, PARA_VALUE_TYPE_INT,
                                            tr("Number of EMB heads"),// 平绣机头个数
                                            1, 1, 32, 1, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0010, factory));
    }
    else if (g_emProductType == PRODUCT_CHEN)
    {
        // 毛巾机头个数，无单位， 范围1-32，默认1，只读，不可改变,
        // 此参数索引值为8不可改变，这是机器参数的参数索引值
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//父类为遍历参数
                                            PARA_TYPE_MACH,//子类为机器参数
                                            8, 0, 1, PARA_VALUE_TYPE_INT,
                                            tr("Number of Chenille heads"),// 毛巾机头个数
                                            1, 1, 32, 1, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0010, factory));
    }



    if((towel == 1)||
            ( g_emProductType == PRODUCT_CHEN))
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                            ROOT_SORT_CHENSENSOR,//毛巾  缠绕  平绣
                                            1, 0, 1, PARA_VALUE_TYPE_NONE,
                                            tr(""),
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0013, factory));

        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                            ROOT_SORT_CHENSENSOR,//毛巾  缠绕  平绣
                                            2, 0, 1, PARA_VALUE_TYPE_NONE,
                                            tr(""),
                                            16, 16, 31, 16, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0013, factory));
    }
    else if(coil ==1)
    {
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                            ROOT_SORT_CHENSENSOR,//毛巾  缠绕  平绣
                                            1, 0, 1, PARA_VALUE_TYPE_NONE,
                                            tr(""),
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0013, factory));
    }
    else
    {
        // 机头1-16遍历状态显示，无单位， 范围0-15，默认0，只读，
        // 此参数是实时显示机头1-16遍历状态的参数，类似于传感器信号
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                            ROOT_SORT_EMBSENSOR,//纯平绣
                                            1, 0, 1, PARA_VALUE_TYPE_NONE,
                                            tr(""),
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0011, factory));

        //         机头17-32遍历状态显示，无单位， 范围16-31，默认16，只读，
        //         此参数是实时显示机头17-32遍历状态的参数，类似于传感器信号
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                            ROOT_SORT_EMBSENSOR,//纯平绣
                                            2, 0, 1, PARA_VALUE_TYPE_NONE,
                                            tr(""),
                                            16, 16, 31, 16, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x0012, factory));

    }


    //超级用户遍历设置参数---------------------------
}

//锁头测试参数
void FlatEmbroidery::initLockTestParasList()
{
    // 模拟主轴转速, 范围 1--1000，单位r/min，默认 700
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_EMBLOCKTEST,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Simulated spindle speed"),// 模拟主轴转速
                                        700, 1, 1000, 700, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, factory));
}

//花样按色贴布绣参数
void FlatEmbroidery::initColorPatternPatchParasList()
{
    //花样按色贴布绣参数---------------------------
    //绣花机-花样按色贴布绣参数；单位：mm ，范围0-65536，默认0
    //色序对应得贴布绣设置,只初始化一个,剩下的在贴布绣功能代码中自动生成
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_COLOR,
                                        PATCH_SORT_COLOR ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr(""),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0000, operate));
    //花样按色贴布绣参数---------------------------
}

//花样按针贴布绣参数
void FlatEmbroidery::initNeedlePatternPatchParasList()
{
    //花样按针贴布绣参数---------------------------
    //绣花机-花样按针贴布绣参数；针数索引1，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 1"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 1 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    //绣花机-花样按针贴布绣参数；针数索引2，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 2"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 2 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));

    //绣花机-花样按针贴布绣参数；针数索引3，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 3"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0003, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 3 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0003, operate));

    //绣花机-花样按针贴布绣参数；针数索引4，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 4"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0004, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 4 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0004, operate));

    //绣花机-花样按针贴布绣参数；针数索引5，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 5"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0005, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 5 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0005, operate));

    //绣花机-花样按针贴布绣参数；针数索引6，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 6"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0006, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 6 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0006, operate));

    //绣花机-花样按针贴布绣参数；针数索引7，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 7"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0007, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 7 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0007, operate));

    //绣花机-花样按针贴布绣参数；针数索引8，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 8"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0008, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 8 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0008, operate));

    //绣花机-花样按针贴布绣参数；针数索引9，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 9"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0009, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 9 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0009, operate));

    //绣花机-花样按针贴布绣参数；针数索引10，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 10"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 10 move distance"),
                                        0, 0, 15000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));
    //花样按针贴布绣参数---------------------------
}

//花样参数
void FlatEmbroidery::initPatternsParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    //花样参数---------------------------

    //绣花机-花样参数-花样设置参数-翻转式样；单位：无 ，范围0-7，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_ROTATESTYLE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Flip style"),//翻转式样
                                        0, 0, 7, 0, 0, tr(""), tr(""),
                                        tr("normalP:0;nRight90P:1;nRight180P:2;nRight270P:3;mirrorP:4;mRight90P:5;mRight180P:6;mRight270P:7"),
                                        0, 0, 0x0000, operate));

    //绣花机-花样参数-花样设置参数-旋转角度；单位：° ，范围0-90，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_ROTATEANGLE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotation angle"),//旋转角度
                                        0, 0, 90, 0, 0, cod->toUnicode("°"), tr(""),//度
                                        tr(""), 0, 0,0x0001, operate));

    //绣花机-花样参数-花样设置参数-X向倍率；单位：% ，范围50-200，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X direction magnification"),//X向倍率
                                        0, 50, 200, 100, 0, tr("%"), tr(""),
                                        tr(""), 0, 0,0x0002, operate));

    //绣花机-花样参数-花样设置参数-Y向倍率；单位：% ，范围50-200，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y direction magnification"),//Y向倍率
                                        0, 50, 200,100, 0, tr("%"), tr(""),
                                        tr(""), 0, 0,0x0003, operate));

#if(0)
    //绣花机-花样参数-花样设置参数-反复方式；单位：无 ，范围0-3，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_REPEATSTYLE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Iterative way"),//反复方式
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        //通常反复:0;X轴对称:1;Y轴对称:2;XY对称:3
                                        tr("UsualRepeat:0;XSymmetry:1;YSymmetry:2;XYSymmetry:3"),
                                        0, 0, 0x0004, operate));
#endif

    //绣花机-花样参数-花样设置参数-优先次序；单位：无 ，范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_PRIORITY, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Priority"),//优先次序
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        //先绣横向:0;先绣纵向:1
                                        tr("HorFirst:0;VerFirst:1"),
                                        0, 0, 0x0005, operate));

    //绣花机-花样参数-花样设置参数-X向反复次数；单位：无 ，范围1-200，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition times"),//X向反复次数
                                        0, 1, 200, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0006, operate));

    //绣花机-花样参数-花样设置参数-Y向反复次数；单位：无 ，范围1-200，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition times"),//Y向反复次数
                                        0, 1, 200, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0007, operate));

    //绣花机-花样参数-花样设置参数-X向反复间距；单位：mm ，范围-30000-30000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition space"),//X向反复间距
                                        0, -30000, 30000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0008, operate));

    //绣花机-花样参数-花样设置参数-Y向反复间距；单位：mm ，范围-30000-30000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition space"),//Y向反复间距
                                        0, -30000, 30000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0009, operate));
#if(0)
    //绣花机-花样参数-花样设置参数-针步补偿；单位：mm ，范围-1-1，默认0.2   -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_STEPCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step compensate"),//针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, operate));

    //绣花机-超级用户花样参数-花样设置参数-针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_STEPCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step compensate"),//针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, factory));
#endif
    //绣花机-花样参数-花样设置参数-锁针次数；单位：次 ，范围0-10，默认2
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_PATTERN,
//                                        0 ,
//                                        SET_LOCKNEEDLESNUM, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock needle times"),//锁针次数
//                                        2, 0, 10, 2, 0, tr(""), tr(""),
//                                        tr(""), 0, 0,0x000A, operate));

    //绣花机-花样参数-花样设置参数-锁针步数；单位：步 ，范围0-10，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle steps"),//锁针步数
                                        1, 0, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000B, operate));//11

    //绣花机-花样参数-花样设置参数-锁针针步长度；单位：mm，范围0-100，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPLENTH, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle step size"),//锁针针步长度
                                        100, 0, 100, 100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000C, operate));//12

    //绣花机-花样参数-花样设置参数-跳针变越框锁针针数；单位：无，范围0-20，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_JUMPNEEDLECHANGE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Skip stitch to cross frame lock stitch count"),//跳针变越框锁针针数
                                        3, 0, 20, 3, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000D, operate));//12

    //绣花机-花样参数-花样设置参数-是否换色锁针；单位：无，范围0-20，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_CHANGLOOKNEEDLE, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Whether to change the color lock pin"),//是否换色锁针
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000D, operate));//12

    //绣花机-花样参数-花样设置参数-X向补偿；单位：mm ，-1-1，默认0.2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X compensation"),//X向补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, operate));//13

    //绣花机-花样参数-花样设置参数-Y向补偿；单位：mm ，-1-1，默认0.2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y compensation"),//Y向补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000F, operate));//14

    //绣花机-花样参数-花样设置参数-过滤针步长度；单位：mm ，-1-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_MINSTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Filter needle step length"),//过滤针步长度
                                        0, 0, 80, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0010, operate));//14

#if(1)
    //绣花机-花样参数-花样设置参数-绣花机中需要插入跳针的针步大小；单位：mm ，5-100，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_CONVERTJUMPSTEPSIZE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step size of skipped stitches to be inserted"),//需要插入跳针的针步大小
                                        10000, 300, 10000, 10000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000F, operate));

    //绣花机-花样参数-花样设置参数-绣花机中  跳针的针步大小；单位：mm ，1-5，默认200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_JUMPSTEPSIZE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step size of skip stitches"),// 跳针的针步大小
                                        200, 100, 500, 200, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000F, operate));
#endif

    //绣花机-花样参数-花样设置参数-偏移点X向允许；单位：无 ，范围0-1，默认0，bit0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTXENFLAG, 1, 0, PARA_VALUE_TYPE_SW,//开关类型
                                        tr("Offset point X allowed"),//偏移点X向允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0011, operate));

    //绣花机-花样参数-花样设置参数-偏移点Y向允许；单位：无 ，范围0-1，默认0，bit1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTYENFLAG, 2, 0, PARA_VALUE_TYPE_SW,//开关类型
                                        tr("Offset point Y allowed"),//偏移点Y向允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0012, operate));

    //绣花机-花样参数-花样设置参数-偏移点X；单位0.01mm，默认0 ,范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point X"),//偏移点X
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0013, operate));

    //绣花机-花样参数-花样设置参数-偏移点Y；单位0.01mm，默认0 ,范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point Y"),//偏移点Y
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0014, operate));

    //绣花机-超级用户花样参数- 花样设置参数-是否为褶绣模式
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_PLEATEDMODE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Is it in pleated embroidery mode"),//是否为褶绣模式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Yes:1"), 0, 0,0x0014, operate));

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //绣花机-超级用户花样参数-花样设置参数-x针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_XCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X compensation"),//x针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, factory));

    //绣花机-超级用户花样参数-花样设置参数-y针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_YCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y compensation"),//y针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000B, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针次数；单位:次  范围0-10，默认2    -lxs
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE__ROOT_PATTERN,
//                                        0 ,
//                                        SET_LOCKNEEDLESNUM, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock needle times"),//锁针次数
//                                        2, 0, 10, 2, 0, tr(""), tr(""),
//                                        tr(""), 0, 0,0x000C, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针步数；单位：步 ，范围0-10，默认1    -lxs
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle steps"),//锁针步数
                                        1, 0, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000D, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针针步长度；单位：mm ，范围0-100，默认100    -lxs
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPLENTH, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle step size"),//锁针针步长度
                                        100, 0, 100, 100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, factory));

    //绣花机-超级用户花样参数- 花样设置参数-过滤针步长度；单位：mm ，-1-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_MINSTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Filter needle step length"),//过滤针步长度
                                        0, 0, 80, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, factory));

    //花样参数---------------------------

    //反复绣参数，用于下位机的反复绣功能，参数设置后也需要保存到花版(保存到fcg)，下次再打开此花版不需要再设置
    //反复启动方式 ，反复绣起点是否暂停 不需要存在fcg中
    // bit8,反复启动方式	0,手动启动	1,自动启动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0,
                                        SET_MC_REPETITIONPARA1, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Repeated start mode"),// 反复启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Manual start:0;Auto start:1"),
                                        0, 0, 0x0001, operate));

    // bit12,反复绣起点是否暂停   0否，1是
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0,
                                        SET_MC_REPETITIONPARA2, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Whether the starting point of repeated emb is suspended"),// 反复绣起点是否暂停
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Yes:1"),
                                        0, 0, 0x0001, operate));

    //x向反复次数，范围0-99，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0 ,
                                        SET_MC_XREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition times"),//X向反复次数
                                        0, 0, 99, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0001, operate));

    //x向反复间距，范围-100000-100000，默认0，精度0.01，单位mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0 ,
                                        SET_MC_XREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition space"),//X向反复间距
                                        0, -100000, 100000, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0002, operate));

    //y向反复次数，范围0-99，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0 ,
                                        SET_MC_YREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition times"),//Y向反复次数
                                        0, 0, 99, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0003, operate));

    //y向反复间距，范围-100000-100000，默认0，精度0.01，单位mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0 ,
                                        SET_MC_YREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition space"),//Y向反复间距
                                        0, -100000, 100000, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0004, operate));

    //反复优先级，0,X向优先      1,Y向优先
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_REPEATEMBPARA,
                                        0 ,
                                        SET_MC_PRIORITY, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Priority"),//优先次序
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        //先绣横向:0;先绣纵向:1
                                        tr("HorFirst:0;VerFirst:1"),
                                        0, 0, 0x0005, operate));

}

//花样轮廓参数
void FlatEmbroidery::initPatternOutlineParasList()
{
    //花样轮廓参数---------------------------
    //绣花机-花样轮廓参数-轮廓针步；单位：mm，范围1-6，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNOUTLINE,
                                        0 ,
                                        SET_OUTLINESTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Contour stitch"),//轮廓针步
                                        3, 1, 6, 3, 0, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, 0x0000, operate));

    //绣花机-花样轮廓参数-轮廓放大；单位：mm，范围0-20，默认2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNOUTLINE,
                                        0 ,
                                        SET_OUTLINEZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Outline zoom"),//轮廓放大
                                        2, 1, 20, 3, 0, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //绣花机-花样轮廓参数-轮廓形状；单位：无，范围0-1，默认0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_PATTERNOUTLINE,
//                                        0 ,
//                                        SET_OUTLINESHAPE, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Contour shape"),//轮廓形状
//                                        1, 0, 1, 1, 0, tr(""), tr(""),
//                                        tr("Concave:0;Convex:1"),//凹形:0;凸形:1
//                                        1, 1, 0x0002, operate));
    //花样轮廓参数---------------------------
}

//主控机器参数
void FlatEmbroidery::initMcParasList()
{
     //如果开了步进驱动 ，单位就变成 0.1mm
    int stepDrive = g_pSettings->readFromInHMIiFile("HMI/stepDrive").toInt();//是否有步进驱动 功能
    int val = 2;
    if(stepDrive == 1)
    {
        val = 1;
    }
    QTextCodec *cod = QTextCodec::codecForLocale();

    //从索引0开始
    //主控机器参数---------------------------
    // 平绣机头个数，无单位， 范围0-32，默认0    -rq  （之前默认是1）
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of EMB heads"),
                                        1, 0, 32, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, root));

    // 平绣每头机针个数，无单位， 范围1-32，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of needles per head for EMB"),
                                        1, 1, 32, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, root));

    // 珠片一体装置 0无1左侧2右侧3左右双侧
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        14, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Bead integrated device"),// 珠片一体装置
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("not:0;left:1;right:2;Bilateral:3"),
                                        0, 0, 0x0001, root));

    // 剪线模式选择， 0:静态剪线；1:动态剪线；无单位， 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Shear mode selection"),// 剪线模式选择
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Static:0;Dynamic:1"),
                                        0, 0, 0x0006, factory));

    // bit1,引线类型	0,通用引线	1,富怡引线
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Lead Type"),// 引线类型
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Universal lead:0;Richpeace Lead:1"),
                                        0, 0, 0x0007, root));

    // bit4,平绣锁头类型	0,电机锁头	1,电磁铁锁头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 5, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Emb lock type"),
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Motor:0;Electromagnet:1"),
                                        0, 0, 0x0007, root));

    // 勾线类型		0,独立勾线	1,步进电机集中勾线	2,交流电机集中勾线	3,无勾线
     m_allParasList.append(makeAParaItem(0,
                                         PARA_TYPE_MACH,
                                         MC_SORT_SETTING,
                                         51, 0, 0, PARA_VALUE_TYPE_LIST,
                                         tr("Hook type"),// 勾线类型
                                         0, 0, 1, 0, 0, tr(""), tr(""),
                                         tr("Independent tick marks:0;"//独立勾线
                                            "Centralized wiring of stepper motor:1"//步进电机集中勾线
                                            ),
                                         0, 0, 0x0007, root));

    // bit5,X向零位传感器有无	0,X向有零位传感器	1,X向无零位传感器
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 6, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Is there an X-direction zero sensor"),// X向零位传感器有无
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Have:0;none:1"),
                                        0, 0, 0x0008, root));


    // 平绣换色启动方式，bit2， 0:自动启动；1:手动启动；无单位， 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,//公用参数（设置参数）
                                        15, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Emb Color change start method"),// 平绣换色启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Automatic:0;Manual:1"),
                                        0, 0, 0x0009, operate));

    // Y 向零位传感器，bit3，, 0 有，1,无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,//公用参数（设置参数）
                                        15, 4, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Y-axis zero position sensor"),// Y 向零位传感器
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("have:0;not have:1"),
                                        0, 0, 0x0009, operate));

    // 平绣跳针变越框针数, 范围 0--100，单位：无，默认 5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB jump needle change the number of frame"),// 平绣跳针变越框针数
                                        5, 0, 100, 5, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));


    // 跳针变越框距离, 范围 0--50000，单位：0.01mm，默认 2100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Jump stitch overrun distance"),// 跳针变越框距离
                                        2100, 0, 50000, 2100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    //反复绣参数
    // bit8,反复启动方式	0,手动启动	1,自动启动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 9, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Repeated start mode"),// 反复启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Manual start:0;Auto start:1"),
                                        0, 0, 0x0009, operate));

    // bit12,反复绣起点是否暂停   0否，1是
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 13, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Whether the starting point of repeated emb is suspended"),// 反复绣起点是否暂停
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Yes:1"),
                                        0, 0, 0x0009, operate));



    //-rq  为了方便五合一的机器配置产品类型,将产品类型,变成可配置的毛巾,亮片,散珠

    //等于绣花机，并为带散珠功能
    int bead = g_pSettings->readFromInHMIiFile("HMI/bead").toInt();//是否有散珠功能
    if(g_emMacType == MACHINE_EMB && bead == 1)
    {
        addBeadMcParas();
    }

    //等于绣花机，并为带亮片功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {
        addSequinMcParas();
    }

    //等于绣花机，并为带毛巾功能
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if((towel == 1)||
            (g_emProductType == PRODUCT_CHEN))
    {
        addTowelMcParas();
    }
    //等于绣花机，并为带缠绕功能
    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有毛巾功能
    if(g_emMacType == MACHINE_EMB && coil == 1)
    {
        addCoilMcParas();
    }
    //等于绣花机上下料机构
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_FEED)
    {
        addFeedMcParas();
    }

    //等于绣花机并且带激光功能时
    int laser = g_pSettings->readFromInHMIiFile("HMI/laser").toInt();//是否有激光功能
    if(g_emMacType == MACHINE_EMB && laser == 1)
    {
        addLaserMcParas();
    }

    //等于绣花机并且带自动换梭功能时
    int shuttleChange = g_pSettings->readFromInHMIiFile("HMI/shuttleChange").toInt();//是否有自动换梭功能
    if(g_emMacType == MACHINE_EMB && shuttleChange == 1)
    {
        addShuttleChangeMcParas();
    }

    // X框传感器坐标，单位 0.01mm，范围 -20000--20000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,//公用参数
//                                        70, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("X frame sensor coordinates"),
//                                        10000, -20000, 20000, 10000, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x0049, root));

    // X轴找零补偿,范围 -1000--1000, 单位 0.01mm，默认 200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,//设置参数
//                                        72, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("X axis find zero compensation"),
//                                        200, -1000, 1000, 200, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004B, root));

    // Y框传感器坐标，单位 0.01mm，范围 -20000--20000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        71, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Y frame sensor coordinates"),
//                                        10000, -20000, 20000, 10000, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004A, root));

    // Y轴找零补偿,范围 -1000--1000, 单位 0.01mm，默认 200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        73, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Y axis find zero compensation"),
//                                        200, -1000, 1000, 200, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004C, root));

    // 平绣主轴停车角度，单位 0.01度，范围 5000--15000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_EMB,
//                                        74, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB spindle parking angle"),
//                                        10000, 5000, 10000, 10000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x004D, root));

    // 平绣主轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        75, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB spindle find zero compensation"),
                                        200, -1000, 1000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x004E, factory));

    int simpleTowel = g_pSettings->readFromInHMIiFile("HMI/simpleTowel").toInt();//是否有简易毛巾功能
    if(g_emMacType == MACHINE_EMB && simpleTowel ==1)
    {
        // 简易毛巾升降延时, 范围1--10,  单位 0.1秒，默认 3
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            91, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile lifting delay"),
                                            3, 1, 10, 3, 1,tr("s") , tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

        // 简易毛巾针位1,,范围0-15,默认0
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            92, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile needle position 1"),//简易毛巾针位1
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

        // 简易毛巾针位2,,范围0-15,默认0
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            93, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile needle position 2"),//简易毛巾针位2
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

        // 简易毛巾针位3,,范围0-15,默认0
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            94, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile needle position 3"),//简易毛巾针位3
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

        // 简易毛巾针位4,,范围0-15,默认0
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            95, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile needle position 4"),//简易毛巾针位4
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

        // 简易毛巾针位5,范围0-15,默认0
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,
                                            MC_SORT_SIMPLETOWEL,
                                            96, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple chenile needle position 5"),//简易毛巾针位5
                                            0, 0, 15, 0, 0, tr(""), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

    }

    int trackropeEmb = g_pSettings->readFromInHMIiFile("HMI/trackropeEmb").toInt();//是否有跟踪绳绣功能
    if(g_emMacType == MACHINE_EMB && trackropeEmb ==1)
    {

        //跟踪绳绣升降延时，单位秒，精度0.1，范围0-20，默认5
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_MACH,//机器参数
                                            MC_SORT_TRACKROPR,
                                            97, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Tracking rope embroidery lifting delayd"),//跟踪绳绣升降延时
                                            5, 0, 20, 5, 1, tr("s"), tr(""),
                                            tr(""), 0, 0, 0x004E, operate));

    }

    // 可移动区域(X-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        100, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0057, factory));

    // 可移动区域(X+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        101, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X+)"),
                                        60000, S32_MIN, S32_MAX, 60000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0058, factory));

    // 可移动区域(Y-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        102, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0059, factory));

    // 可移动区域(Y+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y+)"),
                                        60000, S32_MIN, S32_MAX, 60000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005A, factory));

    // 平绣可工作区域(X-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000,val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005B, factory));

    // 平绣可工作区域(X+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        105, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (X+)"),
                                        60000, S32_MIN, S32_MAX, 60000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005C, factory));

    // 平绣可工作区域(Y-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005D, factory));

    // 平绣可工作区域(Y+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (Y+)"),
                                        60000, S32_MIN, S32_MAX, 60000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005E, factory));

    // 平绣机头偏移X, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        132, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB head offset X"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x006F, factory));

    // 平绣机头偏移Y, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        133, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB head offset Y"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0070, factory));

    // 平绣机头间距, 范围 -2147483648--2147483647，单位0.01mm,默认40000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        134, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB head spacing"),// 平绣机头间距
                                        40000, S32_MIN, S32_MAX, 40000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0071, factory));

    // XY启动停止速度, 范围 1--100，单位mm/s，默认 10
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        160, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY start and stop speed"),
//                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
//                                        tr(""), 0, 0, 0x007B, factory));

    // XY归零运行速度, 范围 1--100，单位mm/s，默认 100
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        161, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY zero return speed"),
//                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
//                                        tr(""), 0, 0, 0x007C, factory));

    // XY空走运行速度, 范围 1--1000，单位mm/s，默认 300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        162, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY dry running speed"),
                                        200, 1, 1000, 200, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x007D, factory));

    // XY行走加速度, 范围 1--10000，单位mm/s2，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        163, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY walking acceleration"),
                                        1000, 1, 10000, 1000, 0, tr("mm/s2"), tr(""),
                                        tr(""), 0, 0, 0x007E, factory));

    // XY刹车加速度 1--10000，单位mm/s2，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        164, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY braking acceleration"),
//                                        10000, 1, 10000, 10000, 0, tr("mm/s2"), tr(""),
//                                        tr(""), 0, 0, 0x007F, factory));

    // XY最高移动速度, 范围 1--1000，单位mm/s，默认 300
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        165, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY maximum moving speed"),
//                                        300, 1, 1000, 300, 0, tr("mm/s"), tr(""),
//                                        tr(""), 0, 0, 0x0080, factory));

    // xy手动移动速度1, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        166, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 1"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0081, factory));

    // xy手动移动速度2, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 2"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0082, factory));

    // xy手动移动速度3, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 3"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0083, factory));

    // 主轴启动停止转速, 范围 1--300，单位r/min，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        169, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle start and stop speed"),
                                        100, 1, 300, 100, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0084, factory));

    // 主轴归零转速, 范围 1--300，单位r/min，默认 120
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        170, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle return to zero speed"),
                                        120, 1, 300, 120, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0085, factory));

    // 主轴运转转速, 范围 50--500，单位r/min，默认 300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        171, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle rotation speed"),
                                        300, 50, 500, 300, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0086, factory));

    // 主轴运转加速度, 范围 1--200，单位r/ss，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        172, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle acceleration"),
                                        50, 1, 100, 50, 0, tr("r/ss"), tr(""),
                                        tr(""), 0, 0, 0x0087, factory));

    // 主轴刹车加速度, 范围 1--100，单位r/ss，默认 100
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        173, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Spindle braking acceleration"),
//                                        100, 1, 100, 100, 0, tr("r/ss"), tr(""),
//                                        tr(""), 0, 0, 0x0088, factory));

    // 平绣主轴最高转速, 范围 200--1500，单位r/min，默认 1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        174, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed of EMB spindle"),
                                        1200, 200, 1500, 1200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0089, factory));

    // 主轴手动移动转速,范围1-100,单位r/min,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        179, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle manual movement speed"),
                                        10, 1, 100, 10, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x008C, operate));

    //主控机器参数---------------------------
}

//主控工作参数
void FlatEmbroidery::initWkParasList()
{
    //如果开了步进驱动 ，单位就变成 0.1mm
   int stepDrive = g_pSettings->readFromInHMIiFile("HMI/stepDrive").toInt();//是否有步进驱动 功能
   int val = 2;
   if(stepDrive == 1)
   {
       val = 1;
   }
    QTextCodec *cod = QTextCodec::codecForLocale();

    //从索引0开始
    //主控工作参数---------------------------

#if(0)
    // 倒车等效主轴转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reverse equivalent spindle speed"),// 倒车等效主轴转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0104, operate));
#endif
    //主轴拐角转速，范围100-1000，单位r/min,默认600
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle corner speed"),// 主轴拐角转速
                                        600, 100, 1000, 600, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0101, factory));

    //降速最小偏差角度，单位度，范围30-180，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lowering minimum deviation angle"),//降速最小偏差角度
                                        90, 30, 180, 90, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0101, factory));

    // 平绣起针慢动针数, 0--10，单位 针，默认 3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of slow motion stitches for EMB stitch"),// 平绣起针慢动针数
                                        3, 0, 10, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0101, operate));

    // 平绣主轴启动慢动转速, 范围 1--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Start slow speed of EMB spindle"),// 平绣主轴启动慢动转速
                                        200, 1, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0102, factory));//258

    /*
    // 平绣主轴回针转速, 范围 1--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle needle speed of flat embroidery"),// 平绣主轴回针转速
                                        200, 1, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0102, operate));
*/

    // 平绣跳针最高主轴转速, 范围 300--1000，单位r/min，默认 800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum spindle speed of EMB stitch skipping"),// 平绣跳针最高主轴转速
                                        800, 300, 1000, 800, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0103, operate));

    // 平绣主轴工作转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle speed of EMB"),// 平绣主轴工作转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0104, operate));

    // 平绣工作加速度, 1--100, 单位r/ss , 默认5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        12, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Acceleration of EMB"),// 平绣工作加速度
                                        5, 1, 100, 5, 0, tr("r/ss"), tr(""),
                                        tr(""), 0, 0, 0x0105, factory));

    //    // 平绣动框方式, 2, XY连续动框; 3, XY间歇式动框;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_EMB,
    //                                        13, 0, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("EMB moving frame method"),// 平绣动框方式
    //                                        0, 2, 3, 0, 0, tr(""), tr(""),
    //                                        tr("XY continuous:2;XY intermittent:3"),//XY连续动框//XY间歇式动框
    //                                        0, 0, 0x0106, root));

    //    // 平绣动框起始角度, 0--36000, 单位 0.01度，默认 24000
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_EMB,
    //                                        14, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Start angle of EMB movable frame"),//平绣动框起始角度
    //                                        24000, 0, 36000, 24000, 2, cod->toUnicode("°"), tr(""),
    //                                        tr(""), 0, 0, 0x0107, root));

    // 平绣动框持续角度, 0--36000, 单位 0.01度，默认 20000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        15, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Continuous angle of EMB movable frame"),//平绣动框持续角度
                                        20000, 10000, 30000, 20000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0108, factory));//264

    // 平绣动框最高速度限制， 10-400, 单位mm/s, 默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed limit of EMB movable frame"),// 平绣动框最高速度限制
                                        100, 10, 400, 100, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0109, factory));

    // 平绣动框最高加速度限制， 1-100, 单位mm/s, 默认 20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum acceleration limit of EMB movable frame"),// 平绣动框最高加速度限制
                                        20, 1, 100, 20, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x010A, factory));//266

    // 平绣起针夹线允许; 位图选择 == 0, 不允许; == 1, 允许
    // bit0,夹线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        18, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB needle and thread clamp allowed"),// 平绣起针夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, factory));

    // 平绣起针扣线允许; 位图选择 == 0, 不允许; == 1, 允许
    // bit1,扣线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        18, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB the needle buckle line allowed"),// 平绣起针扣线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0118,factory));

    // 平绣主轴剪线转速, 范围 30--150，单位r/min，默认 120
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB spindle trimming speed"),// 平绣主轴剪线转速
                                        120, 30, 150, 120, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x010B, operate));

    // 平绣剪线允许; 0, 不剪线; 1, 自动剪线; 2, 最后剪线，3,数据剪线，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        19, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("EMB thread trimming allowed"),// 平绣剪线允许
                                        1, 0, 2, 1, 0, tr(""), tr(""),
                                        tr("No:0;"//不剪线
                                           "Automatic thread:1;"//自动剪线
                                           "Final:2;"//最后剪线
                                           "Data:3" ),//数据剪线
                                        1, 1, 0x010C, operate));

    // 平绣静态剪线完成角度，0--36000, 单位 0.01度，默认 6000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB static cut line completion angle"),//平绣静态剪线完成角度
                                        6000, 0, 36000, 6000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x010D, operate));

    // 平绣剪线动框方向， 0:不动框；1:向左；2:向前；3:向右；4：向后 无单位， 范围0-4，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        22, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Moving frame direction of EMB trimming"),// 平绣剪线动框方向
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("No:0;Left:1;Forward:2;Right:3;Backward:4"),
                                        0, 0, 0x010D, operate));


    // 平绣剪线动框位移, 1--1000, 单位0.01mm, 默认500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Moving frame displacement of EMB trimming"),//平绣剪线动框位移
                                        500, 1, 1000, 500, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x010D, operate));

    int simpleTowel = g_pSettings->readFromInHMIiFile("HMI/simpleTowel").toInt();//是否有简易毛巾功能
    if(g_emMacType == MACHINE_EMB && simpleTowel ==1)
    {
        // 简易毛巾最高转速, 100--1000, 单位r/min 默认800
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_WORK,
                                            MC_SORT_SIMPLETOWEL,
                                            31, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Maximum speed of simple towel"),//简易毛巾最高转速
                                            800, 100, 1000, 800, 0, tr("r/min"), tr(""),
                                            tr(""), 0, 0, 0x010D, operate));

        //bit 25  简易毛巾工作允许
        //        m_allParasList.append(makeAParaItem(0,
        //                                                    PARA_TYPE_WORK,
        //                                                    MC_SORT_SIMPLETOWEL,
        //                                                    183, 26, 0, PARA_VALUE_TYPE_SW,
        //                                                    tr("Work permit of simple towel"),//简易毛巾工作允许
        //                                                    0, 0, 1, 0, 0, tr(""), tr(""),
        //                                                    tr(""), 0, 0, 0x010D, operate));
    }
    // 平绣勾线延迟，范围0--100，默认10,单位：无
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_CUT,
    //                                        31, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("EMB hook latencys"),//平绣勾线延迟
    //                                        10, 0, 100, 10, 0, tr(""), tr(""),
    //                                        tr(""), 0, 0, 0x010D, factory));//276

    // 平绣勾线收缩,范围0--70,默认40
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        36, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB hook contraction"),//平绣勾线收缩
                                        40, 0, 70, 40, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x010D, factory));

    // 平绣动态剪线分线角度，0--36000, 单位 0.01度，默认 27000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB dynamic shear line distribution angle"),//平绣动态剪线分线角度
                                        27000, 0, 36000, 27000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x010E, operate));

    // 平绣动态剪线夹线角度,范围0--9500,单位0.01度,默认6000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        32, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB dynamic shear clip line angle"),//平绣动态剪线夹线角度
                                        6000, 0, 9500, 6000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x010F, operate));//271

    // 平绣动态剪线勾刀出角度,范围0--36000,单位0.01度,默认28000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        33, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB dynamic cut line hook out angle"),//平绣动态剪线勾刀出角度
                                        28000, 0, 36000, 28000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0110, operate));//272

    // 平绣动态剪线勾刀回角度,范围0--36000,单位0.01度,默认4000
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_CUT,
    //                                        34, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("EMB dynamic cut line hook back angle"),//平绣动态剪线勾刀回角度
    //                                        4000, 0, 36000, 4000, 2, cod->toUnicode("°"), tr(""),
    //                                        tr(""), 0, 0, 0x0111, factory));//273

    // 平绣动态剪线完成角度,范围0--36000,单位0.01度,默认3000
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_CUT,
    //                                        35, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("EMB dynamic cut line completion angle"),//平绣动态剪线完成角度
    //                                        3000, 0, 36000, 3000, 2, cod->toUnicode("°"), tr(""),
    //                                        tr(""), 0, 0, 0x0112, factory));//274

    // 平绣面线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        24, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for detection of EMB thread breakage"),//平绣面线断线检测针数
                                        3, 0, 50, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0119, operate));

    // 平绣底线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        25, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for detection of EMB bottom thread breakage"),//平绣底线断线检测针数
                                        3, 0, 50, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011A, operate));

    // 平绣换梭芯提醒功能, 0, 不启用该功能; 1, 按长度计数延迟提醒; 2, 按片数计数; 3, 按长度立刻提醒; 默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        26, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("EMB bobbin change reminder function"),// 平绣换梭芯提醒功能
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;"//不启用该功能
                                           "Delay Reminder:1;"//按长度计数延迟提醒
                                           "Piece count:2;"//按片数计数
                                           "Immediately by length:3"//按长度立刻提醒
                                           ),
                                        0, 0, 0x0121, operate));

    // 平绣底线长度, 0-90000000,单位 0.01mm，默认 10000000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        27, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB bottom thread length"),//平绣底线长度
                                        10000000, 0, 90000000, 10000000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0121, operate));

    // 平绣每针底线修正量, 0-1000,单位 0.01mm，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Bottom thread correction amount per stitch for flat embroidery"),//平绣每针底线修正量
                                        100, 0, 1000, 100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0122, operate));

    // 平绣换梭片数计数, 单位 次，0-S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Counting the number of shuttles for EMB"),//平绣换梭片数计数
                                        0, 0, S32_MAX, 0, 0, tr("Times"), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));//291

    //bit 24  平绣换色同色暂停
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 25, 0, PARA_VALUE_TYPE_SW,
                                        tr("Emb Change Color Pause"),//平绣换色同色暂停
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));

    //bit 25 贴布绣偏移方式  0偏移距离；1偏移点
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        183, 26, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Offset method of pasting embroidery"),//贴布绣偏移方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Offset distance:0;Offset point:1"), 0, 0, 0x0123, operate));//0偏移距离；1偏移点

    //bit 26  帽框到位检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 27, 0, PARA_VALUE_TYPE_SW,
                                        tr("Cap frame in place detection allowed"),//帽框到位检测允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));
    //bit 27  平绣剪线暂停
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 28, 0, PARA_VALUE_TYPE_SW,
                                        tr("Flat embroidery thread cutting paused"),//平绣剪线暂停
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));

//    //bit 27  报错是否允许启动
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        183, 28, 0, PARA_VALUE_TYPE_SW,
//                                        tr("Is it allowed to start when reporting an error"),//报错是否允许启动
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0123, operate));

    // 补绣方式, 0,不补绣, 1,手动补绣(补绣开关), 2,自动补绣(断线头+补绣开关), 3,全头补绣
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        30, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Supplementary embroidery"),//补绣方式
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;"// 不补绣
                                           "Manual:1;"// 手动补绣
                                           "Auto:2;"// 自动补绣
                                           "All:3"), // 全头补绣
                                        0, 0, 0x011E, operate));

    // 平绣断线倒退针数,范围0--10,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        37, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB line broken return needles"),//平绣断线倒退针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011D, operate));

    // 补绣提前结束针数,范围0--10,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        38, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles to end ahead of time"),//补绣提前结束针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011F, operate));

    // 平绣动态剪线扣线角度,范围10500-18000,默认12000  单位0.01
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        55, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB dynamic thread trimming angle"),// 平绣动态剪线扣线角度
                                        12000, 10500, 18000, 12000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0115, operate));

    // 平绣面线起针不检测针数,范围0--30,默认8
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        56, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles is not detected when the EMB thread"),//平绣面线起针不检测针数
                                        8, 0, 30, 8, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011B, operate));

    // 平绣底线起针不检测针数,范围0--30,默认8
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        57, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles is not detected when the EMB bottom thread"),//平绣底线起针不检测针数
                                        8, 0, 30, 8, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011C, operate));

    // 平绣动态剪线扣线释放角度,范围0--36000,单位0.01度,D86控制动态剪线默认3000,N6A控制默认9000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        59, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB dynamic cut line release angle"),//平绣动态剪线扣线释放角度
                                        3000, 0, 36000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));//278

#if(0)
    // 锁针次数，范围0--5，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        39, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch times"),//锁针次数
                                        0, 0, 5, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));

    // 锁针步数，范围0--5，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        40, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch steps"),//锁针步数
                                        0, 0, 5, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));

    // 锁针针步长度，范围0--100，单位%，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch length"),//锁针针步长度
                                        0, 0, 100, 0, 0, cod->toUnicode("%"), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));
#endif

    // 提前降速针步, 单位 针，0-10，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        140, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Advance speed needle"),//提前降速针步
                                        0, 0, 10, 0, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x0154, factory));

    // 延迟提速针步, 单位 针，0-10，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        141, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Delay speed needle"),//延迟提速针步
                                        0, 0, 10, 0, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x0155, factory));

    // 雕孔针位,范围0-15,默认0(0认为无雕孔)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        142, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Carve hole needle"),//雕孔针位
                                        0, 0, 15, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0124, operate));

    // 雕孔偏移量,单位mm,精度0.01,范围0-20000,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        143, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Carving hole offset"),//雕孔偏移量
                                        0, 0, 20000, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0125, factory));

    // 雕孔偏移允许  bit5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("Carving hole offset allows"),//雕孔偏移允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));


    // 开机动作；BIT0,  1，开机平绣主轴自动找零，0，开机平绣主轴不自动找零;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_EMB,
    //                                        160, 1, 0, PARA_VALUE_TYPE_SW,
    //                                        tr("Boot spindle zero"),// 开机主轴归零
    //                                        0, 0, 1, 0, 0, tr(""), tr(""),
    //                                        tr(""), 0, 0, 0x0163, factory));

    // 开机动作；BIT1,  1，开机XY自动归零，0，开机XY不自动归零;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_SETTING,
    //                                        160, 2, 0, PARA_VALUE_TYPE_SW,
    //                                        tr("Boot XY zero"),// 开机XY归零
    //                                        0, 0, 1, 0, 0, tr(""), tr(""),
    //                                        tr(""), 0, 0, 0x0164, factory));

    // 开机总线检测  bit3,  1，开机总线检测禁止，0，开机总线检测允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        160, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Boot bus detection disabled"),// 开机总线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0165, factory));

    // 同色是否停车,0,停车,1,不停车
    // bit10,同色是否停车
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_SETTING,
    //                                        183, 11, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Whether to stop in the same color"),//同色是否停车
    //                                        0, 0, 1, 0, 0, tr(""), tr(""),
    //                                        tr("parking:0;NoParking:1"), 0, 0, 0x0170, operate));

    // 跳针变越框方式,0,按针数,1,按距离
    // bit11,跳针变越框方式
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,//设置参数
                                        183, 12, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Needle skipping mode"),//跳针变越框方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("StitchesNum:0;Distance:1"), 0, 0, 0x000C, operate));

    // 安全输入允许，位图选择，0, 不允许; 1, 允许; bit0 光幕; bit1, 气压;  bit2 上电信号;	bit4 安全门 	bit5 手自动按钮
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        162, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Air pressure safety input allows"),// 气压安全输入允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016A, operate));

    // 安全输入允许，位图选择，0, 不允许; 1, 允许; bit0 光幕; bit1, 气压;  bit2 上电信号;	bit4 安全门 	bit5 手自动按钮
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        162, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Light curtain safety input allowed"),// 光幕安全输入允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016B, factory));

    // 软件限位方式, bit0, xy移动; bit1, 缝纫头升降限制; bit2, 冲孔头升降限制; bit3, 裁刀机头升降限制;
    // bit4,冲孔落杆限制; bit5,绣花落杆限制;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        163, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("limit XY movement"),// XY移动限位
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016C, operate));

    // 软件限位方式, bit0, xy移动; bit1, 缝纫头升降限制; bit2, 冲孔头升降限制; bit3, 裁刀机头升降限制;
    // bit4,冲孔落杆限制; bit5,绣花落杆限制;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        163, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB rock limit"),// 绣花落杆限制
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016D, factory));

    // 产量预设, 0, 关闭功能；其余，按照预设产量提示，0-S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        164, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Production preset"),//产量预设
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0156, operate));

    // 完成后停车位置选择, 0, 当前位置; 1，起点，2，起始点，3，上料点; 4，偏移点
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        165, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Parking location selection after completion"),//完成后停车位置选择
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("Current position:0;"//当前位置
                                           "Starting point:2;"//起点
                                           "Offset position:4"),//偏移点
                                        0, 0, 0x0157, operate));

    // 偏移点坐标有效标志；0：无效；1，x有效；2，y有效；3，xy同时有效；单位：无 ，范围0-3，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        166, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Offset point coordinate valid flag"),//偏移点坐标有效标志
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("Invalid:0;X Valid:1;Y Valid:2;XY Valid:3"),
                                        0, 0, 0x0158, operate));

    // 偏移点X坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X coordinate of offset point"),//偏移点X坐标
                                        0, S32_MIN, S32_MAX, 0, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0159, operate));

    // 偏移点Y坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y coordinate of offset point"),//偏移点Y坐标
                                        0, S32_MIN, S32_MAX, 0, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x015A, operate));

    //绣花机界面也加了这三个参数  -rq
    // 上料点坐标有效标志；0：无效；1，x有效；2，y有效；3，xy同时有效；单位：无 ，范围0-3，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        172, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Feeding point coordinate valid flag"),//上料点坐标有效标志
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("Invalid:0;X Valid:1;Y Valid:2;XY Valid:3"),
                                        0, 0, 0x015B, operate));

    // 上料点X坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        173, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X coordinate of feeding point"),//上料点X坐标
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x015C, operate));

    // 上料点Y坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        174, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y coordinate of feeding point"),//上料点Y坐标
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x015D, operate));
    int trackropeEmb = g_pSettings->readFromInHMIiFile("HMI/trackropeEmb").toInt();//是否有跟踪绳绣功能
    if(g_emMacType == MACHINE_EMB && trackropeEmb ==1)
    {
        // 跟踪绳绣针位	0,无		1,首针	2,末针
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_WORK,
                                            MC_SORT_TRACKROPR,
                                            177, 0, 0, PARA_VALUE_TYPE_LIST,
                                            tr("Tracking rope EMB needle position"),//跟踪绳绣针位
                                            0, 0, 2, 0, 0, tr(""), tr(""),
                                            tr("No:0;First stitch:1;Terminal stitch:2"),
                                            0, 0, 0x0127, root));

        // 跟踪绳绣转速	范围100-1000,默认700
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_WORK,
                                            MC_SORT_TRACKROPR,
                                            178, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Tracking rope EMB speed"),//跟踪绳绣转速
                                            700, 100, 1000, 700, 0, tr("r/min"), tr(""),
                                            tr(""), 0, 0, 0x0128, operate));//296
        }
    // 加油方式选择, 0,不加油,1,按工作时间加油,2按工作针数加油,3持续不停加油,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        179, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Oil mode selection"),//加油方式选择
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;Work times:1;Work needles:2;Keep refueling:3"),
                                        0, 0, 0x015E, operate));

    // 加油针数间隔, 单位针,加油方式为按针数加油时有效,默认10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        180, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling needle interval"),//加油针数间隔
                                        10000, 0, 50000000, 10000, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x015F, operate));

    // 加油时间间隔,单位秒,加油方式为按工作时间加油时有效
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        181, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling times interval"),//加油时间间隔
                                        720, 0, 80000, 720, 0, tr("min"), tr(""),   //单位由s改为min
                                        tr(""), 0, 0, 0x0160, operate));

    // 加油持续时长,单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        182, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Collision continues"),//加油持续时长
                                        2, 0, 30, 2, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0161, operate));

    //旋梭加油持续时长, 单位秒, 默认0, 范围0-15
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Duration of refueling for rotary shuttle"),//旋梭加油持续时长
                                        0, 0, 30, 0, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0161, operate));

    // 加油储气时长,单位秒,默认3,范围0-180
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        211, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling gas storage"),//加油储气时长
                                        0, 0, 3 ,0, 0, tr("min"), tr(""),
                                        tr(""), 0, 0, 0x0162, operate));

    // bit2,针位限速允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Needle speed limit allows"),//针位限速允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0173, operate));

    // 功能允许控制,0,不允许,1,允许
    // bit3,勾刀检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Hook knife detection allows"),//勾刀检测允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x010C, operate));

    // 平绣断线检测禁止,0,不允许,1,允许
    // bit7,断线检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 8, 0, PARA_VALUE_TYPE_SW,
                                        tr("Emb Disconnection detection prohibited"),//平绣断线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0118, operate));

    // bit16,总线屏蔽   0不屏蔽 1屏蔽
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 17, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Bus shield"),//总线屏蔽
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Unshielded:0;shield:1"),  0, 0, 0x0171, root));

    // bit22,自动定起绣点
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        183, 22, 0, PARA_VALUE_TYPE_SW,
                                        tr("Automatically fix the stitch point"),//自动定起绣点
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0172, operate));


    // 针位1限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        196, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 1 speed limit"),//针位1限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0174, operate));

    // 针位2限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        197, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 2 speed limit"),//针位2限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0175, operate));

    // 针位3限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        198, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 3 speed limit"),//针位3限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0176, operate));

    // 针位4限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        199, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 4 speed limit"),//针位4限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0177, operate));

    // 针位5限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        200, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 5 speed limit"),//针位5限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0178, operate));

    // 针位6限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        201, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 6 speed limit"),//针位6限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0179, operate));

    // 针位7限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        202, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 7 speed limit"),//针位7限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017A, operate));

    // 针位8限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        203, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 8 speed limit"),//针位8限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017B, operate));

    // 针位9限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        204, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 9 speed limit"),//针位9限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017C, operate));

    // 针位10限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        205, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 10 speed limit"),//针位10限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017D, operate));

    // 针位11限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        206, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 11 speed limit"),//针位11限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017E, operate));

    // 针位12限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        207, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 12 speed limit"),//针位12限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x017F, operate));

    // 针位13限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        208, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 13 speed limit"),//针位13限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0180, operate));

    // 针位14限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        209, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 14 speed limit"),//针位14限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0181, operate));

    // 针位15限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        210, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 15 speed limit"),//针位15限速
                                        1200, 0, 2000, 1200, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0182, operate));

    //等于绣花机，并为带亮片功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {
        addSequinWkParas();
    }
    //等于绣花机，并为带散珠功能
    int bead = g_pSettings->readFromInHMIiFile("HMI/bead").toInt();//是否有散珠功能
    if(g_emMacType == MACHINE_EMB && bead == 1)
    {
        addBeadWkParas();
    }
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if((towel == 1)||
            (g_emProductType == PRODUCT_CHEN))
    {
        addTowelWkParas();
    }

    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil == 1)
    {
        addCoilWkParas();
    }

#if(0)
    int foot = g_pSettings->readFromInHMIiFile("HMI/foot").toInt();//是否有独立压脚
    if(g_emMacType == MACHINE_EMB && foot == 1)
    {
        addIndeFootWkParas();
    }
#endif

    //等于绣花机上下料机构
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_FEED)
    {
        addFeedWkParas();
    }

    //主控工作参数---------------------------
}

//增加散珠机器参数
void FlatEmbroidery::addBeadMcParas()
{
    // 散珠装置升降延时,单位秒,精度0.1,范围5-50,默认15
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        38, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting delay of bead dispersing device"),// 散珠装置升降延时
                                        15, 5, 50, 15, 1, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0019, operate));

    // 平绣散珠最高转速,200-1200,默认800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        37, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed of flat Emb loose bead"),// 平绣散珠最高转速
                                        800, 200, 1200, 800, 0, tr("r/min"), tr(""),
                                        tr(""),0, 0, 0x001A, operate));


    //    // 左散珠1号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        18, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Left bead number 1 position"),// 左散珠1号珠位置
    //                                        0, 0, 2, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x000D, operate));
    // 左散珠A珠, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        18, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left bead A"),// 左散珠A珠
                                        0, 0, 2, 0, 0, (""), (""),
                                        ("Default:0;1:1;2:2"), 0, 0, 0x000D, operate));
    // 左亮片A,范围：0-8，0未设置(默认)，单位无
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_SEQUIN,
    //                                        24, 0, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Left sequins A"),// 左亮片A
    //                                        0, 0, 8, 0, 0, (""), (""),
    //                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
    //                                        0, 0, 0x001B, operate));
    // 左散珠2号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        19, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left bead B"),// 左散珠B
                                        0, 0, 2, 0, 0, (""), (""),
                                        ("Default:0;1:1;2:2"), 0, 0, 0x000E, operate));

    // 左散珠3号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        20, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Left bead number 3 position"),// 左散珠3号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x000F, operate));

    // 左散珠4号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        21, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Left bead number 4 position"),// 左散珠4号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0010, operate));

    // 左散珠5号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        22, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Left bead number 5 position"),// 左散珠5号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0011, operate));

    // 左散珠6号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        23, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Left bead number 6 position"),// 左散珠6号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0012, operate));



    //    // 右散珠1号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        222, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Right bead A"),// 右散珠1号珠位置
                                        0, 0, 2, 0, 0, (""), (""),
                                        ("Default:0;1:1;2:2"), 0, 0, 0x0013, operate));

    //    // 右散珠2号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_BEAD,
                                        223, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Right bead B"),// 右散珠2号珠位置
                                        0, 0, 2, 0, 0, (""), (""),
                                        ("Default:0;1:1;2:2"), 0, 0, 0x0014, operate));

    //    // 右散珠3号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        224, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Right bead number 3 position"),// 右散珠3号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0015, operate));

    //    // 右散珠4号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        225, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Right bead number 4 position"),// 右散珠4号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0016, operate));

    //    // 右散珠5号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        226, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Right bead number 5 position"),// 右散珠5号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0017, operate));

    //    // 右散珠6号珠位置, 0,未设置,按默认A  1,A珠, 2,B珠, 3,C珠, 4,D珠 5,E珠, 6,F珠,默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_BEAD,
    //                                        227, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Right bead number 6 position"),// 右散珠6号珠位置
    //                                        0, 0, 6, 0, 0, (""), (""),
    //                                        (""), 0, 0, 0x0018, operate));
}

//增加散珠工作参数
void FlatEmbroidery::addBeadWkParas()
{
    //拉杆停车时散珠装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_BEAD,
                                        183, 20, 0, PARA_VALUE_TYPE_SW,
                                        tr("The beads rises is allowed when pull rod parking"),//拉杆停车时散珠装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));
    //断线停车时散珠装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_BEAD,
                                        183, 21, 0, PARA_VALUE_TYPE_SW,
                                        tr("The beads rises is allowed when line break parking"),//断线停车时散珠装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));

    //剪线时散珠装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_BEAD,
                                        183, 24, 0, PARA_VALUE_TYPE_SW,
                                        tr("The beads rises is allowed when cut"),//剪线时散珠装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));
}

//增加亮片机器参数
void FlatEmbroidery::addSequinMcParas()
{
    // bit7,亮片装置类型	0,非双亮片	1,双亮片
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        15, 8, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Type of sequin unit"),// 亮片装置类型
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Non double sequins:0;double sequins:1"),
                                        0, 0, 0x0009, root));



    // 左亮片的1亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        52, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("1 sequined size of the left"),// 左亮片的1亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x0027, operate));

    // 左亮片的2亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        53, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("2 sequined size of the left"),// 左亮片的2亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x0028, operate));

    // 左亮片的3亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        54, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("3 sequined size of the left"),// 左亮片的3亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x0029, operate));

    // 左亮片的4亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        55, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("4 sequined size of the left"),// 左亮片的4亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x002A, operate));

    // 左亮片的5亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        56, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("5 sequined size of the left"),// 左亮片的5亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x002B, operate));

    // 左亮片的6亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        57, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("6 sequined size of the left"),// 左亮片的6亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x002C, operate));

    // 左亮片的7亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        58, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("7 sequined size of the left"),// 左亮片的7亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x002D, operate));

    // 左亮片的8亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        59, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("8 sequined size of the left"),// 左亮片的8亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x002E, operate));

    // 左亮片A,范围：0-8，0未设置(默认)，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        24, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins A"),// 左亮片A
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x001B, operate));

    // 左亮片B,范围：0-8，0未设置(默认)，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        25, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins B"),// 左亮片B
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x001C, operate));

    // 左亮片C,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        26, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins C"),// 左亮片C
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x001D, operate));

    // 左亮片D,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        27, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins D"),// 左亮片D
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x001E, operate));

    // 左亮片E,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        28, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins E"),// 左亮片E
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x001F, operate));

    // 左亮片F,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        29, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins F"),// 左亮片F
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x0020, operate));

    // 左亮片G,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        30, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins G"),// 左亮片G
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x0021, operate));

    // 左亮片H,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EIGHT_SEQUIN,
                                        31, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Left sequins H"),// 左亮片H
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x0022, operate));

    // 右亮片的1亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        175, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("1 sequined size of the right"),// 右亮片的1亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x0031, operate));

    //    // 右亮片的2亮片大小，范围0-150，单位0.1mm，默认90
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        176, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("2 sequined size of the right"),// 右亮片的2亮片大小
                                        90, 0, 150, 90, 1, tr("mm"), tr(""), tr(""),
                                        0, 0, 0x0032, operate));


    //    // 右亮片A,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        228, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Right sequins A"),// 右亮片A
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x002F, operate));

    //    // 右亮片B,范围：0-8，0未设置，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        229, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Right sequins B"),// 右亮片B
                                        0, 0, 8, 0, 0, (""), (""),
                                        tr("Default:0;1color:1;2color:2;3color:3;4color:4;5color:5;6color:6;7color:7;8color:8"), //默认:0;A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8
                                        0, 0, 0x0030, operate));

    // 亮片装置升降延时,单位秒,精度0.1,范围5-50,默认15
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        44, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting delay of sequin dispersing device"),// 亮片装置升降延时
                                        15, 5, 50, 15, 1, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0033, operate));

}

//增加亮片工作参数
void FlatEmbroidery::addSequinWkParas()
{

    // 平绣亮片最高转速,范围0--1200,默认800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        58, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Flat embroidered sequins maximum speed"),//平绣亮片最高转速
                                        800, 0, 1200, 800, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));

    // 开机亮片归零,  bit2，1，开机亮片自动归零，0，开机亮片不自动归零;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        160, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Boot sequin zero"),// 开机亮片归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0166, factory));

    // bit4,拉杆停车时亮片装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        183, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("The sequin rises is allowed when pull rod parking"),//拉杆停车时亮片装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));

    // bit17,断线停车时亮片装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        183, 18, 0, PARA_VALUE_TYPE_SW,
                                        tr("The sequin rises is allowed when line break parking"),//断线停车时亮片装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));

    // bit18,非补绣机头亮片装置上升允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DOUBLE_SEQUIN,
                                        183, 19, 0, PARA_VALUE_TYPE_SW,
                                        tr("Lifting permission of non patching head sequin"),//非补绣机头亮片装置上升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));

}

//增加亮片机头板参数
void FlatEmbroidery::addSequinHeadParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    // 亮片拨片完成角度,单位度,0-90,默认80
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sequential dial completion angle"),// 亮片拨片完成角度
                                        80, 0, 90, 80, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));

    // 亮片切片合刀完成角度,单位度,120-150,默认140
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sequester sliced knife completion angle"),// 亮片切片合刀完成角度
                                        140, 120, 150, 140, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));

    // 亮片切片开刀角度,单位度,230-270,默认260
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        30, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sequester slice opening angle"),// 亮片切片开刀角度
                                        260, 230, 270, 260, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));

}

void FlatEmbroidery::addIndeFootHeadParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 压脚高度,范围10-100,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        33, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot height"),// 压脚高度
                                        10, 10, 100, 10, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));

    // 压脚下降起始角度,单位度,280-350,默认330
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        34, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of presser foot descent"),// 压脚下降起始角度
                                        330, 280, 350, 330, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));

    // 压脚上升起始角度,单位度,180-300,默认220
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        35, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of presser foot rise"),// 压脚上升起始角度
                                        220, 180, 300, 220, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));

    // 压脚动作持续角度,单位度.60-150,默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        36, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot action duration angle"),// 压脚动作持续角度
                                        100, 60, 150, 100, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));

    // 压脚振幅,单位为整步数,1-20,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        37, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Pressure foot amplitude"),// 压脚振幅
                                        10, 1, 20, 10, 0, tr("steps"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));
}

//增加毛巾机器参数
void FlatEmbroidery::addTowelMcParas()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 毛巾头个数，无单位， 范围0-16，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of chenille heads"),
                                        1, 0, 16, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0004, root));

    // 毛巾每头机针个数，无单位， 范围1-16，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of needles per head for chenille"),
                                        1, 1, 16, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0005, root));

    // 毛巾可工作区域(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        120, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille workable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0063, factory));

    // 毛巾可工作区域(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        121, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille workable area (X+)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0064, factory));

    // 毛巾可工作区域(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        122, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille workable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0065, factory));

    // 毛巾可工作区域(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        123, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille workable area (Y+)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0066, factory));

    // 毛巾主轴停车角度，单位 0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_CHEN,
//                                        83, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Chenille spindle parking angle"),
//                                        10000, 5000, 10000, 10000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0051, root));//951103三级密码

    // 毛巾主轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        84, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille spindle zero compensation"),
                                        200, -1000, 1000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0052, root));

    // 毛巾M轴停车角度，单位 0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_CHEN,
//                                        85, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Chenille M-axis parking angle"),
//                                        10000, 5000, 10000, 10000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0053, root));

    // 毛巾M轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        86, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille M-axis zero compensation"),
                                        200, -1000, 1000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0054, root));

    // 毛巾打环轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        90, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille ring shaft zero compensation"),
                                        200, -5000, 5000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0056, factory));

    // 毛巾主轴最高转速, 范围 1--1500，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        178, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed of chenille spindle"),
                                        1200, 1, 1500, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x008B, factory));

    // 打环轴手动移动速度,范围1-360,单位deg/s,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        185, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Manual movement speed of ring shaft"),//打环轴手动移动速度
                                        10, 1, 360, 10, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x008E, operate));

    // M轴手动移动速度,范围1-360,单位deg/s,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        180, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis manual movement speed"),
                                        10, 1, 360, 10, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x008D, operate));
    // 185
    // M轴旋转启动停止速度, 范围 1--720, 单位 deg/s(度/秒)，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        185, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M axis rotation start stop speed"),
                                        10, 1, 720, 10, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0092, factory));

    // M轴旋转归零速度, 1--720, 单位 deg/s(度/秒)，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        186, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation zero speed"),
                                        50, 1, 720, 50, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0093, factory));

    // M轴旋转运转速度, 范围 1--720, 单位 deg/s(度/秒)，默认 360
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        187, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation speed"),
                                        360, 1, 720, 360, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0094, factory));

    // M轴旋转运动加速度, 范围 1--10, 单位 deg/s(度/秒)，默认 1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        188, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotational motion acceleration"),
                                        1, 1, 10, 1, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0095, factory));

    // M轴旋转刹车加速度, 范围 1--10000, 单位 deg/s(度/秒方)，默认 5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        189, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation brake acceleration"),
                                        5000, 1, 10000, 5000, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0096, factory));

    // M轴旋转最高速度, 范围 1--720，单位 deg/s，默认 720
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        190, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation maximum speed"),
                                        720, 3600, 7200, 720, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0097, factory));

    // 打环轴启动停止速度, 范围 1--360, 单位 deg/s(度/秒)，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        182, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Ring shaft start and stop speed"),
                                        10, 1, 360, 10, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x008F, factory));

    // 打环轴归零速度, 100--720, 单位 deg/s(度/秒)，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        183, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Ring shaft zero speed"),
                                        200, 100, 720, 200, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0090, factory));

    // 打环轴运转速度, 范围 100--720, 单位 deg/s(度/秒)，默认 360
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        184, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Ring shaft speed"),
                                        360, 100, 720, 360, 0, tr("deg/s"), tr(""),//度/s
                                        tr(""), 0, 0, 0x0091, factory));

    // 毛巾机头偏移X, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        141, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille head offset X"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0075, factory));

    // 毛巾头偏移Y, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        142, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille head offset Y"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0076, factory));

    // 毛巾换色启动方式，bit11 0:自动启动；1:手动启动；无单位， 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_CHEN,
                                        15, 12, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Chen Color change start method"),// 毛巾换色启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Automatic:0;Manual:1"),
                                        0, 0, 0x0076, operate));
}

//增加毛巾工作参数
void FlatEmbroidery::addTowelWkParas()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 毛巾剪线脱线允许,0,不允许,1,允许
    // bit1,毛巾剪线脱线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        183, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Chenille trimmer off-line allowed"),//毛巾剪线脱线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x013B, factory));

    // 停车打环轴归零,0,不允许,1,允许
    // bit9,停车打环轴归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        183, 10, 0, PARA_VALUE_TYPE_SW,
                                        tr("Parking and ringing the shaft to zero"),//停车打环轴归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0140, operate));

    // 毛巾主轴工作转速, 范围 1--3000，单位r/min，默认 800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        70, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille spindle working speed"),//毛巾主轴工作转速
                                        800, 1, 3000, 800, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0129, operate));

    // 毛巾工作加速度, 1--100, 单位r/ss , 默认20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        71, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille working acceleration"),//毛巾工作加速度
                                        20, 1, 100, 20, 0, tr("r/ss"), tr(""),
                                        tr(""), 0, 0, 0x012A, factory));

    // 毛巾起针慢动针数, 0--10，单位 针, ，默认 3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        72, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of slow-moving stitches for towel starting"),//毛巾起针慢动针数
                                        3, 0, 10, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x012B, operate));


    // 毛巾主轴启动慢动转速, 范围 100--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        73, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille spindle start slow speed"),//毛巾主轴启动慢动转速
                                        200, 100, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x012C, factory));

    // 毛巾剪线允许; 0, 不剪线; 1, 自动剪线; 默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        74, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Chenille trimming allowed"),//毛巾剪线允许
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr("No:0;Automatic:1"),
                                        0, 0, 0x013B, factory));

    // 毛巾工作高度档位,范围1-10	默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        75, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille working height"),//毛巾工作高度档位
                                        1, 1, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x013C, operate));

    // 毛巾动框起始角度,范围24000-36000，默认,36000，单位0.01度
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_WORK,
                                            MC_SORT_CHEN,
                                            77, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Starting angle of towel frame"),//毛巾动框起始角度
                                            36000, 24000, 36000, 36000, 2, cod->toUnicode("°"), tr(""),
                                            tr(""), 0, 0, 0x0107, operate));

        // 毛巾M轴旋转起始角度,范围20000-36000，默认,36000，单位0.01度
            m_allParasList.append(makeAParaItem(0,
                                                PARA_TYPE_WORK,
                                                MC_SORT_CHEN,
                                                80, 0, 0, PARA_VALUE_TYPE_INT,
                                                tr("Starting angle of towel M-axis rotation"),//毛巾M轴旋转起始角度
                                                32000, 20000, 32000, 36000, 2, cod->toUnicode("°"), tr(""),
                                                tr(""), 0, 0, 0x0107, operate));

    // 链式工作高度档位,范围1-10	默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        89, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chain working height"),//链式工作高度档位
                                        1, 1, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x013D, operate));

    // 毛巾动框最高速度限制 单位mm/s,默认180,10-400
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        79, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille moving frame maximum speed limitt"),//毛巾动框最高速度限制
                                        180, 10, 400, 1, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x012D, factory));
    // 毛巾除尘
    // 除尘方式选择, 0, 不除尘; 1, 按工作时间间歇除尘; 2, 按工作针数间歇除尘; 3, 持续不停除尘，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        82, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Chenille dusting"),//毛巾除尘
                                        1, 0, 3, 1, 0, tr(""), tr(""),
                                        tr("No:0;Work hours:1;Work needles:2;Keep going:3"),
                                        0, 0, 0x0141, operate));

    // 除尘针数间隔, 单位针, 除尘方式为按针数除尘时有用，默认 1000,范围0-50000000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        83, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Dust removal needle interval"),//除尘针数间隔
                                        1000, 0, 50000000, 1000, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0142, operate));

    // 除尘时间间隔, 单位秒, 除尘方式为按工作时间除尘时有用;默认180,范围0-5000000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        84, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Dust interval"),//除尘时间间隔
                                        180, 0, 5000000, 180, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0143, operate));

    // 除尘持续时长, 单位秒,默认2,范围0-15
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        85, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Dust removal duration"),//除尘持续时长
                                        2, 0, 15, 2, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0144, operate));
    // 86
    // 毛巾起针锁针针数   0-10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        86, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of stitches for chenille starting and locking"),//毛巾起针锁针针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x013E, operate));
    // 毛巾结束锁针针数  0-10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        87, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles at the end of the chenille"),//毛巾结束锁针针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x013F, operate));

    // 毛巾断线检测禁止,0,不允许,1,允许
    // bit8,毛巾断线检测禁止
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        183, 9, 0, PARA_VALUE_TYPE_SW,
                                        tr("Chenille Disconnection detection prohibited"),//毛巾断线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0140, operate));

    // 毛巾断线检测起始跳过针数  0-10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        88, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles skipped at the beginning of chenille breakage detection"),//毛巾断线检测起始跳过针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0140, operate));

    // 毛巾打环起始角度(100rpm)，单位度，默认188，范围100-200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        90, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(100rpm)"),//毛巾打环起始角度(100rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x012F, root));

    // 毛巾打环起始角度(200rpm)，单位度，默认188，范围100-200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        91, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(200rpm)"),//毛巾打环起始角度(200rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0130, root));

    // 毛巾打环起始角度(300rpm)，单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        92, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(300rpm)"),//毛巾打环起始角度(300rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0131, root));

    // 毛巾打环起始角度(400rpm)，单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        93, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(400rpm)"),//毛巾打环起始角度(400rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0132, root));

    // 毛巾打环起始角度(500rpm)，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        94, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(500rpm)"),//毛巾打环起始角度(500rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0133, root));

    // 毛巾打环起始角度(600rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        95, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(600rpm)"),//毛巾打环起始角度(600rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0134, root));

    // 毛巾打环起始角度(700rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        96, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(700rpm)"),//毛巾打环起始角度(700rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0135, root));

    // 毛巾打环起始角度(800rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        97, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(800rpm)"),//毛巾打环起始角度(800rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0136, root));

    // 毛巾打环起始角度(900rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        98, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(900rpm)"),//毛巾打环起始角度(900rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0137, root));

    // 毛巾打环起始角度(1000rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        99, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(1000rpm)"),//毛巾打环起始角度(1000rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0138, root));

    // 毛巾打环起始角度(1100rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        100, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(1100rpm)"),//毛巾打环起始角度(1100rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0139, root));

    // 毛巾打环起始角度(1200rpm),单位度，默认188，范围100-200         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        101, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of Chenille looping(1200rpm)"),//毛巾打环起始角度(1200rpm)
                                        188, 100, 200, 188, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x013A, root));//314

    // 毛巾打环旋转角度,单位度，默认360，范围270-450         //lxs 20220729卡尔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        102, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille looping rotation angle"),//毛巾打环旋转角度
                                        360, 270, 450, 360, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x012E, root));

    // bit4 1，开机毛巾打环轴归零 ，0，不归零;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        160, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("Turn on the Chenille and ring the shaft to zero"),// 开机毛巾打环轴归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0167, operate));

    // 毛巾机头提升允许; , 0, 不允许; 1, 允许; bit0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        161, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Chenille head lift allows"),// 毛巾机头提升允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0169, factory));

    // bit22,毛巾链式同色不剪线
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        183, 23, 0, PARA_VALUE_TYPE_SW,
                                        tr("Chenille chain type same color without thread cutting"),//毛巾链式同色不剪线
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x013D, operate));

    //毛巾打环起始偏差角度 单位度，范围10-90，默认 45
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille starting deviation angle of ring striking"),//毛巾打环起始偏差角度
                                        45, 10, 90, 45, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x013D, root));

    //链式打环起始偏差角度 单位度，范围10-90，默认 45
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CHEN,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chain starting deviation angle of ring striking"),//链式打环起始偏差角度
                                        45, 10, 90, 45, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x013D, root));
}

#if(0)
//增加独立压脚工作参数
void FlatEmbroidery::addIndeFootWkParas()
{
    // 开机独立压脚归零,  bit7，1，开机自动归零，0，开机不自动归零;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        160, 7, 0, PARA_VALUE_TYPE_SW,
                                        tr("Turn on the independent presser foot to zero"),// 开机独立压脚归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0173, operate));
}
#endif

//增加缠绕工作参数     rq
void FlatEmbroidery::addCoilWkParas()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    // 功能允许控制,0,不允许,1,允许


    // bit12,缠绕断线检测禁止
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,//设置参数
                                        183, 13, 0, PARA_VALUE_TYPE_SW,
                                        tr("Winding disconnection detection prohibition"),//缠绕断线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x014A, operate));

    // bit13,缠绕M轴拉杆停车归零  0不归零，1归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,//设置参数
                                        183, 14, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cioil M pull rod to stop and return to zero"),//缠绕M轴拉杆停车归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No return to zero:0;Return to zero:1"), 0, 0, 0x0147, operate));

    // bit14,缠绕M轴断线停车归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,//设置参数
                                        183, 15, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cioil M disconnection stop and return to zero"),//缠绕M轴断线停车归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No return to zero:0;Return to zero:1"), 0, 0, 0x0147, operate));

    //        // bit15,缠绕M轴正常停车归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,//设置参数
                                        183, 16, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cioil M normal stop and return to zero"),//缠绕M轴正常停车归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No return to zero:0;Return to zero:1"),  0, 0, 0x0147, operate));

    // bit5 1，开机缠绕电机归零 ，0，不归零;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        160, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("Turn on the winding motor to zero"),// 开机缠绕电机归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0168, operate));
    // 缠绕主轴工作转速, 范围 1--3000，单位r/min，默认 1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        212, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil spindle working speed"),// 缠绕主轴工作转速
                                        1200, 1, 3000, 1200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0145, operate));
    // 缠绕剪线方式, 0,不剪线		1,剪下线	2,剪上下线
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        213, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Coil trimming method"),// 缠绕剪线方式
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("No:0;Bottom line:1;Up and down line:2"),
                                        0, 0, 0x0149, factory));
    // 缠绕跳针最高主轴转速, 范围 200--800，单位r/min，默认 400
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        214, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("The maximum spindle speed of Coil skip stitch"),// 缠绕跳针最高主轴转速
                                        400, 200, 800, 400, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0146, operate));
    // 缠绕面线断线检测针数; 0, 不检测断线; 其他, 断线信号连续针数，默认5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        215, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for Coil topline breakage detection"),//缠绕面线断线检测针数
                                        5, 0, 50, 5, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014A, operate));
    // 缠绕底线断线检测针数; 0, 不检测断线; 其他, 断线信号连续针数，默认5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        216, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for Coil baseline breakage detection"),//缠绕底线断线检测针数
                                        5, 0, 50, 5, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014B, operate));

    // 缠绕面线断线检测跳过针数,默认10,范围0-30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        217, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Skipped stitches for Coil topline breakage detection"),//缠绕面线断线检测跳过针数
                                        10, 0, 30, 10, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014C, operate));

    // 缠绕底线断线检测跳过针数,默认10,范围0-30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        218, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Skipped stitches for Coil baseline breakage detection"),//缠绕底线断线检测跳过针数
                                        10, 0, 30, 10, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014D, operate));

    // 缠绕M轴旋转持续角度,单位 0.01度，默认20000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        219, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil M-axis rotation duration angle"),// 缠绕M轴旋转持续角度
                                        20000, 10000, 24000, 20000, 2,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0147, factory));

    // 缠绕M轴旋转起始角度, 范围15000--30000, 单位 0.01度，默认
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        220, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil M-axis rotation start angle"),// 缠绕M轴旋转起始角度
                                        24000, 15000, 30000, 24000, 2,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0148, factory));

    // 褶绣距离,单位0.01mm,范围0-1100,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        221, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Pleated distance"),//褶绣距离
                                        0, 0, 1100, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0150, operate));

    // 缠绕模式最高转速,范围200--800,默认400
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        222, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil mode maximum speed"),//缠绕模式最高转速
                                        400, 200, 800, 400, 0, tr("rpm"), tr(""),
                                        tr(""), 0, 0, 0x0151, operate));

    // 锯齿摆动起始位置,	0,默认	1,摆动位1		2,摆动位2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        223, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sawtooth start position"),// 锯齿摆动起始位置
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("default:0;swing bit 1:1;swing bit 2:2"),
                                        0, 0, 0x0152, operate));
    //锯齿模式2绣框补偿，单位0.01mm 0-500,默认200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        224, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zigzag Mode 2 Frame Compensation"),//锯齿模式2绣框补偿
                                        200, 0, 500, 200, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0153, operate));

    // 褶绣面线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        225, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for pleated EMB topline breakage detection"),//褶绣面线断线检测针数
                                        20, 0, 50, 20, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014E, operate));

    // 褶绣底线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        226, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for pleated EMB baseline breakage detection"),//褶绣底线断线检测针数
                                        20, 0, 50, 20, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014F, operate));

    //褶绣锁针针数，范围0-10，默认4
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_COIL,
                                        227, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of stitches for pleated embroidery lock"),//褶绣锁针针数
                                        4, 0, 10, 4, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x014F, operate));
}
//增加缠绕机器参数    rq
void FlatEmbroidery::addCoilMcParas()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    // 缠绕机头个数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of coil heads"),// 缠绕机头个数
                                        0, 0, 32, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0003, root));

    // 缠绕跳针变越框针数, 范围 0--100，单位：无，默认 5   36
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        36, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil jump needle change the number of frame"),// 缠绕跳针变越框针数
                                        5, 0, 100, 5, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x000B, operate));
    // 81
    // 缠绕主轴停车角度，单位 0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_COIL,
//                                        81, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Winding spindle parking angle"),//缠绕主轴停车角度
//                                        10000, 5000, 15000, 10000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x004F, root));//951103三级密码

    // 缠绕主轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 400
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        82, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Winding spindle zero compensation"),//缠绕主轴找零补偿
                                        400, -1000, 1000, 400, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0050 ,root));

    // bit6,缠绕锁头类型	0,电磁铁锁头	1,电机锁头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        15, 7, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Wind lock type"),// 缠绕锁头类型
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Electromagnet:0;Motor:1"),
                                        0, 0, 0x0008, root));

    // 116
    // 缠绕可工作区域(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        116, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil workable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005F, factory));

    // 缠绕可工作区域(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        117, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil workable area (X+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0060, factory));

    // 缠绕可工作区域(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        118, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil workable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0061, factory));

    // 缠绕可工作区域(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        119, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil workable area (Y+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0062, factory));

    // 139
    // 缠绕机头偏移X, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        139, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil head offset X"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0073, factory));

    // 缠绕机头偏移Y, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        133, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil head offset Y"),
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0074, factory));
    // 177
    // 缠绕主轴最高转速, 范围 1--1200，单位r/min，默认 800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        177, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Coil spindle maximum speed"),// 缠绕主轴最高转速
                                        800, 1, 1200, 800, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x008A, factory));

    // 缠绕换色启动方式，bit10 0:自动启动；1:手动启动；无单位， 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_COIL,
                                        15, 11, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Coli Color change start method"),// 缠绕换色启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Automatic:0;Manual:1"),
                                        0, 0, 0x008A, operate));
}

//增加上下料机构机器参数           lxs
void FlatEmbroidery::addFeedMcParas()
{
    // 气框开合延时,单位ms,范围0-5000，,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        43, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Air frame opening and closing delay"),
                                        0, 0, 5000, 0, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0046, operate));

    // 送料运行时长, 单位秒,精度0.1,范围1-600,默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_FEED,
                                        45, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Feeding operation time"),
                                        1, 1, 600, 1, 1, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0047, operate));

    // 收料运行时长, 单位秒,精度0.1,范围1-600,默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_FEED,
                                        46, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Receipt running time"),
                                        1, 1, 600, 1, 1, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0048, operate));
}

//增加上下料机构工作参数           lxs
void FlatEmbroidery::addFeedWkParas()
{
    // 自动关闭气框允许; , 0, 不允许; 1, 允许; bit2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_FEED,
                                        161, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Auto closing air box allows"),// 自动关闭气框允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0120, operate));
    // bit0,循环工作功能
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_FEED,
                                        183, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Cyclic work function"),//循环工作功能
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x016E, operate));

    // 缺料检测允许,0,不允许,1,允许
    // bit6,缺料检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_FEED,
                                        183, 7, 0, PARA_VALUE_TYPE_SW,
                                        tr("Lack of material detection allows"),//缺料检测允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x016F, operate));

}
//增加自动换梭机器参数
void FlatEmbroidery::addShuttleChangeMcParas()
{
    // 自动换梭装置, 0:无，1其他类型Ⅰ,2富怡换梭Ⅰ,3富怡换梭Ⅱ
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        40, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Automatic shuttle changing device"),//自动换梭装置
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("None:0;Other typesⅠ:1;FuyiⅠ:2;FuyiⅡ:3"),//0:无1其他类型Ⅰ,2富怡换梭Ⅰ,3富怡换梭Ⅱ
                                        0, 0, 0x0034, factory));
    // 梭数量
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of shuttles"),// 梭数量
                                        4, 4, 6, 4, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0035, factory));

    // bit9,底面线颜色同步	0,禁止	1,允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        15, 10, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Bottom line color synchronization"),// 底面线颜色同步
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Prohibit:0;Allow:1"),
                                        0, 0, 0x0035, operate));

    //换梭等待时长，单位秒，10-30，默认5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        39, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Waiting time for shuttle change"),// 换梭等待时长
                                        5, 10, 30, 5, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0036, operate));

    // 自动换梭对应表,1针位,范围0-8,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        205, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("one needle position"),//针位1梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0037, operate));

    // 自动换梭对应表,2针位,范围0-8,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        206, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("two needle position"),//针位2梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0038, operate));

    // 自动换梭对应表,3针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        207, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("three needle position"),//针位3梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0039, operate));

    // 自动换梭对应表(有9针),4针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        208, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("four needle position"),//针位4梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003A, operate));

    // 自动换梭对应表(有9针),5针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        209, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("five needle position"),//针位5梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003B, operate));

    // 自动换梭对应表(有9针),6针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        210, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("six needle position"),//针位6梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003C, operate));

    // 自动换梭对应表(有9针),7针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        211, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("seven needle position"),//针位7梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003D, operate));

    // 自动换梭对应表(有9针),8针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        212, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("eight needle position"),//针位8梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003E, operate));

    // 自动换梭对应表(有9针),9针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        213, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("nine needle position"),//针位9梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x003F, operate));

    // 自动换梭对应表(有10针),10针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        214, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("ten needle position"),//针位10梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0040, operate));

    // 自动换梭对应表(有11针),11针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        215, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("eleven needle position"),//针位11梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0041, operate));

    // 自动换梭对应表(有12针),12针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        216, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("twelve needle position"),//针位12梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0042, operate));

    // 自动换梭对应表,13针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        217, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("13 needle position"),//针位13梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0043, operate));
    // 自动换梭对应表,14位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        218, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("14 needle position"),//针位14梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0044, operate));
    // 自动换梭对应表,15针位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SHUTTLE,
                                        219, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("15 needle position"),//针位15梭号
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0045, operate));

}
//增加激光机器参数  -rq
void FlatEmbroidery::addLaserMcParas()
{
    //如果开了步进驱动 ，单位就变成 0.1mm
    int stepDrive = g_pSettings->readFromInHMIiFile("HMI/stepDrive").toInt();//是否有步进驱动 功能
    int val = 2;
    if(stepDrive == 1)
    {
        val = 1;
    }

    // 激光可工作区域(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        124, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser workable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0067, factory));

    // 激光可工作区域(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        125, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser workable area (X+)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0068, factory));

    // 激光可工作区域(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        126, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser workable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0069, factory));

    // 激光可工作区域(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        127, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser workable area (Y+)"),
                                        -200000, S32_MIN, S32_MAX, -200000, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x006A, factory));

    // 激光头偏移X, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        143, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser head offset X"),
                                        0, S32_MIN, S32_MAX, 0, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0077, factory));

    // 激光头偏移Y, 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        144, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser head offset Y"),
                                        0, S32_MIN, S32_MAX, 0, val, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x007B, factory));

    // 最小切割速度，单位mm/s
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        196, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed"),
                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0098, operate));

    //    // 最大切割速度，单位mm/s
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_LASER,
    //                                        197, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("maximum cutting speed"),
    //                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
    //                                        tr(""), 0, 0, 0x0099, operate));

    //    // 切割加速度，单位mm/s2
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_LASER,
    //                                        198, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Cutting acceleration"),
    //                                        1000, 1, 10000, 1000, 0, tr("mm/s2"), tr(""),
    //                                        tr(""), 0, 0, 0x009A, factory));

    //    // 切割最小加速度，单位mm/s2
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_LASER,
    //                                        199, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Cutting Min. Acceleration"),
    //                                        1000, 1, 10000, 1000, 0, tr("mm/s2"), tr(""),
    //                                        tr(""), 0, 0, 0x0155, factory));

    //    // 切割刹车加速度，单位mm/s2
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_LASER,
    //                                        200, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Cutting Brake Acceleration"),
    //                                        1000, 1, 10000, 1000, 0, tr("mm/s2"), tr(""),
    //                                        tr(""), 0, 0, 0x009B, factory));

    // 激光吹气关闭延时,单位秒,范围0-30,默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        201, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser blow off delay"),
                                        1, 0, 30, 1, 0, tr("s"), tr(""),
                                        tr(""),0, 0, 0x009D, operate));

    // 激光吹气启动延时,单位ms,范围0-6000,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        202, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser blowing start delay"),
                                        0, 0, 6000, 0, 0, tr("ms"), tr(""),
                                        tr(""),0, 0, 0x009E, operate));

    // 激光启动延时(出光延时),单位ms,范围0-3000,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        203, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser start delay (light output delay)"),
                                        0, 0, 3000, 0, 0, tr("ms"), tr(""),
                                        tr(""),
                                        0, 0, 0x009F, operate));

    // 激光关闭延时(关光延时),单秒ms,范围0-3000,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_LASER,
                                        204, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser off delay (light off delay)"),
                                        0, 0, 3000, 0, 0, tr("s"), tr(""),
                                        tr(""),
                                        0, 0, 0x00A0, operate));
}

//平绣机头板参数
void FlatEmbroidery::initHeadParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 双向电磁铁保持时间,单位ms，范围0-50，默认值30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Two way electromagnet hold time"),// 双向电磁铁保持时间
                                        30, 0, 50, 30, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 锁头电机细分数，范围1-64，默认值16
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor segmentation"),// 锁头电机细分数
                                        16, 1, 64, 16, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, factory));

    // 锁头电机运行电流，范围1-31，默认值30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor running current"),// 锁头电机运行电流
                                        30, 1, 31, 30, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0002, factory));

    // 锁头电机锁头电流，范围1-31，默认值6
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor lock current"),// 锁头电机锁头电流
                                        6, 1, 31, 6, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0003, factory));

    // 锁头电机停止电流，范围1-31，默认值2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor stop current"),// 锁头电机停止电流
                                        2, 1, 31, 2, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0004, factory));

    // 锁头自动断电, 0, 不断电, 小电流锁定; 1, 自动断电;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        5, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Lock automatic power off"),// 锁头自动断电
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Auto break:1"), 0, 0, 0x0005, factory));

    // 锁头电机运行角度，范围1-10000，默认值2700，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor operation angle"),// 锁头电机运行角度
                                        2700, 1, 10000, 2700, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0006, factory));

    // 锁头电机起始跳过角度，范围0-1000，默认值0，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor start skipping angle"),// 锁头电机起始跳过角度
                                        0, 1, 1000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0007, factory));

    // 锁头电机启动频率(整步数/秒)，范围1-10000，默认值300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor start frequency"),// 锁头电机启动频率
                                        300, 1, 10000, 300, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0008, factory));

    // 锁头电机运行频率(整步数/秒)，范围1-3000，默认值300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor run frequency"),// 锁头电机运行频率
                                        300, 1, 3000, 300, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0009, factory));

    // 锁头电机加速度(整步数/秒2)，范围1-10000，默认值10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor acceleration"),// 锁头电机加速度
                                        10, 1, 10000, 10, 0, tr("step/s2"), tr(""),
                                        tr(""), 0, 0, 0x000A, factory));

    // 勾线电机细分数，范围1-256，默认值64
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor segmentation"),// 勾线电机细分数
                                        64, 1, 256, 64, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000B, factory));

    // 勾线电机运行电流，范围1-31，默认值30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        12, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor running current"),// 勾线电机运行电流
                                        30, 1, 31, 30, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x000C, factory));

    // 勾线电机勾线电流，范围1-31，默认值5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor hook current"),// 勾线电机勾线电流
                                        5, 1, 31, 5, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x000D, factory));

    // 勾线电机停止电流，范围1-31，默认值2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        14, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor stop current"),// 勾线电机停止电流
                                        2, 1, 31, 2, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x000E, factory));

    // 勾线自动断电, 0, 不断电, 小电流锁定; 1, 自动断电;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        15, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Hook automatic power off"),// 勾线自动断电
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Auto break:1"), 0, 0, 0x000F, factory));

    // 勾线电机运行角度，范围1-30000，默认值10440，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor operation angle"),// 勾线电机运行角度
                                        10440, 1, 30000, 10440, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0010, factory));

    // 勾线电机起始跳过角度，范围0-1000，默认值200，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook motor start skipping angle"),// 勾线电机起始跳过角度
                                        200, 1, 1000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0011, factory));

    // 勾线电机启动频率(整步数/秒)，范围1-500，默认值100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        18, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook moto start frequency"),// 勾线电机启动频率
                                        100, 1, 500, 100, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0012, factory));

    // 勾线电机运行频率(整步数/秒)，范围1-3000，默认值300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        19, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook moto run frequency"),// 勾线电机运行频率
                                        300, 1, 3000, 300, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0013, factory));

    // 勾线电机加速度(整步数/秒2)，范围1-100，默认值10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Hook moto acceleration"),// 勾线电机加速度
                                        10, 1, 100, 10, 0, tr("step/s2"), tr(""),
                                        tr(""), 0, 0, 0x0014, factory));

    // 勾线放松角度，范围0-5000，默认值1260，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Relax angle"),// 勾线放松角度
                                        1260, 0, 5000, 1260, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0015, factory));

    // 单向电磁铁PWM关闭时间，范围2-8，默认值8，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("One way electromagnet PWM shutdown time"),// 单向电磁铁PWM关闭时间
                                        8, 2, 8, 8, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));

    // 锁头类型，范围0-2，0,无锁头  1,电磁铁锁头 2,步进电机锁头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        23, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("lock type"),// 锁头类型
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("No:0;Electromagnet:1;Stepper motor:2"),
                                        0, 0, 0x0016, factory));

    //Q1功能类型	0,锁头电磁铁	1,激光出光控制	默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        24, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Q1 function type"),// Q1功能类型
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("LockHead:0;LaserControl:1"),
                                        0, 0, 0x0016, factory));

    // Q2功能类型	0,单向夹线电磁铁	1,激光定位灯	2,激光吹气	3，跟踪绳绣  4，激光出光控制默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        25, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Q2 function type"),// 锁头类型
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("One-wayClamp:0;LaserPosition:1;LaserBlow:2;TrackRope:3;LaserControl:4"),
                                        0, 0, 0x0016, factory));

    // 激光定位灯关闭延时 ,单位秒,范围0-10,默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        31, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Laser positioning light off delay"),// 激光定位灯关闭延时
                                        3, 0, 10, 3, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));
    //等于绣花机，并为带散珠功能
    int bead = g_pSettings->readFromInHMIiFile("HMI/bead").toInt();//是否有散珠功能
    if(g_emMacType == MACHINE_EMB && bead == 1)
    {
        //散珠出珠完成角度，单位度，默认70，范围60-85
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_HEADPARAMETER,
                                            0,
                                            26, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Completion angle of loose bead"),// 散珠出珠完成角度
                                            70, 60, 85, 70, 0, cod->toUnicode("°"), tr(""),
                                            tr(""), 0, 0, 0x0016, factory));
    }

    int simpleTowel = g_pSettings->readFromInHMIiFile("HMI/simpleTowel").toInt();//是否有简易毛巾功能
    if(g_emMacType == MACHINE_EMB && simpleTowel ==1)
    {
        //简易毛巾动作完成角度，单位度   30-75,默认70
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_HEADPARAMETER,
                                            0,
                                            27, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple towel action completion angle"),// 简易毛巾动作完成角度
                                            70, 30, 75, 70, 0, cod->toUnicode("°"), tr(""),
                                            tr(""), 0, 0, 0x0016, factory));

        // 简易毛巾摆幅,范围10-50,默认50
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_HEADPARAMETER,
                                            0,
                                            32, 0, 0, PARA_VALUE_TYPE_INT,
                                            tr("Simple towel swing"),// 简易毛巾摆幅
                                            50, 10, 50, 50, 0, tr("%"), tr(""),
                                            tr(""), 0, 0, 0x0016, factory));
    }

    //等于绣花机并为带亮片
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {
        addSequinHeadParasList();
    }

    //等于绣花机并为带独立压脚
    int foot = g_pSettings->readFromInHMIiFile("HMI/foot").toInt();//是否有独立压脚
    if(g_emMacType == MACHINE_EMB && foot ==1)
    {
        addIndeFootHeadParasList();
    }

    //    // 夹线装置选择，0，不夹线; 1, 电磁铁夹线; 2, 双向电磁铁夹线
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_HEADPARAMETER,
    //                                        0,
    //                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Clip device selection"),// 夹线装置选择
    //                                        0, 0, 2, 0, 0, tr(""), tr(""),
    //                                        tr("No clamp:0;Elec clamp:1;TwoWay elec clamp:2"), 0, 0, 0x0000, factory));

    //    // 锁头类型，0，无锁头; 1, 电磁铁锁头; 3, 步进电机锁头
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_HEADPARAMETER,
    //                                        0,
    //                                        1, 0, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Lock type"),// 锁头类型
    //                                        0, 0, 3, 0, 0, tr(""), tr(""),
    //                                        tr("Null:0;Elec lock:1;Stepper motor lock:3"), 0, 0, 0x0001, factory));
}

//毛巾调试参数 -rq
void FlatEmbroidery::initTowelDebugParasList()
{
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELDEBUG,
                                        0 ,
                                        ROOT_LIFTMOTORCONTROL, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Lift Motor Control"),//提升电机控制
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , factory));

    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELDEBUG,
                                        0 ,
                                        ROOT_ELASTICCONTROL, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Slack Wire Control"),//松紧线控制
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0002 , factory));

    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELDEBUG,
                                        0 ,
                                        ROOT_CHENILLECOLORDEBUG, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Chenille color change debug"),//毛巾换色调试
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0003 , factory));
}
//毛巾机头板参数-rq
void FlatEmbroidery::initTowelHeadParasList()
{
    // ADC误差范围
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("ADC error range"),// ADC误差范围
                                        250, 100, 2000, 250, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位1ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 1 ADC value"),// 档位1ADC值
                                        10000, 4000, 65535, 10000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位2ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 2 ADC value"),// 档位2ADC值
                                        11800, 4000, 65535, 11800, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位3ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 3 ADC value"),// 档位3ADC值
                                        13000, 4000, 65535, 13000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位4ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 4 ADC value"),// 档位4ADC值
                                        14000, 4000, 65535, 14000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位5ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 5 ADC value"),// 档位5ADC值
                                        15000, 4000, 65535, 15000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位6ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 6 ADC value"),// 档位6ADC值
                                        16000, 4000, 65535, 16000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位7ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 7 ADC value"),// 档位7ADC值
                                        17000, 4000, 65535, 17000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位8ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 8 ADC value"),// 档位8ADC值
                                        19000, 4000, 65535, 19000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位9ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 9 ADC value"),// 档位9ADC值
                                        20000, 4000, 65535, 20000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位10ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 10 ADC value"),// 档位10ADC值
                                        22500, 4000, 65535, 22500, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 档位11ADC值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Gear 11 ADC value"),// 档位11ADC值
                                        55000, 4000, 65535, 55000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 提升电机启动速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Increase motor starting speed"),// 提升电机启动速度
                                        1000, 100, 5000, 1000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 提升电机运行速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Increase motor running speed"),// 提升电机运行速度
                                        10000, 100, 20000, 10000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, factory));

    // 提升电机启停加速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Increase motor start-stop acceleration"),// 提升电机启停加速度
                                        10, 1, 1000, 10, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0002, factory));

    // 提升电机刹车加速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Increase motor braking acceleration"),// 提升电机刹车加速度
                                        2000, 500, 4000, 2000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0003, factory));

    //剪刀电机启动速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        24, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Scissor motor start speed"),// 剪刀电机启动速度
                                        4000, 100, 5000, 4000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0004, factory));

    // 剪刀电机运行速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        25, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Scissor motor running speed"),// 剪刀电机运行速度
                                        20000, 10000, 25000, 20000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0005, factory));
    // 剪刀电机启停加速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        26, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Scissor motor start and stop acceleration"),// 剪刀电机启停加速度
                                        100, 10, 1000, 100, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0006, factory));
    // 剪刀电机刹车加速度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        27, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Scissor Motor Brake Acceleration"),// 剪刀电机刹车加速度
                                        10000, 5000, 20000, 10000, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0007, factory));
    // 剪刀电机位移量
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Scissor motor displacement"),// 剪刀电机位移量
                                        5500, 3000, 7000, 5500, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0008, factory));
    // 毛巾顶线位移量
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille top line displacement"),// 毛巾顶线位移量
                                        1200, 800, 1500, 1200, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0008, factory));

    // 断线检测持续时长
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        30, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Disconnection detection duration"),// 断线检测持续时长
                                        0, 0, 10000, 0, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0008, factory));

    // 毛巾机头个数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHEADPARAMETER,
                                        0,
                                        31, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of chenille heads"),// 毛巾机头个数
                                        0, 0, 16, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0009, factory));
}

//毛巾换色板参数-rq
void FlatEmbroidery::initTowelColorParasList()
{
    // 换色位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Color change"),// 换色位
                                        4000, 1500, 6000, 4000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 剪线位
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Thread trimmer"),// 剪线位
                                        24000, 21500, 26000, 24000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 链式位		（对应电位器的数值adc）
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chain bit"),// 链式位
                                        40000, 37500, 42000, 40000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 毛巾位		（对应电位器的数值adc）
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille bit"),// 毛巾位
                                        58000, 55500, 60000, 58000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    //4
    // 松紧线电机启动速度    单位pluse/s
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Elastic wire motor starting speed"),// 松紧线电机启动速度
                                        320, 160, 3200, 320, 0, tr("pluse/s"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 松紧线电机运行速度	单位pluse/s
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Elastic wire motor running speed"),// 松紧线电机运行速度
                                        1600, 320, 3200, 1600, 0, tr("pluse/s"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 松紧线电机启停加速度	单位pluse/s
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Start-stop acceleration of elastic wire motor"),// 松紧线电机启停加速度
                                        100, 1, 1600, 100, 0, tr("pluse/s"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 松紧线电机的的误差范围（对应电位器的数值adc）
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("The error range of the elastic wire motor"),// 松紧线电机的误差范围
                                        1000, 100, 1500, 1000, 2, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 零位刹车时长,单位ms
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zero brake duration"),// 零位刹车时长
                                        15, 0, 20, 15, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 毛巾针杆数量
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Chenille Needle Bar quantity"),// 毛巾针杆数量
                                        6, 1, 16, 6, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    // 换色刹车时长，单位ms，默认2，范围1-10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Brake duration for color change"),// 换色刹车时长
                                        2, 0, 10, 2, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));

    //松紧线电机刹车范围比例
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Elastic wire motor braking range proportion"),// 松紧线电机刹车范围比例
                                        35, 10, 80, 35, 0, tr("%"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 反向换色等待时长,单位ms,范围0-500,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        12, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Waiting time for reverse color change"),// 反向换色等待时长
                                        0, 0, 500, 0, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
    // 反向换色刹车时长,单位ms,范围0-100,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_TOWELHCPSPARAMETER,
                                        0,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reverse color change brake duration"),// 反向换色刹车时长
                                        0, 0, 100, 0, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x0000, factory));
}

//缠绕机头板参数-rq
void FlatEmbroidery::initCoilHeadParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    // 0
    // 锁头类型，0，无锁头; 1, 电磁铁锁头; 2. 步进电机锁头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("lock type"),// 锁头类型
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("No:0;Electromagnet:1;Stepper motor:2"),
                                        0, 0, 0x0001, factory));

    // 锁头电机运行角度,单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock motor operating angle"),// 锁头电机运行角度
                                        2900, 2500, 3200, 2900, 2,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0002, factory));

    // 锁头启动速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock start speed"),// 锁头启动速度
                                        480, 360, 720, 480, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0003, factory));

    // 锁头运行速度,度/秒   1080, 	1800, 	1440
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock head running speed"),//锁头运行速度
                                        1440, 1080, 1800, 1440, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0004, factory));

    // 锁头加速度  度/秒方 1, 	5, 		3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock head acceleration"),// 锁头加速度
                                        3, 1, 5, 3, 0, tr("deg/s2"), tr(""),
                                        tr(""), 0, 0, 0x0005, factory));

    // 单向电磁铁PWM关闭时间,范围2-8,默认8
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("One-way solenoid PWM off time"),//单向电磁铁PWM关闭时间
                                        8, 2, 8, 8, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0006, factory));

    // M轴旋转启动停止速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M axis rotation start stop speed"),//M轴旋转启动停止速度
                                        10, 1, 360, 10, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0007, factory));
    // M轴旋转归零速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation zero speed"),//M轴旋转归零速度
                                        200, 100, 720, 200, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0008, factory));
    // M轴旋转运转速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotation speed"),//M轴旋转运转速度
                                        360, 100, 720, 360, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0009, factory));
    // M轴旋转运动加速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis rotational motion acceleration"),//M轴旋转运动加速度
                                        1, 1, 10, 1, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0010, factory));
    // M轴手动移动速度,单位度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("M-axis manual movement speed"),//M轴手动移动速度
                                        50, 1, 360, 50, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0011, factory));


    // 压脚升降位移量,单位为整步数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot lift displacement"),//压脚升降位移量
                                        75, 50, 120, 75, 0, tr("step"), tr(""),
                                        tr(""), 0, 0, 0x0012, factory));
    // 压脚启动速度,整步数/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        12, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot start speed"),//压脚启动速度
                                        10, 1, 100, 10, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0013, factory));
    // 压脚归零速度,整步数/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot return speed"),//压脚归零速度
                                        100, 10, 200, 100, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0014, factory));
    // 压脚运行速度,整步数/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        14, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot running speed"),//压脚运行速度
                                        800, 400, 1000, 800, 0, tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0015, factory));
    // 压脚加速度,整步数/秒方
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        15, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot acceleration"),//压脚加速度
                                        1, 1, 10, 1, 0, tr("step/s2"), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));
    // 16
    // 锯齿启动速度,度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth start speed"),//锯齿启动速度
                                        10, 10, 200, 10, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0017, factory));
    // 锯齿归零速度,度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth zeroing speed"),//锯齿归零速度
                                        100, 10, 360, 100, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0018, factory));
    // 锯齿运行速度,度/秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        18, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth running speed"),//锯齿运行速度
                                        360, 100, 720, 360, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0019, factory));
    // 锯齿加速度,度/秒方
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        19, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("sawtooth acceleration"),//锯齿加速度
                                        1, 1, 10, 1, 0, tr("deg/s"), tr(""),
                                        tr(""), 0, 0, 0x0020, factory));
    // 20

    // 压脚下降起始角度,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot lowering start angle"),// 压脚下降起始角度
                                        0, 0, 350, 0, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 压脚上升起始角度,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot lift start angle"),// 压脚上升起始角度
                                        220, 200, 240, 220, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 压脚动作持续角度,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot action duration angle"),// 压脚动作持续角度
                                        110, 90, 120, 110, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 压脚振幅,单位为0.01整步数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Presser foot amplitude"),// 压脚振幅
                                        2000, 1000, 6000, 2000, 2,   tr("step/s"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 24
    // 锯齿摆动起始角度,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        24, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth swing start angle"),// 锯齿摆动起始角度
                                        240, 200, 260, 240, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 锯齿摆动持续角度,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        25, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth Swing Duration Angle"),// 锯齿摆动持续角度
                                        200, 180, 220, 200, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 锯齿摆幅,单位为0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        26, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth swing"),// 锯齿摆幅
                                        2850, 1500, 8000, 2850, 2,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
    // 锯齿上位位置,单位度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_COILHEADPARAMETER,
                                        0,
                                        27, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Sawtooth upper position"),// 锯齿上位位置
                                        30, 20, 60, 30, 0,  cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0021, factory));
}
//外围板升级参数
void FlatEmbroidery::initEXBUpgradeParaList()
{
    //绣花机-外围板升级参数-机头板升级；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_EXBUPGRADE,
                                        0 ,
                                        ROOT_HEADUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("EMB Overhead board upgrade"),//平绣机头板升级
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0000, factory));

    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if((towel ==1)||
        (g_emProductType == PRODUCT_CHEN))
    {
        //绣花机-外围板升级参数-毛巾机头板升级；单位：无
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_EXBUPGRADE,
                                            0 ,
                                            ROOT_TOWELHEADUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Chenille Overhead board upgrade"),//毛巾机头板升级
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0001, factory));
    }
    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(coil ==1)
    {
        //绣花机-外围板升级参数-缠绕机头板升级；单位：无
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_EXBUPGRADE,
                                            0 ,
                                            ROOT_COILHEADUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                            tr("Coil Overhead board upgrade"),//缠绕机头板升级
                                            0, 0, 0, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x0001, factory));
    }
    //绣花机-外围板升级参数-换色板升级；单位：无
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_EXBUPGRADE,
//                                        0 ,
//                                        ROOT_HCPSUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
//                                        tr("Change color board upgrade"),//换色板升级
//                                        0, 0, 0, 0, 0, tr(""), tr(""),
//                                        tr(""),
//                                        0, 0, 0x0002, factory));
}

void FlatEmbroidery::initOutCtrlList()
{
    m_allOutCtrlList.clear();

    QString enableStr = tr("Enable");   //使能
    QString disableStr = tr("Disable"); //失能
    QString jogPStr = tr("JogP"); //正转
    QString jogNStr = tr("JogN"); //反转
    QString zeroStr = tr("Zero"); //归零
    QString openStr = tr("Open"); //打开
    QString closeStr= tr("Close");//关闭
    QString upStr = tr("Up"); //上升
    QString downStr= tr("Down");//下降
    QString runStr= tr("Run");//执行
    QString followStr= tr("FollowPos");//跟随位
    QString lowStr= tr("LowPos");//低位
    QString toupStr = tr("ToUp"); //上位
    QString ctrl1Str = tr("Ctrl1"); //摆动位1
    QString ctrl2Str = tr("Ctrl2"); //摆动位2
    QString zeroPosStr = tr("ZeroPos"); //零位

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0001,tr("X to move motor"),MT_LX,// X向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0002,tr("Y to move motor"),MT_LY,// Y向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));


    //等于绣花机带毛巾    -rq
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if(( towel ==1)||
            (g_emProductType == PRODUCT_CHEN)
            )
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Chenille Spindle"),MT_LTM,// 毛巾主轴
                                                 enableStr,true,OUTCONTROL_TOWEL_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_TOWEL_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Chenille M axis"),MT_LTMM,// 毛巾M轴
                                                 enableStr,true,OUTCONTROL_TOWELM_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_TOWELM_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Chenille ring shaft"),MT_LRM,// 毛巾打环轴
                                                 enableStr,true,OUTCONTROL_TOWELRM_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_TOWELRM_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000C,tr("Chenille scissors"),OT_CHEN_CUT,// 毛巾剪刀
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000D,tr("Chenille dusting 1"),OT_CHEN_DUST,// 毛巾除尘1
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000D,tr("Chenille dusting 2"),OT_CHEN_DUST2,// 毛巾除尘2
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000D,tr("Chenille dusting 3"),OT_CHEN_DUST3,// 毛巾除尘3
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000E,tr("Chenille oil"),OT_CHEN_OIL,// 毛巾加油
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000E,tr("towel scissors relax"),OT_CHEN_RELAX,// 毛巾剪刀放松(二代叫顶线)
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("towel scissors change"),CHENILLE_CUT_ZERO,// 毛巾剪刀找零
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));
    }

    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil ==1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0001,tr("Coil Spindle"),MT_LCM2,// 缠绕主轴
                                                 enableStr,true,OUTCONTROL_COIL_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_COIL_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0002,tr("Coil M axis"),MT_LCMM,// 缠绕M轴
                                                 enableStr,true,OUTCONTROL_COILM_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_COILM_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0003,tr("Coil presser foot motor"),MT_LCF,// 缠绕压脚电机
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0004,tr("Coil sawtooth motor"),MT_LCZ,// 缠绕锯齿电机
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0004,tr("Coil sawtooth"),OT_COIL_ZIGZAG,// 缠绕锯齿      零位,上位,摆动位1,摆动位2
                                                 "",false,-1,-1,-1,
                                                 zeroPosStr,true,OUTCONTROL_ZEROPOS,-1,-1,
                                                 toupStr,true,OUTCONTROL_TOUP,-1,-1,
                                                 ctrl1Str,true,OUTCONTROL_CTRL1,-1,-1,
                                                 ctrl2Str,true,OUTCONTROL_CTRL2,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("winding lock"),OT_COIL_LOCK,// 缠绕锁头
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0006,tr("winding scissors"),OT_COIL_CUT,// 缠绕剪刀
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0007,tr("twisted thread"),OT_COIL_PUSH,// 缠绕扣线
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0008,tr("winding oil"),OT_COIL_OIL,// 缠绕加油
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0009,tr("Coil presser foot"),OT_COIL_FOOT,// 缠绕压脚   //上升下降 跟随位
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1,
                                                 followStr,true,OUTCONTROL_FOLLOWPOS,-1,-1));
    }


    //    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Color change motor"),MT_ECM,// 换色电机
    //                                             enableStr,false,-1,-1,-1,
    //                                             disableStr,false,-1,-1,-1,
    //                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
    //                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
    //                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));
    if (g_emProductType == PRODUCT_EMB_EMB)//平绣
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0003,tr("Flat embroidery spindle"),MT_LEM,// 平绣主轴
                                                 enableStr,true,OUTCONTROL_MS_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_MS_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Emb Color change motor"),MT_ECM,// 平绣换色电机
                                                 enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                                 disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                                 jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                                 jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0008,tr("Flat embroidery button line"),OT_EMB_PUSH,// 平绣扣线
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0009,tr("Flat embroidery clip noodles"),OT_EMB_CLIP,// 平绣夹面线
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000A,tr("Flat embroidery lock"),OT_EMB_LOCK,// 平绣锁头
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000A,tr("Flat embroidery oil"),OT_EMB_OIL,// 平绣加油
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000B,tr("Flat embroidery hook knife"),OT_EMB_HOOK,// 平绣勾刀
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000C,tr("Flat embroidery scissors"),OT_EMB_CUT,// 平绣剪刀
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000D,tr("Laser position light"),OT_LASER_LIGHT,// 激光定位灯   lxs-20220428
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

    }

    int laser = g_pSettings->readFromInHMIiFile("HMI/laser").toInt();//是否有激光功能
    if(g_emMacType == MACHINE_EMB && laser == 1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000E,tr("laser control"),OT_LASER_CTRL,// // 激光控制
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("laser blow"),OT_LASER_BLOW,// 激光吹气
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    }

    //等于绣花机，并为带亮片功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0010,tr("Left sequential color change motor"),MT_SC1,// 左亮片换色电机
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0012,tr("Left sequins patch"),LEFT_SEQUIN_PUSH,// 左亮片拨片
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 runStr,true,MANUALACTION_RUN,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0013,tr("Left sequins slice"),OT_LEFT_SEQUIN_CUT,// 左亮片切片
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0014,tr("Left sequins lift"),OT_LEFT_SEQUIN_LIFT,// 左亮片升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0015,tr("Right sequins lift"),OT_RIGHT_SEQUIN_LIFT,// 右亮片升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));
    }

    //等于绣花机，并为带散珠功能
    int bead = g_pSettings->readFromInHMIiFile("HMI/bead").toInt();//是否有散珠功能
    if(g_emMacType == MACHINE_EMB && bead ==1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0014,tr("Left loose bead lifting"),OT_LEFT_BEAD_LIFT,// 左散珠升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0014,tr("Right loose bead lifting"),OT_RIGHT_BEAD_LIFT,// 右散珠升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0014,tr("Disperse bead feeding"),OT_BEAD_FEED,// 散珠上料
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1));
    }


    //等于绣花机，并为带简易毛巾功能
    int simpleTowel = g_pSettings->readFromInHMIiFile("HMI/simpleTowel").toInt();//是否有简易毛巾功能
    if(g_emMacType == MACHINE_EMB && simpleTowel ==1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0015,tr("Simple towel lifting"),OT_EASYCHENILLE_LIFT,// 简易毛巾升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));
    }

    //等于绣花机，并为带独立压脚
    int foot = g_pSettings->readFromInHMIiFile("HMI/foot").toInt();//是否有独立压脚
    if(g_emMacType == MACHINE_EMB && foot ==1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Independent presser foot motor"),MT_LFF,// 独立压脚电机
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 zeroStr,true,OUTCONTROL_ZERO,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Independent presser foot"),OT_EMB_FOOT,// 独立压脚   //上升下降 跟随位
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1,
                                                 followStr,true,OUTCONTROL_FOLLOWPOS,-1,-1));
    }

    //等于绣花机并为上下料机构
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_FEED)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Air frame"),OT_FRAME,// 气框
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Limit clamping block"),OT_FEED_CLIP,// 限位夹紧块
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 1"),OT_FEED_MOTO1,// 进料电机1
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 2"),OT_FEED_MOTO2,// 进料电机2
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 3"),OT_FEED_MOTO3,// 进料电机3
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 4"),OT_FEED_MOTO4,// 进料电机4
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 5"),OT_FEED_MOTO5,// 进料电机5
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Feed motor 6"),OT_FEED_MOTO6,// 进料电机6
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 1"),OT_RETU_MOTO1,// 退料电机1
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 2"),OT_RETU_MOTO2,// 退料电机2
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 3"),OT_RETU_MOTO3,// 退料电机3
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 4"),OT_RETU_MOTO4,// 退料电机4
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 5"),OT_RETU_MOTO5,// 退料电机5
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Return motor 6"),OT_RETU_MOTO6,// 退料电机6
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    }
   //等于绣花机并为跟踪绳绣
    int trackropeEmb = g_pSettings->readFromInHMIiFile("HMI/trackropeEmb").toInt();//是否有跟踪绳绣功能
    if(g_emMacType == MACHINE_EMB && trackropeEmb ==1)
    {
        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0015,tr("Tracking rope embroidery lifting and lowering"),OT_TRACKROPE_LIFT,//跟踪绳绣升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 upStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 downStr,true,OUTCONTROL_CLOSE,-1,-1));
    }
}

void FlatEmbroidery::initShortCutList()
{
    m_allShortCutList.clear();

    m_allShortCutList.append(makeAShortCutItem(0,0x0001,tr("AllToZero"),"buttonAllToZero",FUN_ALLTOZERO));//全部归零
    m_allShortCutList.append(makeAShortCutItem(0,0x0002,tr("EmbHook"),"buttonFlatEmbHook",FUN_FLATEMBHOOK));//平绣勾线
    m_allShortCutList.append(makeAShortCutItem(0,0x0003,tr("AxleJog"),"buttonSpindleJog",FUN_SPINDLEJOG));//主轴点动-
    m_allShortCutList.append(makeAShortCutItem(0,0x0004,tr("AxleRotate"),"buttonSpindleRotate",FUN_SPINDLEROTATE));//主轴旋转
    m_allShortCutList.append(makeAShortCutItem(0,0x0005,tr("GoWork"),"buttonBackWorkPoint",FUN_BACKWORKPOINT));//回工作点
    m_allShortCutList.append(makeAShortCutItem(0,0x0006,tr("GoOrigin"),"buttonBackToOrigin",FUN_BACKTOORIGIN));//回原点
    m_allShortCutList.append(makeAShortCutItem(0,0x0007,tr("SetOffset"),"buttonSetOffsetPoint",FUN_SETOFFSETPOINT));//定偏移点
    m_allShortCutList.append(makeAShortCutItem(0,0x0008,tr("GoOffset"),"buttonBackOffsetPoint",FUN_BACKOFFSETPOINT));//回偏移点
    m_allShortCutList.append(makeAShortCutItem(0,0x0009,tr("SetStart"),"buttonSetEmbPoint",FUN_SETSTARTEMBPOINT));//定起绣点
    m_allShortCutList.append(makeAShortCutItem(0,0x000A,tr("GoStart"),"buttonBackEmbPoint",FUN_BACKSTARTEMBPOINT));//回起绣点
    m_allShortCutList.append(makeAShortCutItem(0,0x000B,tr("CheckFrame"),"buttonBorderCheck",FUN_CHECKFRAME));//边框检查-
    m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("Trim"),"buttonManualTrim",FUN_MANUALTRIM));//平绣剪线
    m_allShortCutList.append(makeAShortCutItem(0,0x000D,tr("UnderTrim"),"buttonCutOpenAndClose",FUN_CUTOPENANDCLOSE));//下剪线
    m_allShortCutList.append(makeAShortCutItem(0,0x000E,tr("ChangeC"),"buttonManualChangeColor",FUN_MANUALCHANGECOLOR));//手动换色
    m_allShortCutList.append(makeAShortCutItem(0,0x000F,tr("GoOrBack"),"buttonForwardOrBack",FUN_FORWARDORBACK));//前进回退
    m_allShortCutList.append(makeAShortCutItem(0,0x0010,tr("MoveBorder"),"buttonQuantityMoveFrame",FUN_QUANTITYMOVEFRAME));//定量移框
    m_allShortCutList.append(makeAShortCutItem(0,0x0011,tr("RodPosition"),"buttonNeedleRodPosition",FUN_NEEDLERODPOSITION));//针杆定位
    m_allShortCutList.append(makeAShortCutItem(0,0x0012,tr("Border"),"buttonSimulateFrame",FUN_SIMULATEFRAME));//空走边框

    //m_allShortCutList.append(makeAShortCutItem(0,0x0013,tr("Reset"),"buttonProcessReset",FUN_PROCESSRESET));//流程复位
    m_allShortCutList.append(makeAShortCutItem(0,0x0016,tr("Oil"),"buttonManualOil",FUN_MANUALOIL));//手动加油-
    // m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("EmbWorkArea"),"buttonBorderEmb",FUN_EMBWORKAREA));//平绣设置可工作区域
    //m_allShortCutList.append(makeAShortCutItem(0,0x0017,tr("ResetRepeatNum"),"buttonBorderEmb",FUN_RESETREPEATNUM));//重置反复次数


    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能

    if(g_emMacType == MACHINE_EMB && (coil ==1 || towel ==1))
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("SwitchHead"),"buttonSinglePunch",FUN_SWITCHHEAD));//机头切换
        m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("MRotate"),"buttonSpindleRotate",FUN_MS_ROTATE));//M轴旋转

    }

    if( coil !=1&& towel ==1)//有毛巾没有缠绕
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x0012,tr("TowelCable"),"buttonSimulateFrame",FUN_TOWELCABLE));//毛巾拉线
    }

    if (g_emProductType == PRODUCT_CHEN)
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("MRotate"),"buttonSpindleRotate",FUN_MS_ROTATE));//M轴旋转
        m_allShortCutList.append(makeAShortCutItem(0,0x0012,tr("TowelCable"),"buttonSimulateFrame",FUN_TOWELCABLE));//毛巾拉线
    }


    //等于绣花机并为带自动换梭功能
    int shuttleChange = g_pSettings->readFromInHMIiFile("HMI/shuttleChange").toInt();//是否有自动换梭功能
    if(g_emMacType == MACHINE_EMB && shuttleChange ==1)
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("ShutCount"),"buttonShutCount",FUN_SHUTTLECOUNT));//梭盘计数复位
    }
    //等于绣花机，并为带亮片功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x000E,tr("SeqColor"),"buttonLeftSequinChangeColor",FUN_LEFTSEQUINCHANGECOLOR));//左亮片换色
        // m_allShortCutList.append(makeAShortCutItem(0,0x000E,tr("RightSequinChangeColor"),"buttonRightSequinChangeColor",FUN_RIGHTSEQUINCHANGECOLOR));//右亮片换色
    }
    //等于绣花机并为上下料机构
    if(g_emMacType == MACHINE_EMB && g_emProductType == PRODUCT_EMB_FEED)
    {
        m_allShortCutList.append(makeAShortCutItem(0,0x0014,tr("SetFeed"),"buttonSetFeedingPoint",FUN_SETFEEDINGPOINT));//定上料点
        m_allShortCutList.append(makeAShortCutItem(0,0x0015,tr("GoFeed"),"buttonBackFeedingPoint",FUN_BACKFEEDINGPOINT));//回上料点
    }
}

void FlatEmbroidery::initAssistList()
{
    m_allAssistList.clear();

    m_allAssistList.append(makeAAssistItem(0,0x0001,tr("Signal"),"buttonSensor",ASSIST_SENSOR));//传感器信号
    m_allAssistList.append(makeAAssistItem(0,0x0002,tr("Action"),"buttonControlAction",ASSIST_CONTROLACTION));//控制动作
    m_allAssistList.append(makeAAssistItem(0,0x0003,tr("HMIUpgrade"),"buttonHMIUpgrade",ASSIST_HMIUPGRADE));//界面升级
    m_allAssistList.append(makeAAssistItem(0,0x0004,tr("MCUpgrade"),"buttonMCUpgrade",ASSIST_MCUPGRADE));//主控升级
    m_allAssistList.append(makeAAssistItem(0,0x0005,tr("EXBUpgrade"),"buttonEXBUpgrade",ASSIST_EXBUPGRADE));//外围板升级
    m_allAssistList.append(makeAAssistItem(0,0x0006,tr("ParaImport"),"buttonParaImport",ASSIST_PARAIMPORT));//参数导入
    m_allAssistList.append(makeAAssistItem(0,0x0007,tr("ParaExport"),"buttonParaExport",ASSIST_PARAEXPORT));//参数导出
    m_allAssistList.append(makeAAssistItem(0,0x0008,tr("Software"),"buttonSoftwareSet",ASSIST_SOFTWARESET));//软件设置
    m_allAssistList.append(makeAAssistItem(0,0x0009,tr("Authorize"),"buttonSoftwareAuthor",ASSIST_AUTHORIZATION));//软件授权
    m_allAssistList.append(makeAAssistItem(0,0x000A,tr("Network"),"buttonNetworkManage",ASSIST_NETWORK));//网络管理

    s16 wifi = g_pSettings->readFromInHMIiFile("HMI/wifi").toInt();//是否有wifi
    if(wifi == 1)
    {
        m_allAssistList.append(makeAAssistItem(0,0x000A,tr("WIFI"),"buttonWIFI",ASSIST_WIFI));//WIFI管理
    }

    m_allAssistList.append(makeAAssistItem(0,0x000B,tr("NeedleSet"),"buttonNeedleSet",ASSIST_NEEDLESET));//针杆设置
    m_allAssistList.append(makeAAssistItem(0,0x000D,tr("Time"),"buttonTimeSet",ASSIST_TIMESET));//时间设置
    m_allAssistList.append(makeAAssistItem(0,0x000E,tr("Shortcut"),"buttonCommonFunction",ASSIST_SHORTCUTSET));//常用设置
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("Statistics"),"buttonProductStatistics",ASSIST_PRODUCTSTATICS));//生产统计
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("ErrorLog"),"buttonAgingTest",ASSIST_ERRORLOG));//错误日志
    m_allAssistList.append(makeAAssistItem(0,0x0010,tr("Version"),"buttonVersionInfo",ASSIST_MCVERSION));//版本信息
    m_allAssistList.append(makeAAssistItem(0,0x0011,tr("EXBVersion"),"buttonEXBVersionInfo",ASSIST_EXBVERSION));//外围板信息
    m_allAssistList.append(makeAAssistItem(0,0x0012,tr("UnderDetect"),"buttonBottomDetect",ASSIST_BOTTOMLINEDETECT));//底线检测
    m_allAssistList.append(makeAAssistItem(0,0x0013,tr("FaceDetect"),"buttonFaceDetect",ASSIST_FACELINEDETECT));//面线检测
    m_allAssistList.append(makeAAssistItem(0,0x0014,tr("AxleTest"),"buttonSpindleTest",ASSIST_SPINDLETEST));//主轴研车
    m_allAssistList.append(makeAAssistItem(0,0x0015,tr("DebugInfo"),"buttonSpindleTest",ASSIST_DEBUGINFO));//调试信息

    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil == 1)
    {
        m_allAssistList.append(makeAAssistItem(0,0x000C,tr("CoilM"),"buttonSpindleEnable",ASSIST_MSPINDLE_TO_ANGLE));// 缠绕主轴去指定角度
        m_allAssistList.append(makeAAssistItem(0,0x0012,tr("CoilUnder"),"buttonBottomDetect",ASSIST_COILBOTTOMLINEDETECT));//缠绕底线检测
        m_allAssistList.append(makeAAssistItem(0,0x0013,tr("CoilFace"),"buttonFaceDetect",ASSIST_COILFACELINEDETECT));//缠绕面线检测
    }
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if((towel == 1)||
            (g_emProductType == PRODUCT_CHEN))
    {
        m_allAssistList.append(makeAAssistItem(0,0x0016,tr("ChenilleFun"),"buttonTowelEmb",ASSIST_TOWELDEBUG));//毛巾调试
    }
    //等于绣花机并为带自动换梭功能
    int shuttleChange = g_pSettings->readFromInHMIiFile("HMI/shuttleChange").toInt();//是否有自动换梭功能
    if(g_emMacType == MACHINE_EMB && shuttleChange ==1)
    {
        m_allAssistList.append(makeAAssistItem(0,0x0016,tr("AutoShuttle"),"buttonSetOffsetPoint",ASSIST_CHANGEASHUTTLE));//自动换一个梭
    }
    //等于绣花机，并为带亮片功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    if(g_emMacType == MACHINE_EMB && sequin ==1)
    {
        //m_allAssistList.append(makeAAssistItem(0,0x0016,tr("SequinPara"),"buttonSequinDebug",ASSIST_SEQUINDEBUG));//亮片参数
    }
    m_allAssistList.append(makeAAssistItem(0,0x0017,tr("Root"),"buttonRoot",ASSIST_ROOT));//超级用户

#ifdef Q_OS_WIN
    m_allAssistList.append(makeAAssistItem(0,0x0018,tr("ShutDown"),"buttonShutDown",ASSIST_SHUTDOWN));//关机
#endif
}

void FlatEmbroidery::initPatternSetList()
{
    m_allPatternSetList.clear();

    m_allPatternSetList.append(makeAPatternSetItem(0,0x0001,tr("Select"),"buttonPatternSelect",PATTERNSET_PATTERNSELECT));//花样选择
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0002,tr("Para"),"buttonPatternPara",PATTERNSET_PATTERNPARA));//花样参数
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0003,tr("Color"),"buttonPatternColorOrder",PATTERNSET_PATTERNCOLOR));//花样色序
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if((towel == 1)||
        ( g_emProductType == PRODUCT_CHEN))
    {
        m_allPatternSetList.append(makeAPatternSetItem(0,0x0004,tr("TowelH"),"buttonPatternTowelHeight",PATTERNSET_TOWELHEIGHT));//毛巾高度
    }
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0005,tr("Import"),"buttonPatternImport",PATTERNSET_PATTERNIMPORT));//花样导入
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0006,tr("Export"),"buttonPatternExport",PATTERNSET_PATTERNEXPORT));//花样导出
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0007,tr("Delete"),"buttonPatternDelete",PATTERNSET_PATTERNDELETE));//花样删除
}

void FlatEmbroidery::initParaSetList()
{
    m_allParaSetList.clear();

    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    int shuttleChange = g_pSettings->readFromInHMIiFile("HMI/shuttleChange").toInt();//是否有自动换梭功能
    int laser = g_pSettings->readFromInHMIiFile("HMI/laser").toInt();//是否有激光功能
    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    int sequin = g_pSettings->readFromInHMIiFile("HMI/sequin").toInt();//是否有亮片功能
    int bead = g_pSettings->readFromInHMIiFile("HMI/bead").toInt();//是否有散珠功能
    int simpleTowel = g_pSettings->readFromInHMIiFile("HMI/simpleTowel").toInt();//是否有简易毛巾功能
    int trackropeEmb = g_pSettings->readFromInHMIiFile("HMI/trackropeEmb").toInt();//是否有跟踪绳绣功能

    m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("SetPara"),"buttonParaSet",PARASET_SETTING));//设置参数

    if (g_emProductType == PRODUCT_EMB_EMB)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("EmbPara"),"buttonEmbParas",PARASET_EMB));//绣花参数
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("CutPara"),"buttonCutParas",PARASET_CUT));//剪线参数
    }
    if(g_emMacType == MACHINE_EMB && coil == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0006,tr("CoilPara"),"buttonCoilParas",PARASET_COIL));//缠绕参数
    }
    if((towel == 1)||
        (g_emProductType == PRODUCT_CHEN))
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("ChenPara"),"buttonTowelParas",PARASET_CHEN));//毛巾参数
    }
    if (g_emProductType == PRODUCT_EMB_FEED)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0003,tr("FeedPara"),"buttonUpDnParas",PARASET_FEED));//上下料参数
    }
    if (shuttleChange == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0004,tr("ShuttlePara"),"buttonAutoParas",PARASET_SHUTTLE));//自动换梭参数
    }
    if (laser == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("LaserPara"),"buttonLaserParas",PARASET_LASER));//激光参数
    }
    if (sequin == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("SequinPara"),"buttonSequinParas",PARASET_SQU));//亮片参数
    }
    if (bead == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("BeadPara"),"buttonBeadParas",PARASET_BEAD));//散珠参数
    }
    if(simpleTowel == 1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("SChenPara"),"buttonSChenlParas",PARASET_SIMPLETOWEL));//简易毛巾参数
    }
    if(trackropeEmb ==1)
    {
        m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("TracKropePara"),"buttonSChenlParas",PARASET_TRACKROPR));//跟踪绳绣参数
    }
}

void FlatEmbroidery::initEmbFunctionList()
{
    m_allEmbFunctionList.clear();

    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0001,tr("BorderEmb"),"buttonBorderEmb",EMBFUN_BORDEREMB));//边框刺绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0002,tr("MateEmb"),"buttonMateEmb",EMBFUN_MATEEMB));//匹绣

    int headEmb = g_pSettings->readFromInHMIiFile("HMI/headEmb").toInt();//是否有隔头绣功能
    //是否显示隔头绣按钮
    if(headEmb == 1)
    {
        m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0003,tr("HeadEmb"),"buttonHeadEmb",EMBFUN_HEADEMB));//隔头绣
    }

    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0004,tr("PatchEmb"),"buttonPatchEmb",EMBFUN_PATCHEMB));//贴布绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0005,tr("LineEmb"),"buttonOpenLineEmb",EMBFUN_OPENLINEEMB));//开位线绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0006,tr("OutLine"),"buttonOutLine",EMBFUN_OUTLINE));//花样轮廓
    //m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0006,tr("OutLineEmb"),"buttonOutLine",EMBFUN_OUTLINECHECK));//轮廓刺绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0007,tr("LineOffset"),"buttonLineOffset",EMBFUN_LINEOFFSET));//线迹偏移
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0007,tr("Repeated"),"buttonRepeated",EMBFUN_REPEATED));//反复绣
}

//初始化传感器列表
void FlatEmbroidery::initSensorList()
{
    QList <SensorItem> sensorList;

    //从字节的0开始
    sensorList.append(makeASensorItem(0x0000, 0, tr("Start button")));//启动按钮
    sensorList.append(makeASensorItem(0x0001, 0, tr("Pause button")));//暂停按钮
    sensorList.append(makeASensorItem(0x0002, 0, tr("Jog button")));//点动按钮
    sensorList.append(makeASensorItem(0x0003, 0, tr("open box button 1")));//开框按钮1
    sensorList.append(makeASensorItem(0x0003, 1, tr("open box button 2")));//开框按钮2
    sensorList.append(makeASensorItem(0x0003, 2, tr("open box button 3")));//开框按钮3
    sensorList.append(makeASensorItem(0x0003, 3, tr("open box button 4")));//开框按钮4
    sensorList.append(makeASensorItem(0x0003, 4, tr("open box button 5")));//开框按钮5
    sensorList.append(makeASensorItem(0x0003, 5, tr("open box button 6")));//开框按钮6

    sensorList.append(makeASensorItem(0x0007, 0, tr("Air pressure detection")));//气压检测
    sensorList.append(makeASensorItem(0x0008, 0, tr("Safe input")));//安全输入
    sensorList.append(makeASensorItem(0x0008, 1, tr("Temperature alarm")));//温度报警

    sensorList.append(makeASensorItem(0x0020, 0, tr("Main frame X zero position")));//主框架X零位
    sensorList.append(makeASensorItem(0x0020, 1, tr("Main frame Y zero position")));//主框架Y零位
    sensorList.append(makeASensorItem(0x0022, 0, tr("Main frame X negative limit")));//主框架X负限位
    sensorList.append(makeASensorItem(0x0022, 1, tr("Main frame Y negative limit")));//主框架Y负限位
    sensorList.append(makeASensorItem(0x0023, 0, tr("Main frame X positive limit")));//主框架X正限位
    sensorList.append(makeASensorItem(0x0023, 1, tr("Main frame Y positive limit")));//主框架Y正限位
    sensorList.append(makeASensorItem(0x0100, 0, tr("Scissors return")));//剪刀回位
    sensorList.append(makeASensorItem(0x0103, 1, tr("Tracking rope embroidery alarm")));//跟踪绳绣报警
    sensorList.append(makeASensorItem(0x0103, 0, tr("Automatic shuttle change alarm")));//自动换梭报警
    sensorList.append(makeASensorItem(0x0102, 3, tr("Hat embroidery in place")));//帽绣到位

    //等于绣花机并为带毛巾
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if(( towel ==1)||
            (g_emProductType == PRODUCT_CHEN)
            )
    {
        sensorList.append(makeASensorItem(0x0102, 0, tr("Chen M axis zero position")));//毛巾M轴零位
        sensorList.append(makeASensorItem(0x0102, 1, tr("Chen ring shaft zero position")));//毛巾打环轴零位
        sensorList.append(makeASensorItem(0x0028, 1, tr("Chen FrameX Zero")));//毛巾框架X零位
        sensorList.append(makeASensorItem(0x0028, 5, tr("Chen FrameY Zero")));//毛巾框架Y零位

        sensorList.append(makeASensorItem(0x002B, 1, tr("Chen frameX positive limit")));//毛巾框架X正限位
        sensorList.append(makeASensorItem(0x002A, 1, tr("Chen FrameX Negative Limit")));//毛巾框架X负限位
        sensorList.append(makeASensorItem(0x002B, 5, tr("Chen frameY positive limit")));//毛巾框架Y正限位
        sensorList.append(makeASensorItem(0x002A, 5, tr("Chen FrameY Negative Limit")));//毛巾框架Y负限位
    }
    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil ==1)
    {
        sensorList.append(makeASensorItem(0x0102, 2, tr("Coil M-axis zero position")));//缠绕M轴零位
    }

    //将机型所需的传感器列表替换到传感器整体列表中
    for(int i = 0; i < sensorList.size(); i++)
    {
        int byteaddr = sensorList[i].m_byte_offset;
        int bitaddr = sensorList[i].m_bit_offset;
        QString str = sensorList[i].m_name;
        int type = sensorList[i].m_type;

        int idx = byteaddr*8+bitaddr;
        if(idx < m_allSensorList.size())
        {
            m_allSensorList[idx].m_name = str;
            m_allSensorList[idx].m_type = type;
        }
    }
}

//初始化错误代码和状态列表
void FlatEmbroidery::initErrorCodeAndStateList()
{
    m_allErrorCodeAndStateList.clear();

    //错误代码
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_NOT_ZERO, tr("The embroidery spindle is not in the zero position")));// 绣花主轴不在零位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_SWND_TIMOUT, tr("Flat embroidery color change timeout")));// 平绣换色超时
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_ND_ERR, tr("Flat embroidery needle position error")));// 平绣针位错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NODE_ERR, tr("Node error")));// 节点错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_BUS_ERR, tr("Bus error")));// 总线错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ND_NUM_ERR, tr("Wrong number of needle positions")));// 针位数量错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_HOOK_NOT_ZERO, tr("Flat embroidery hook knife is not returning")));// 平绣勾刀不在回位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_CUT_NOT_ZERO, tr("Flat embroidery cutter is not returning")));// 平绣剪刀不在回位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CAN_TIMEOUT, tr("CAN communication timeout")));// CAN通讯超时
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_SCBE_ALM, tr("Bullet motor alarm")));// 散珠电机报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_SCBE_NO_MATERIAL, tr("Tracking rope embroidery alarm")));// 跟踪绳绣报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_HEAD_NUM, tr("Number of machine heads")));// 机头个数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_READ_HEAD_PARA, tr("Read the head board parameter error")));// 读取机头板参数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NO_MATERIEL, tr("Feed is disappear err")));// 缺料报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_WORK_HEAD, tr("Working head error")));// 工作机头错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHANGE_SHUT, tr("Shuttle change exception")));// 换梭异常
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_COIL_NOT_ZERO, tr("Winding spindle is not at zero position")));// 缠绕主轴不在零位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_AUTO_SET_START, tr("Failed to automatically set the stitch point")));// 自动定起绣点失败
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_DRIVER, tr("X drive alarm")));// X驱动器报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_DRIVER, tr("Y drive alarm")));// Y驱动器报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_TEMP_ALARM, tr("Temperature alarm")));// 温度报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_SPINDLE_RATIO, tr("Pingxiu spindle gear ratio error")));// 平绣主轴齿轮比错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MS_COOR_SYSTM, tr("Horizontal embroidery spindle coordinate system error")));// 平绣主轴坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ZP_SIGNAL, tr("ZP signal abnormality")));// ZP信号异常
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MP_SIGNAL, tr("MP signal abnormality")));// MP信号异常
    //状态代码
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_CHNGCL_STOP, tr("Color change stop")));// 换色停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_ADJ_THREAD_STOP, tr("Stitch adjustment stop")));// 线迹调整停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_MEND_FINISH, tr("Mending embroidery is complete")));// 补绣完成
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_PATCH_STOP, tr("Patch embroidery stop")));// 贴布绣停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_FRAME_FINISH, tr("Border embroidery stop")));// 边框刺绣完成
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_LINE_TBREAK, tr("Broken line stop")));// 断线停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_AUTO_SOFTLIMIT, tr("Automatic soft limit finish")));// 自动定软限位完成
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_SPINDLERATIO, tr("The gear ratio of plain emb spindle is normal")));// 平绣主轴齿轮比正常

    //等于绣花机并为带毛巾
    int towel = g_pSettings->readFromInHMIiFile("HMI/towel").toInt();//是否有毛巾功能
    if( (towel ==1)||
        ( g_emProductType == PRODUCT_CHEN))
    {
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_CUT_NOT_ZERO, tr("Chenille scissors not returned")));// 毛巾剪刀未回位
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_READ_HCPS_PARA, tr("Error reading palette parameters")));// 读取换色板参数错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_TOWEL_NOT_ZERO, tr("The Chenille spindle is not at zero")));//毛巾主轴不在零位
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHENM_NOT_ZERO, tr("The M axis of the Chenille is not at the zero position")));//毛巾M轴不在零位
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHENR_NOT_ZERO, tr("The Chenille ring shaft is not at the zero position")));// 毛巾打环轴不在零位
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_ND_ERR, tr("Chenille needle position error")));// 毛巾针位错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_ELA_TIMEOUT, tr("Elastic wire motor movement timed out")));// 松紧线电机运动超时
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_ELA_POS, tr("The position of the elastic wire motor is wrong")));// 松紧线电机位置错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_SWND_TIMOUT, tr("Chenille color change timeout")));// 毛巾换色超时
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_CUT_TIMEOUT, tr("Chenille scissors movement timed out")));// 毛巾剪刀运动超时
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_HOIST_TIMOUT, tr("Lift motor movement timeout")));// 提升电机运动超时
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_HOIST_POS, tr("Wrong position of towel lift motor")));// 毛巾提升电机位置错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_CHEN_SPINDLERATIO, tr("Towel spindle gear ratio is normal")));// 毛巾主轴齿轮比正常
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CHEN_SPINDLE_RATIO, tr("Towel spindle gear ratio error")));// 毛巾主轴齿轮比错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CCMS_COOR_SYSTM, tr("Towel spindle coordinate system error")));// 毛巾主轴坐标系统错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_RING_COOR_SYSTM, tr("Ring axis coordinate system error")));// 打环轴坐标系统错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ROT_COOR_SYSTM, tr("Towel M-axis coordinate system error")));// 毛巾M轴坐标系统错误
    }

    int coil = g_pSettings->readFromInHMIiFile("HMI/coil").toInt();//是否有缠绕功能
    if(g_emMacType == MACHINE_EMB && coil ==1)
    {
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_COIL_NOT_ZERO, tr("Coil spindle is not at the zero position")));// 缠绕主轴不在零位
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CTMS_COOR_SYSTM, tr("Coil spindle coordinate system error")));// 缠绕主轴坐标系统错误
        m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_COIL_M_NOT_ZERO, tr("Coil M spindle is not at the zero position")));// 缠绕M轴不在零位
    }
}
