#ifndef __GLOBAL_DATAS__ #define __GLOBAL_DATAS__ #include "arduino.h" #define TSendCycle 200 #define ATM_Data_Length 48 #define ZigBee_Read_Address 0x6100 typedef uint8_t byte; namespace CommandData { const byte FrameHead = 0x55; const byte FrameEnd = 0xBB; const byte CustomVoiceFrameHead = 0xFD; namespace Devices { const byte Barrier = 0x03; const byte LED_Display = 0x04; const byte Garage_A = 0x0D; const byte Garage_B = 0x05; const byte VoiceReport = 0x06; const byte AlarmTower = 0x07; const byte TFT_A = 0x0B; const byte TFT_B = 0x08; const byte RodeLight_1 = 0x00; const byte RodeLight_2 = 0xFF; const byte WirelessCharger = 0x0A; const byte ETC = 0x0C; const byte TrafficLight_A = 0x0E; const byte TrafficLight_B = 0x0F; const byte SpecTerrain = 0x10; const byte _3D_Display = 0x11; const byte AutoMarkSystem_1 = 0xAF; const byte AutoMarkSystem_2 = 0x06; const byte MainCar = 0x02; }; namespace MainCarCommand { const byte StartRun = 0xC1; const byte StartRunSub = 0x01; const byte RunningRoute = 0xC2; const byte RunningRouteData = 0xC3; const byte RouteDataStop = 0xFF; }; }; namespace DataTool { template void PrintDataArray(T* arr, uint8_t len) { Serial.println("------Data Array------"); for (uint8_t i = 0; i < len; i++) { Serial.print("arr["); Serial.print(i); Serial.print("] = 0x"); Serial.println(arr[i], HEX); } Serial.println("------Array End------"); } }; extern uint8_t ZigBee_back[16]; extern uint8_t qrdi_buf[8]; // 给OpenMV发送识别二维码 extern uint8_t trackdi_buf[8]; //OpenMV循迹指令 extern uint8_t servo_buf[8]; // 给OpenMV发送舵机角度 extern String dynamic_route_recv; //全局变量 extern uint8_t ATM_Data[ATM_Data_Length]; extern uint8_t ZigBee_command[8]; extern uint8_t ZigBee_judge; extern uint8_t infrare_com[6]; extern uint8_t sendflag; extern unsigned long frisrtime; extern unsigned long Tcount; extern uint8_t Data_Type; extern uint8_t Data_Flag; extern uint8_t Data_Length; extern uint8_t Data_OTABuf[40]; #endif