智能车制作

标题: 求Plastid2的控制策略文件 [打印本页]

作者: LCL_data    时间: 2008-3-27 18:59
标题: 求Plastid2的控制策略文件
我对VC6用的不怎么熟悉 ,想看一下有没有这样的模板,有的话给我看一下吧 ,先谢谢了
作者: qwi    时间: 2010-4-6 22:19
  1. // Judgement.cpp : Defines the entry point for the DLL application.
  2. //

  3. #include "stdafx.h"
  4. #include "Judgement.H"

  5. unsigned short PWM;

  6. extern "C" _declspec(dllexport)
  7. void Judge( unsigned short Speed,
  8.                         unsigned char* SensorData, unsigned short SensorCount,
  9.                         unsigned char* CCDData, int CCDWidth, int CCDHeight,
  10.                         unsigned short* MotorPWM, unsigned short* SteerPWM)
  11. {

  12.         PWM += 1;
  13.         *MotorPWM = 65535*1;
  14.         *SteerPWM = 65535*5;

  15. }

  16. extern "C" _declspec(dllexport)
  17. void Reset()
  18. {
  19.         PWM = 6554;
  20. }
复制代码

作者: qwi    时间: 2010-4-6 22:19
  1. extern "C" _declspec(dllexport)
  2. void Judge( unsigned short Speed,
  3.                         unsigned char* SensorData, unsigned short SensorCount,
  4.                         unsigned char* CCDData, int CCDWidth, int CCDHeight,
  5.                         unsigned short* MotorPWM, unsigned short* SteerPWM);
  6.                        
  7. extern "C" _declspec(dllexport)
  8. void Reset();
复制代码

作者: qwi    时间: 2010-4-6 22:20
  1. // stdafx.cpp : source file that includes just the standard includes
  2. //        Judgement.pch will be the pre-compiled header
  3. //        stdafx.obj will contain the pre-compiled type information

  4. #include "stdafx.h"

  5. // TODO: reference any additional headers you need in STDAFX.H
  6. // and not in this file
复制代码

作者: qwi    时间: 2010-4-6 22:21
  1. // stdafx.h : include file for standard system include files,
  2. //  or project specific include files that are used frequently, but
  3. //      are changed infrequently
  4. //

  5. #if !defined(AFX_STDAFX_H__1C2DB627_5869_40D5_A27E_5026FBE253DD__INCLUDED_)
  6. #define AFX_STDAFX_H__1C2DB627_5869_40D5_A27E_5026FBE253DD__INCLUDED_

  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000


  10. // Insert your headers here
  11. #define WIN32_LEAN_AND_MEAN                // Exclude rarely-used stuff from Windows headers

  12. #include <windows.h>

  13. // TODO: reference additional headers your program requires here

  14. //{{AFX_INSERT_LOCATION}}
  15. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.

  16. #endif // !defined(AFX_STDAFX_H__1C2DB627_5869_40D5_A27E_5026FBE253DD__INCLUDED_)
复制代码

作者: nandehutu586    时间: 2010-4-15 13:52
用51单片机可以仿真吗 生成dll文件要怎么弄
作者: boshanliuyu    时间: 2013-5-8 23:38
:):)




欢迎光临 智能车制作 (http://dns.znczz.com/) Powered by Discuz! X3.2