2016-07-22 216 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