-->

获得了“部分类型的冲突”使用M2tklib和GLCD(Getting a “section type

2019-10-20 04:58发布

我需要一些帮助来解决一个Arduino程序我写一个“部分类型的冲突”。 我有产生错误的短示例代码:

#include <glcd.h>
#include "M2tk.h"
#include "utility/m2ghglcd.h"
#include "bitmaps/allBitmaps.h"   

// Definitions of Main Menu
  M2_LABEL(el_label_MainMenu,NULL,"Main Menu");
  // Construct Main Menu List
  M2_LIST(list_main_menu) = {&el_label_MainMenu};
  M2_VLIST(el_list_main_menu,NULL,list_main_menu);
  M2_ALIGN(el_main_menu, "W64H64", &el_list_main_menu);

M2tk m2(&el_main_menu, m2_es_arduino, m2_eh_4bd, m2_gh_glcd_ffs);

void setup() {
  GLCD.Init();   // initialise the library
  GLCD.DrawBitmap(ArduinoIcon64x32, 32,0); //draw the bitmap at the given x,y position
  delay(3000);
  GLCD.ClearScreen();
}
void loop() {  
  m2.checkKey(); 
  m2.draw();
}

我试图创建我的菜单驱动程序的启动画面。 我有它是与Arduino的图标图像PROGMEM定义的感觉。 它们被定义为标准GLCD库的一部分。 我真的不知道什么是错的或如何解决它。

确切的错误信息是:

C:\用户\德克\文件\ Arduino的\库\ GLCD /位图/ ArduinoIcon64x32.h:25:错误:ArduinoIcon64x32导致部分类型的冲突

它不喜欢ArduinoIcon64x32是如何定义的东西。 这是图像文件是如何定义的:

#ifndef _ArduinoIcon64x32_H 
#define _ArduinoIcon64x32_H 

#include <inttypes.h>
#include <avr/pgmspace.h>

static unsigned char ArduinoIcon64x32[] PROGMEM ={
64, // bitmap width  (arduino glcdlib format)
32, // bitmap height (arduino glcdlib format)
0x00, 0x00, 0xc0, 0x20, 0x10, 0x08, 0xc8, 0x88, 0x08, 0x08, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x40, 
0x70, 0x0c, 0x30, 0xc0, 0x00, 0xc0, 0x30, 0x0c, 0x30, 0xc0, 0x00, 0xc0, 0x30, 0x08, 0x88, 0x48, 
0x28, 0x28, 0xf8, 0x20, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x20, 0x98, 0x18, 0xc0, 0xc0, 0x00, 

0x00, 0x07, 0x18, 0x20, 0x40, 0x80, 0x9f, 0x8f, 0x87, 0x82, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 
0x00, 0x00, 0x80, 0xf0, 0xfe, 0xff, 0xff, 0x1f, 0x03, 0x1f, 0xff, 0xff, 0xfc, 0xf0, 0x80, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x63, 0x80, 0x46, 
0x4a, 0x52, 0xe3, 0x52, 0x4a, 0x46, 0x80, 0x63, 0x1c, 0x02, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 

0x00, 0xc0, 0x30, 0x08, 0x04, 0xe2, 0x22, 0x22, 0x22, 0xe2, 0x04, 0x08, 0x30, 0xc0, 0x00, 0x00, 
0xe0, 0xfc, 0xff, 0xff, 0x7f, 0x7f, 0x78, 0x78, 0x78, 0x78, 0x78, 0x7f, 0x7f, 0xff, 0xff, 0xfc, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
0x02, 0x02, 0xff, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

0x00, 0x01, 0x06, 0x08, 0x10, 0x23, 0x22, 0x22, 0x22, 0x23, 0x10, 0x08, 0x06, 0x01, 0x18, 0x3f, 
0x3f, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 
0x3f, 0x3f, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
0x0a, 0x0a, 0x2b, 0x0a, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

};
#endif  //define _ArduinoIcon64x32_H 

任何指针和帮助你可以提供或产生飞溅屏幕的另一种方法,将不胜感激。

文章来源: Getting a “section type conflict” using M2tklib and glcd