📄 channel.cpp
字号:
// channel.cpp: implementation of the Cchannel class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "alfa.h"
#include "channel.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(Cchannel,CObject,1)
Cchannel::Cchannel()
{
m_channel=0;
m_rpm=3000;
m_ppr=500;
m_gear=1;
m_pitch=1;
m_highlimit=5000;
m_lowlimit=-5000;
m_highoffset=0;
m_lowoffset=0;
m_gain=64;
m_pos=0;
m_command=0;
m_mode=3;
m_index=0;
m_highspd=10;
m_lowspd=10;
m_acc=300;
m_dec=300;
m_offset=0;
m_direction=0;
m_sensor=0;
m_swap=0;
m_input=4;
}
Cchannel::~Cchannel()
{
}
void Cchannel::Serialize(CArchive &ar)
{
if(ar.IsLoading())
{
ar >> m_channel;
ar >> m_rpm;
ar >> m_ppr;
ar >> m_gear;
ar >> m_pitch;
ar >> m_highlimit;
ar >> m_lowlimit;
ar >> m_highoffset;
ar >> m_lowoffset;
ar >> m_gain;
ar >> m_pos;
ar >> m_command;
ar >> m_mode;
ar >> m_index;
ar >> m_highspd;
ar >> m_lowspd;
ar >> m_acc;
ar >> m_dec;
ar >> m_offset;
ar >> m_direction;
ar >> m_sensor;
ar >> m_swap;
ar >> m_input;
}
else
{
ar << m_channel;
ar << m_rpm;
ar << m_ppr;
ar << m_gear;
ar << m_pitch;
ar << m_highlimit;
ar << m_lowlimit;
ar << m_highoffset;
ar << m_lowoffset;
ar << m_gain;
ar << m_pos;
ar << m_command;
ar << m_mode;
ar << m_index;
ar << m_highspd;
ar << m_lowspd;
ar << m_acc;
ar << m_dec;
ar << m_offset;
ar << m_direction;
ar << m_sensor;
ar << m_swap;
ar << m_input;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -