Recognize Zastone D900, Zastone DP880 and Radtel RT-27D as separate radio types.

This commit is contained in:
Serge Vakulenko 2018-09-05 12:53:36 -07:00
parent 97a594d5e7
commit 4ea032d5ca
4 changed files with 78 additions and 10 deletions

View File

@ -2,10 +2,12 @@
DMRconfig is a utility for programming digital radios via USB programming cable. DMRconfig is a utility for programming digital radios via USB programming cable.
Supported radios: Supported radios:
* TYT MD-380 (not tested) * TYT MD-380, Retevis RT3, RT8
* TYT MD-2017 (not tested) * TYT MD-2017, Retevis RT82 (untested)
* TYT MD-UV380 * TYT MD-UV380
* Zastone D900 (untested)
* Zastone DP880 (untested)
* Radtel RT-27D (untested)
## Usage ## Usage

57
md380.c
View File

@ -2295,3 +2295,60 @@ radio_device_t radio_md380 = {
md380_parse_row, md380_parse_row,
md380_update_timestamp, md380_update_timestamp,
}; };
//
// Zastone D900
//
radio_device_t radio_d900 = {
"Zastone D900",
md380_download,
md380_upload,
md380_is_compatible,
md380_read_image,
md380_save_image,
md380_print_version,
md380_print_config,
md380_verify_config,
md380_parse_parameter,
md380_parse_header,
md380_parse_row,
md380_update_timestamp,
};
//
// Zastone DP880
//
radio_device_t radio_dp880 = {
"Zastone DP880",
md380_download,
md380_upload,
md380_is_compatible,
md380_read_image,
md380_save_image,
md380_print_version,
md380_print_config,
md380_verify_config,
md380_parse_parameter,
md380_parse_header,
md380_parse_row,
md380_update_timestamp,
};
//
// Radtel RT-27D
//
radio_device_t radio_rt27d = {
"Radtel RT-27D",
md380_download,
md380_upload,
md380_is_compatible,
md380_read_image,
md380_save_image,
md380_print_version,
md380_print_config,
md380_verify_config,
md380_parse_parameter,
md380_parse_header,
md380_parse_row,
md380_update_timestamp,
};

14
radio.c
View File

@ -69,12 +69,18 @@ void radio_connect()
const char *ident = dfu_init(0x0483, 0xdf11); const char *ident = dfu_init(0x0483, 0xdf11);
fprintf(stderr, "Connect to %s.\n", ident); fprintf(stderr, "Connect to %s.\n", ident);
if (strcasecmp(ident, "DR780") == 0 || // TYT MD-380, Retevis RT3, RT8 if (strcasecmp(ident, "DR780") == 0) { // TYT MD-380, Retevis RT3, RT8
strcasecmp(ident, "ZD3688") == 0 || // Zastone D900
strcasecmp(ident, "TP660") == 0 || // Zastone DP880
strcasecmp(ident, "ZN><:") == 0) { // Radtel RT-27D
device = &radio_md380; device = &radio_md380;
} else } else
if (strcasecmp(ident, "ZD3688") == 0) { // Zastone D900
device = &radio_d900;
} else
if (strcasecmp(ident, "TP660") == 0) { // Zastone DP880
device = &radio_dp880;
} else
if (strcasecmp(ident, "ZN><:") == 0) { // Radtel RT-27D
device = &radio_rt27d;
} else
if (strcasecmp(ident, "2017") == 0) { // TYT MD-2017, Retevis RT82 if (strcasecmp(ident, "2017") == 0) { // TYT MD-2017, Retevis RT82
device = &radio_md2017; device = &radio_md2017;
} else } else

View File

@ -101,6 +101,9 @@ struct _radio_device_t {
extern radio_device_t radio_md380; // TYT MD-380 extern radio_device_t radio_md380; // TYT MD-380
extern radio_device_t radio_md2017; // TYT MD-2017 extern radio_device_t radio_md2017; // TYT MD-2017
extern radio_device_t radio_uv380; // TYT MD-UV380 extern radio_device_t radio_uv380; // TYT MD-UV380
extern radio_device_t radio_d900; // Zastone D900
extern radio_device_t radio_dp880; // Zastone DP880
extern radio_device_t radio_rt27d; // Radtel RT-27D
// //
// Radio: memory contents. // Radio: memory contents.