From 95d31614496d0e574c6d165d0d65a5de5c029983 Mon Sep 17 00:00:00 2001 From: Jim Gifford Date: Mon, 10 Dec 2018 12:59:34 -0500 Subject: [PATCH] Improved support for Anytone AT-D878UV --- d868uv.c | 22 ++++++++++++++++++++++ radio.c | 4 +++- radio.h | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/d868uv.c b/d868uv.c index cc04147..320630c 100644 --- a/d868uv.c +++ b/d868uv.c @@ -684,6 +684,8 @@ static int d868uv_is_compatible(radio_device_t *radio) { if (memcmp("D868UVE", (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) return 1; return 0; @@ -2987,6 +2989,26 @@ radio_device_t radio_d868uv = { d868uv_write_csv, }; +// +// Anytone AT-D878UV +// +radio_device_t radio_d878uv = { + "Anytone AT-D878UV", + d868uv_download, + d868uv_upload, + d868uv_is_compatible, + d868uv_read_image, + d868uv_save_image, + d868uv_print_version, + d868uv_print_config, + d868uv_verify_config, + d868uv_parse_parameter, + d868uv_parse_header, + d868uv_parse_row, + d868uv_update_timestamp, + d868uv_write_csv, +}; + // // BTECH DMR-6x2 // diff --git a/radio.c b/radio.c index 6a2be54..56a8ce8 100644 --- a/radio.c +++ b/radio.c @@ -49,7 +49,7 @@ static struct { { "DM-1701", &radio_rt84 }, // Baofeng DM-1701, Retevis RT84 { "MD-760P", &radio_gd77 }, // Radioddity GD-77, version 3.1.1 and later { "D868UVE", &radio_d868uv }, // Anytone AT-D868UV - { "D878UV", &radio_d868uv }, // Anytone AT-D878UV + { "D878UV", &radio_d878uv }, // Anytone AT-D878UV { "D6X2UV", &radio_dmr6x2 }, // BTECH DMR-6x2 { "ZD3688", &radio_d900 }, // Zastone D900 { "TP660", &radio_dp880 }, // Zastone DP880 @@ -212,6 +212,8 @@ void radio_read_image(const char *filename) fseek(img, 0, SEEK_SET); if (memcmp(ident, "D868UVE", 7) == 0) { device = &radio_d868uv; + } else if (memcmp(ident, "D878UV", 6) == 0) { + device = &radio_d868uv; } else if (memcmp(ident, "D6X2UV", 6) == 0) { device = &radio_dmr6x2; } else { diff --git a/radio.h b/radio.h index c253539..e52f653 100644 --- a/radio.h +++ b/radio.h @@ -126,6 +126,7 @@ extern radio_device_t radio_rt27d; // Radtel RT-27D extern radio_device_t radio_rd5r; // Baofeng RD-5R extern radio_device_t radio_gd77; // Radioddity GD-77, version 3.1.1 and later extern radio_device_t radio_d868uv; // Anytone AT-D868UV +extern radio_device_t radio_d878uv; // Anytone AT-D878UV extern radio_device_t radio_dmr6x2; // BTECH DMR-6x2 extern radio_device_t radio_rt84; // Baofeng DM-1701, Retevis RT84