Skip to content

Add Initial DMR-6x2Pro support #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions anytone_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ static int anytone_ht_is_compatible(radio_device_t *radio)
return 1;
if (memcmp("D878UV2", (char*)&radio_mem[0], 7) == 0)
return 1;
if (memcmp("D6X2UV2", (char*)&radio_mem[0], 7) == 0)
return 1;
if (memcmp("D878UV", (char*)&radio_mem[0], 6) == 0)
return 1;
if (memcmp("D6X2UV", (char*)&radio_mem[0], 6) == 0)
Expand Down Expand Up @@ -866,8 +868,8 @@ static void print_tx_offset(FILE *out, unsigned tx_offset_bcd, unsigned mode)
//
static int get_scanlist_index(radio_device_t *radio, channel_t *ch)
{
if (radio == &radio_dmr6x2) {
// Radio DMR-6x2 has eight scan lists per channel.
if (radio == &radio_dmr6x2 || radio == &radio_dmr6x2pro) {
// Radio DMR-6x2 / Pro has eight scan lists per channel.
return ch->aprs_channel;
} else {
return ch->scan_list_index;
Expand Down Expand Up @@ -1584,8 +1586,8 @@ static void setup_channel(radio_device_t *radio, int i, int mode, char *name,
ch->group_list_index = grouplist - 1;
ch->custom_ctcss = 251.1 * 10;

if (radio == &radio_dmr6x2) {
// Radio DMR-6x2 has eight scan lists per channel.
if (radio == &radio_dmr6x2 || radio == &radio_dmr6x2pro) {
// Radio DMR-6x2 / Pro has eight scan lists per channel.
ch->scan_list_index = 0; // Channel Measure Mode = Off
ch->aprs_channel = scanlist - 1; // Scan list 1
memset(ch->_unused55, 0xff, 7); // Scan lists 2-8 = Disable
Expand Down Expand Up @@ -3059,3 +3061,23 @@ radio_device_t radio_dmr6x2 = {
anytone_ht_update_timestamp,
anytone_ht_write_csv,
};

//
// BTECH DMR-6x2Pro
//
radio_device_t radio_dmr6x2pro = {
"BTECH DMR-6x2Pro",
anytone_ht_download,
anytone_ht_upload,
anytone_ht_is_compatible,
anytone_ht_read_image,
anytone_ht_save_image,
anytone_ht_print_version,
anytone_ht_print_config,
anytone_ht_verify_config,
anytone_ht_parse_parameter,
anytone_ht_parse_header,
anytone_ht_parse_row,
anytone_ht_update_timestamp,
anytone_ht_write_csv,
};
3 changes: 3 additions & 0 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static struct {
{ "D878UV2", &radio_d878uv2 }, // Anytone AT-D878UV2
{ "D878UV", &radio_d878uv }, // Anytone AT-D878UV
{ "D6X2UV", &radio_dmr6x2 }, // BTECH DMR-6x2
{ "D6X2UV2", &radio_dmr6x2pro }, // BTECH DMR-6x2Pro
{ "ZD3688", &radio_d900 }, // Zastone D900
{ "TP660", &radio_dp880 }, // Zastone DP880
{ "ZN><:", &radio_rt27d }, // Radtel RT-27D
Expand Down Expand Up @@ -216,6 +217,8 @@ void radio_read_image(const char *filename)
device = &radio_d868uv;
} else if (memcmp(ident, "D878UV2", 7) == 0) {
device = &radio_d878uv2;
} else if (memcmp(ident, "D6X2UV2", 7) == 0) {
device = &radio_dmr6x2pro;
} else if (memcmp(ident, "D878UV", 6) == 0) {
device = &radio_d878uv;
} else if (memcmp(ident, "D6X2UV", 6) == 0) {
Expand Down
1 change: 1 addition & 0 deletions radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ extern radio_device_t radio_d868uv; // Anytone AT-D868UV
extern radio_device_t radio_d878uv; // Anytone AT-D878UV
extern radio_device_t radio_d878uv2; // Anytone AT-D878UV2
extern radio_device_t radio_dmr6x2; // BTECH DMR-6x2
extern radio_device_t radio_dmr6x2pro; // BTECH DMR-6x2Pro
extern radio_device_t radio_rt84; // Baofeng DM-1701, Retevis RT84

//
Expand Down