mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 18:37:18 +00:00
107 lines
3.8 KiB
Plaintext
107 lines
3.8 KiB
Plaintext
Received from George Csahanin W2DB
|
|
|
|
PS-
|
|
|
|
Here are some of the code from the head project:
|
|
|
|
//Control data strings
|
|
/////byte volumestr[8] = {
|
|
///// 0x24,0x03,0x18,0x2b,0x00,0x00,0x6A,0x03};
|
|
byte squelchOff[8] = {
|
|
0x24,0x03,0x18,0x09,0x00,0x00,0x48,0x03};
|
|
byte squelchOn[8] = {
|
|
0x24,0x03,0x18,0x09,0x00,0x01,0x49,0x03};
|
|
byte volume[8] = {
|
|
0x24,0x03,0x18,0x2B,0x00,0x00,0x6A,0x03}; // volume level 0 in hex
|
|
byte reportVol[7] = {
|
|
0x24,0x01,0x18,0x2C,0x69,0x03};
|
|
byte button1[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x79,0xEF,0x01,0xDF,0x03}; // keypad button 1
|
|
byte button2[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x3B,0xEF,0x01,0xA1,0x03}; // keypad button 2
|
|
byte button3[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xE7,0x01,0xD9,0x03}; // keypad button 3
|
|
byte button4[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x5B,0xEF,0x01,0xC1,0x03}; // keypad button 4
|
|
byte button5[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xEB,0x01,0xDD,0x03}; // keypad button 5
|
|
byte button6[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0x6F,0x01,0x61,0x03}; // keypad button 6
|
|
byte button7[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xAF,0x01,0xA1,0x03}; // keypad button 7
|
|
byte button8[10] = {
|
|
0x24,0x05,0x18,0x36,0xF7,0x7B,0xEF,0x01,0xD9,0x03}; // keypad button 8
|
|
byte button9[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7A,0xEF,0x01,0xE0,0x03}; // keypad button 9
|
|
byte button0[10] = {
|
|
0x24,0x05,0x18,0x36,0x7F,0x7B,0xEF,0x01,0x61,0x03}; // keypad button 0
|
|
byte buttonAsterisk[10] = {
|
|
0x24,0x05,0x18,0x36,0xFB,0x7B,0xEF,0x01,0xDD,0x03}; // keypad button *
|
|
byte buttonPound[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x6B,0xEF,0x01,0xD1,0x03}; // keypad button #
|
|
byte buttonMENU[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xEF,0x00,0xE0,0x03}; // keypad button MENU
|
|
byte buttonPesc[10] = {
|
|
0x24,0x05,0x18,0x36,0xEF,0x7B,0xEF,0x01,0xD1,0x03}; // keypad button Pesc
|
|
byte buttonEnter[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xED,0x01,0xDF,0x03}; // keypad button
|
|
Enter
|
|
byte colorKey[10] = {
|
|
}; // keypad button for color or other use
|
|
byte moreKey[10] = {
|
|
0x24,0x05,0x18,0x36,0xFD,0x7B,0xEF,0x01,0xDF,0x03}; // more key
|
|
byte fOneKey[10] = {
|
|
0x24,0x05,0x18,0x36,0xBF,0x7B,0xEF,0x01,0xA1,0x03}; // soft key F1
|
|
byte fTwoKey[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x73,0xEF,0x01,0xD9,0x03}; // soft key F2
|
|
byte fThreeKey[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xEE,0x01,0xE0,0x03}; //soft key F3
|
|
byte fFourKey[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xCF,0x01,0xc1,0x03}; // soft key F4
|
|
byte buttonRelease[10] = {
|
|
0x24,0x05,0x18,0x36,0xFF,0x7B,0xEF,0x01,0xE1,0x03}; // button release
|
|
command
|
|
byte arrowUp[10] = {
|
|
0x24,0x05,0x18,0x36,0xFE,0x7B,0xEF,0x01,0xE0,0x03}; // up button command
|
|
byte arrowDown[10] = {
|
|
0x24,0x05,0x18,0x36,0xDF,0x7B,0xEF,0x01,0xC1,0x03}; // down button
|
|
command
|
|
byte GetData[9] = {
|
|
0x24,0x04,0x18,0x29,0x00,0x01,0x2E,0x98,0x03}; // enable special reports
|
|
//byte txACK[6] = {
|
|
// 0x24,0x01,0x10,0xF3,0x28,0x03}; // ack to radio
|
|
byte pttEngage[7] = {
|
|
0x24, 0x02, 0x81, 0x13, 0x01, 0xBB, 0x03};
|
|
byte pttRelease[7] = {
|
|
0x24, 0x02, 0x81, 0x14, 0x01, 0xBC, 0x03};
|
|
byte acknowledge[6] = {
|
|
0x24,0x01,0x10,0xF3,0x28,0x03}; // ack to radio from head
|
|
byte radioack[6] = {
|
|
0x24,0x01,0x80,0xF3,0x98,0x03}; // ack from radio to head
|
|
//byte rxACK[6] = {
|
|
// 0x24,0x01,0x80,0xF3,0x98,0x03}; // ack from radio
|
|
|
|
|
|
//---------FREQUENCY(LINE1)-----------------------------
|
|
if ((opCode == 0x2E && subopCode == 0x03) && (checkSum == true))
|
|
{
|
|
//EXAMPLE FREQUENCY PACKET 24 0F 81 2E 03 02 6E 46 20 20 38 2C 39
|
|
39 32 2E 39 38 82 03 (display 0, 1)
|
|
char freqLine[10];
|
|
for(int i=5, j=0; i<=15; i++, j++) {
|
|
freqLine[j] = rxdata[i];
|
|
freqLine[j+1] = '\0';
|
|
}
|
|
|
|
LCD.sendString(freqLine,0,1);
|
|
|
|
}
|
|
|
|
//---------------------MENU(LINE0)------------------------------
|
|
if (opCode == 0x2E && subopCode == 0x02)
|
|
{
|
|
//EXAMPLE MENU PACKET 24 09 81 2E 02 02 55 4D 45 4E 55 20 8A 03
|
|
(display 0, 0)
|
|
|
|
|