00001
00002
00003
00004
00005 #if !defined(AFX_HISPIDAR8MOTORTEST_H__AE02CC6C_28C1_4ED6_A6F2_F0C231F053AC__INCLUDED_)
00006 #define AFX_HISPIDAR8MOTORTEST_H__AE02CC6C_28C1_4ED6_A6F2_F0C231F053AC__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012
00013
00014 #include "HIHapticDevice.h"
00015 #include "HISpidarMotor.h"
00016 #include "Device/DVDeviceManager.h"
00017 #include <vector>
00018
00019
00020 namespace Spr {
00021
00022
00023 class SPR_DLL HISpidar8MotorTest : public HIHapticDevice
00024 {
00025 public:
00026 HISpidar8MotorTest();
00027 virtual ~HISpidar8MotorTest();
00028
00029 public:
00030
00031 virtual bool Init(DVDeviceManager& dev);
00032
00033 virtual bool Init(DVDeviceManager& dev, Vec3f* motorPos, float vpn, float lpp, float minF, float maxF);
00034 virtual void Update(float dt);
00035
00036 virtual bool BeforeCalib(){ SetMinForce(); return true; }
00037
00038 virtual bool Calib();
00039
00040 void SetMinForce();
00041
00042
00043 void SetForce(int ch, float force);
00044 int GetCount(int ch);
00045
00046 protected:
00047
00048 HISpidarMotor motor[8];
00049
00050 float realtens[8];
00051 float tension[8];
00052
00053 };
00054
00055 }
00056
00057 #endif // !defined(AFX_HISPIDAR8MOTORTEST_H__AE02CC6C_28C1_4ED6_A6F2_F0C231F053AC__INCLUDED_)