Update motorola

pull/1542/head
Mike Black W9MDB 2024-04-24 12:07:10 -05:00
rodzic d7e0b214f7
commit 25f58afb72
4 zmienionych plików z 152 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,6 @@
RSSRC = motorola.c micom.c
noinst_LTLIBRARIES = libhamlib-motorola.la
libhamlib_motorola_la_SOURCES = $(RSSRC)
EXTRA_DIST = Android.mk

Wyświetl plik

@ -0,0 +1,106 @@
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)

Wyświetl plik

@ -0,0 +1,32 @@
/*
* Hamlib Motorola backend - main file
* Copyright (c) 2024 Michael Black W9MDB
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "motorola.h"
#include <register.h>
DECLARE_INITRIG_BACKEND(motorola)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__);
rig_register(&micom_caps);
return RIG_OK;
}

Wyświetl plik

@ -0,0 +1,8 @@
#ifndef _MOTOROLA_H
#define _MOTOROLADUMMY_H 1
#include "hamlib/rig.h"
extern struct rig_caps micom_caps;
#endif // _MOTOROLA_H