aigamo get data
Dependents: agz_base_ver2 agz_base_ver2 get_GPS_data_ver1 aigamozu_program_ver2 ... more
agz_common.cpp
00001 #include "agz_common.h" 00002 #include "XBee.h" 00003 00004 00005 00006 /*XBee Address List 00007 * this is xbee addresses. 00008 * AGZ_ROBOT Address is Agz_XBee_Remote_Address[AGZ_FROM_ROBOT] ~ Agz_XBee_Remote_Address[AGZ_TO_ROBOT] 00009 * Base and JOY-STICK is same. 00010 */ 00011 00012 XBeeAddress64 Agz_XBee_Remote_Address[AGZ_NUM_ROBOTS] = {XBeeAddress64(0x0013A200, 0x409EAEF3)//R1 00013 ,XBeeAddress64(0x0013A200, 0x40993719)//R2 00014 ,XBeeAddress64(0x0013A200, 0x409EAEEB)//R3 00015 ,XBeeAddress64(0x0013A200, 0x409EAF0E)};//R4 00016 /* 00017 {XBeeAddress64(0x0013A200, 0x409EAF01) 00018 ,XBeeAddress64(0x0013A200, 0x409EAF01) 00019 ,XBeeAddress64(0x0013A200, 0x409EAF01) 00020 ,XBeeAddress64(0x0013A200, 0x409EAF01)}; 00021 */ 00022 00023 00024 /*---------------------------------------------- 00025 member function of "AGZ_ROBOT" 00026 ------------------------------------------------*/ 00027 //set function 00028 AGZ_ROBOT::AGZ_ROBOT(){ 00029 state = 0xFF; 00030 } 00031 00032 void AGZ_ROBOT::set_state(uint8_t s){ 00033 state = s; 00034 } 00035 00036 void AGZ_ROBOT::set_LatitudeH(uint8_t *data){ 00037 for(int i = 0;i < 3;i++) 00038 LatitudeH.value_ch[i] = data[i]; 00039 } 00040 00041 void AGZ_ROBOT::set_LatitudeL(uint8_t *data){ 00042 for(int i = 0;i < 6;i++) 00043 LatitudeL.value_ch[i] = data[i]; 00044 } 00045 00046 void AGZ_ROBOT::set_LongitudeH(uint8_t *data){ 00047 for(int i = 0;i < 3;i++) 00048 LongitudeH.value_ch[i] = data[i]; 00049 } 00050 00051 void AGZ_ROBOT::set_LongitudeL(uint8_t *data){ 00052 for(int i = 0;i < 6;i++) 00053 LongitudeL.value_ch[i] = data[i]; 00054 } 00055 00056 00057 //get function 00058 long AGZ_ROBOT::get_LatitudeH(){ 00059 return LatitudeH.value_long; 00060 } 00061 00062 long AGZ_ROBOT::get_LatitudeL(){ 00063 return LatitudeL.value_long; 00064 } 00065 00066 long AGZ_ROBOT::get_LongitudeH(){ 00067 return LongitudeH.value_long; 00068 } 00069 00070 long AGZ_ROBOT::get_LongitudeL(){ 00071 return LongitudeL.value_long; 00072 } 00073 uint8_t AGZ_ROBOT::get_state(){ 00074 return state; 00075 } 00076 00077 00078 void AGZ_ROBOT::set_LatitudeKH(uint8_t *data){ 00079 for(int i = 0;i < 3;i++) 00080 LatitudeKH.value_ch[i] = data[i]; 00081 } 00082 00083 void AGZ_ROBOT::set_LatitudeKL(uint8_t *data){ 00084 for(int i = 0;i < 6;i++) 00085 LatitudeKL.value_ch[i] = data[i]; 00086 } 00087 00088 void AGZ_ROBOT::set_LongitudeKH(uint8_t *data){ 00089 for(int i = 0;i < 3;i++) 00090 LongitudeKH.value_ch[i] = data[i]; 00091 } 00092 00093 void AGZ_ROBOT::set_LongitudeKL(uint8_t *data){ 00094 for(int i = 0;i < 6;i++) 00095 LongitudeKL.value_ch[i] = data[i]; 00096 } 00097 00098 00099 //get function 00100 long AGZ_ROBOT::get_LatitudeKH(){ 00101 return LatitudeKH.value_long; 00102 } 00103 00104 long AGZ_ROBOT::get_LatitudeKL(){ 00105 return LatitudeKL.value_long; 00106 } 00107 00108 long AGZ_ROBOT::get_LongitudeKH(){ 00109 return LongitudeKH.value_long; 00110 } 00111 00112 long AGZ_ROBOT::get_LongitudeKL(){ 00113 return LongitudeKL.value_long; 00114 }
Generated on Sun Jul 17 2022 00:32:09 by 1.7.2