注册会员
- 积分
- 118
- 威望
- 175
- 贡献
- 33
- 兑换币
- 0
- 注册时间
- 2010-6-30
- 在线时间
- 3 小时
|
#include "stdafx.h"
#include "Judgement.H"
unsigned short PWM;
extern "C" _declspec(dllexport)
void Judge( unsigned short Speed,
unsigned char* SensorData, unsigned short SensorCount,
unsigned char* CCDData, int CCDWidth, int CCDHeight,
unsigned short* MotorPWM, unsigned short* SteerPWM)/Speed:电机当前转速; SensorData:光电传感器输出值,0表示在黑线上
//SensorCount:数组长度; MotorPWM:电机控制; PWMSteerPWM:舵机控制PWM
{//put your code here:
PWM += 1;
*MotorPWM = PWM;
*SteerPWM = 6550;
}
extern "C" _declspec(dllexport)
void Reset()
{
PWM = 6554;
}
整了两天,关于每个传感器对应的变量也调不出来,请教高手帮忙。 |
|