2016-07-22 182 views
-3

阿尔杜伊诺:1.6.9(视窗10),板: “Arduino的米加ADK”为什么我得到这个错误?

在文件中包含从C:\ Users \用户Disheet \下载\ humanoid_1 \ humanoid_1.ino:1:0:

C:\ Users \ Disheet \ Documents \ Arduino \ libraries \ ax12v2/ax12.h:66:23:错误:冲突声明'typedef unsigned char boolean'

typedef unsigned char boolean;

    ^

在文件中包含从草图\ humanoid_1.ino.cpp:1:0:

C:\程序文件(x86)\的Arduino \硬件\ Arduino的\ AVR \芯\阿尔杜伊诺/ Arduino的。 h:117:14:错误:'布尔型'的前面的声明为'typedef bool boolean'

typedef bool boolean;

 ^

C:\ Users \用户Disheet \下载\ humanoid_1 \ humanoid_1.ino:在函数 'void设置()':

humanoid_1:5:错误: 'SETPOSITION' 未在此范围内声明

SETPOSITION(1,0); //// ID,posiotin 0-1023

  ^

C:\ Users \用户Disheet \下载\ humanoid_1 \ humanoid_1.ino:在函数“void环() ':

humanoid_1:13:error:'SetPosition'未在此范围内声明

SetPosition(1,512);

   ^

多库被发现的 “ax12.h” 使用:C:\用户\ Disheet \文档\ Arduino的\库\ ax12v2 未使用:C:\用户\ Disheet \文档\ Arduino的\库\ Bioloid 退出状态1 “SETPOSITION”没有在此范围

声明此报告将有“编译过程中显示详细输出”与 更多信息在文件中启用 选项 - >首选项。

+0

在StackOverFlow中,您应该解释您的问题并使用标题解释您的问题,请修改标题。 –

回答

1

您需要在库中找到typedef unsigned char boolean;并将其更改为与Arduino.h中的版本相匹配。

boolean已经是Arduino.h中的typedef,它是bool而不是unsigned char

在AX12库搜索此: https://github.com/7Robot/Arduino/blob/master/AX12/libraries/ax12/ax12.h#L66

,并更改为typedef bool boolean;

这是前一段时间更新的,因此您的IDE版本比AX12库更新。

+0

如果要更新该库,则可以尝试用#include 替换两个typedefs。但是这可能会导致更多问题;) – datafiddler

相关问题