keil报错,用的是蓝牙控制两轮小车加减速的程序,需要显示车速到屏幕上,程序如下//ÏÔʾpid²ÎÊýµ½OLEDÉÏ
void showPID(void)
{
float temp1,temp2,temp3;
char PID_P[3],PID_I[3],PID_D[3];
temp1 = Proportion;
sprintf(PID_P,"%1.1f",temp1);
OLED_ShowString(16,4, PID_P,16);
temp2 = Integral;
sprintf(PID_I,"%1.1f",temp2);
OLED_ShowString(56,4, PID_I,16);
temp3 = Derivative;
sprintf(PID_D,"%1.1f",temp3);
OLED_ShowString(104,4, PID_D,16);
}
报错如下:
compiling pid.c...
..\HARDWARE\PID\pid.c(17): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
OLED_ShowString(16,4, PID_P,16);
..\HARDWARE\PID\pid.c(21): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
OLED_ShowString(56,4, PID_I,16);
..\HARDWARE\PID\pid.c(25): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
OLED_ShowString(104,4, PID_D,16);
..\HARDWARE\PID\pid.c: 3 warnings, 0 errors
|