在 VK2635官方文檔中,各個(gè)指令雖然已經(jīng)換成16進(jìn)制,但是在使用時(shí)總是不方便。
我在使用中,將代碼歸納整理,修改成了單片機(jī)能直接使用的16進(jìn)制格式。
下面是部分代碼截圖。
編輯的代碼
- uint8_t ModCmd0[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x44,0x54,0x4d,0x2a,0x33,0x42,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x0a,0x00,0x04,0x23}; //--> 關(guān)閉GPDTM語句0
- uint8_t ModCmd1[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x42,0x53,0x2a,0x33,0x30,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x09,0x00,0x03,0x21}; //--> 關(guān)閉GPGBS語句1
- uint8_t ModCmd2[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x47,0x41,0x2a,0x32,0x37,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x00,0x00,0xfa,0x0f}; //--> 關(guān)閉GPGGA語句2
- uint8_t ModCmd3[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x4c,0x4c,0x2a,0x32,0x31,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x01,0x00,0xfb,0x11}; //--> 關(guān)閉GPGLL語句3
- uint8_t ModCmd4[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x41,0x2a,0x33,0x33,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x02,0x00,0xfc,0x13}; //--> 關(guān)閉GPGSA語句4
- uint8_t ModCmd5[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x54,0x2a,0x32,0x36,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x07,0x00,0x01,0x1d}; //--> 關(guān)閉GPGST語句5
- uint8_t ModCmd6[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x56,0x2a,0x32,0x34,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x03,0x00,0xfd,0x15}; //--> 關(guān)閉GPGSV語句6
- uint8_t ModCmd7[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x52,0x4d,0x43,0x2a,0x33,0x41,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x04,0x00,0xfe,0x17}; //--> 關(guān)閉GPRMC語句70x
- uint8_t ModCmd8[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x56,0x54,0x47,0x2a,0x32,0x33,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x05,0x00,0xff,0x19};//--> 關(guān)閉GPVTG語句8
- uint8_t ModCmd9[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x5a,0x44,0x41,0x2a,0x33,0x39,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x08,0x00,0x02,0x1f}; //--> 關(guān)閉GPZDA語句9
- uint8_t ModCmd10[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x44,0x54,0x4d,0x2a,0x33,0x42,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x0a,0x01,0x05,0x24}; //--> 打開GPDTM語句10
- uint8_t ModCmd11[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x42,0x53,0x2a,0x33,0x30,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x09,0x01,0x04,0x22}; //--> 打開GPGBS語句11
- uint8_t ModCmd12[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x47,0x41,0x2a,0x32,0x37,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x00,0x01,0xfb,0x10}; //--> 打開GPGGA語句12
- uint8_t ModCmd13[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x4c,0x4c,0x2a,0x32,0x31,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x01,0x01,0xfc,0x12}; //--> 打開GPGLL語句13
- uint8_t ModCmd14[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x52,0x53,0x2a,0x32,0x30,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x06,0x01,0x01,0x1c}; //--> 打開GPGRS語句14
- uint8_t ModCmd15[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x41,0x2a,0x33,0x33,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x02,0x01,0xfd,0x14}; //--> 打開GPGSA語句15
- uint8_t ModCmd16[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x54,0x2a,0x32,0x36,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x07,0x01,0x02,0x1e}; //--> 打開GPGST語句16
- uint8_t ModCmd17[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x47,0x53,0x56,0x2a,0x32,0x34,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x03,0x01,0xfe,0x16}; //--> 打開GPGSV語句17
- uint8_t ModCmd18[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x52,0x4d,0x43,0x2a,0x33,0x41,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x04,0x01,0xff,0x18}; //--> 打開GPRMC語句18
- uint8_t ModCmd19[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x56,0x54,0x47,0x2a,0x32,0x33,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x05,0x01,0x00,0x1a}; //--> 打開GPVTG語句19
- uint8_t ModCmd20[]=
- {0x24,0x45,0x49,0x47,0x50,0x51,0x2c,0x5a,0x44,0x41,0x2a,0x33,0x39,0x0d,0x0a,0xb5,0x62,0x06,0x01,0x03,0x00,0xf0,0x08,0x01,0x03,0x20}; //--> 打開GPZDA語句200
- uint8_t BootSetCmd0[]=
- {0xb5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xd0,0x08,0x00,0x00,0xc0,0x12,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xd3,0xfc,0xb5,0x62,0x06,0x00,0x01,0x00,0x01,0x08,0x22}; //設(shè)置4800波特率0
- uint8_t BootSetCmd1[]=
- {0xb5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xd0,0x08,0x00,0x00,0x80,0x25,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xa6,0xcd,0xb5,0x62,0x06,0x00,0x01,0x00,0x01,0x08,0x22}; //設(shè)置9600波特率1
- uint8_t BootSetCmd2[]=
- {0xb5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xd0,0x08,0x00,0x00,0x00,0x96,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x97,0xa8}; //設(shè)置38400波特率2
- uint8_t BootSetCmd3[]=
- {0xb5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xd0,0x08,0x00,0x00,0x00,0xc2,0x01,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xc4,0x96,0xb5,0x62,0x06,0x00,0x01,0x00,0x01,0x08,0x22}; //設(shè)置115200波特率3
-
- uint8_t HZ_SetCmd0[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39}; //1Hz模式(1秒輸出1次數(shù)據(jù))0
- uint8_t HZ_SetCmd1[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //5Hz模式(1秒輸出5次數(shù)據(jù))1
- uint8_t HZ_SetCmd2[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //10Hz模式(1秒輸出10次數(shù)據(jù))2
- uint8_t HZ_SetCmd3[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0xB8,0x0B,0x01,0x00,0x01,0x00,0xD9,0x41,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //0.33Hz模式(3秒輸出1次數(shù)據(jù))3
- uint8_t HZ_SetCmd4[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0x88,0x13,0x01,0x00,0x01,0x00,0xB1,0x49,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //0.2Hz模式(5秒輸出1次數(shù)據(jù))4
- uint8_t HZ_SetCmd5[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0x10,0x27,0x01,0x00,0x01,0x00,0x4D,0xDD,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //0.1Hz模式(10秒輸出1次數(shù)據(jù)) 5
- uint8_t HZ_SetCmd6[]=
- {0xB5,0x62,0x06,0x08,0x06,0x00,0x20,0x4E,0x01,0x00,0x01,0x00,0x84,0x00,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30}; //0.05Hz模式(20秒輸出1次數(shù)據(jù)) 6
- uint8_t StartModCmd0[]=
- {0xB5,0x62,0x06,0x04,0x04,0x00,0xFF,0x87,0x01,0x00,0x95,0xF7}; //復(fù)位 0
- uint8_t StartModCmd1[]=
- {0xB5,0x62,0x06,0x04,0x04,0x00,0xFF,0xFF,0x02,0x00,0x0E,0x61}; //冷啟勱 1
- uint8_t StartModCmd2[]=
- {0xB5,0x62,0x06,0x04,0x04,0x00,0x00,0x00,0x02,0x00,0x10,0x68}; //熱啟勱2
- uint8_t StartModCmd3[]=
- {0xB5,0x62,0x06,0x09,0x0D,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x07,0x1F,0x9E}; //恢復(fù)出廠配置 3
- uint8_t StartModCmd4[]=
- {0xB5,0x62,0x06,0x04,0x04,0x00,0x00,0x00,0x08,0x00,0x16,0x74}; //進(jìn)入低功耗模式(低功耗模式狀態(tài)下丌輸出數(shù)據(jù),但保持定位。如需恢復(fù)正常模式,請輸入熱啟勱命令)4
- uint8_t StartModCmd5[]=
- {0xB5,0x62,0x06,0x09,0x0D,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x31,0xBF}; //保存設(shè)置5
復(fù)制代碼
所有資料51hei提供下載:
GPS_CMD.zip
(1.35 KB, 下載次數(shù): 12)
2018-8-5 16:59 上傳
點(diǎn)擊文件名下載附件
修改的代碼
|