#ifndef CMOTOR_GUGAO_H
#define CMOTOR_GUGAO_H
#include "cmotor.h"
#include "gts.h"
#include "export_motor_driver_impl.h"
#define GuGaoFUN(f) do    \
{                \
    int irtn=(f);    \
    if(irtn)   \
    {MQT_THROW_STR(QObject::trUtf8("GuGao  Function %1 exe err,Err Id:%2")\
    .arg(#f).arg(irtn));}    \
    }while(0);
class MOTOR_DRIVER_IMPL_EXPORT CMotor_GUGAO : public CMotor
{
public:
    CMotor_GUGAO(const QString& name, int32_t id);

    void SerialToAxisID(int &iCore,int &iAxisNum);

    double PlusToMM(double dPlus);

    double MMToPlus(double dMM);

    double Spd_PlusMSToMMS(double dPlusMS);

    double Spd_MMSToPlusMS(double dMMS);

    double AccSpd_PlusMS2ToMMS2(double dPlusMS2);

    double AccSpd_MMS2ToPlusMS2(double dMMS2);

    int32_t init_channel();
    int32_t exit_channel();

    double m_dSpdCur;
    double m_dSpdAccCur;
    double m_dSpdDecCur;
};

#endif // CMOTOR_GUGAO_H
