Process DM-1801 images.

This commit is contained in:
Serge Vakulenko 2019-07-26 19:45:29 -07:00
parent dd79598084
commit ea3ddc2ce6
4 changed files with 25 additions and 1 deletions

20
gd77.c
View File

@ -2342,3 +2342,23 @@ radio_device_t radio_gd77 = {
gd77_update_timestamp, gd77_update_timestamp,
//TODO: gd77_write_csv, //TODO: gd77_write_csv,
}; };
//
// Baofeng DM-1801
//
radio_device_t radio_dm1801 = {
"Baofeng DM-1801",
gd77_download,
gd77_upload,
gd77_is_compatible,
gd77_read_image,
gd77_save_image,
gd77_print_version,
gd77_print_config,
gd77_verify_config,
gd77_parse_parameter,
gd77_parse_header,
gd77_parse_row,
gd77_update_timestamp,
//TODO: gd77_write_csv,
};

View File

@ -35,7 +35,7 @@
#include <stdint.h> #include <stdint.h>
#include "util.h" #include "util.h"
HANDLE dev = INVALID_HANDLE_VALUE;; // HID device HANDLE dev = INVALID_HANDLE_VALUE; // HID device
static unsigned char receive_buf[42]; // receive buffer static unsigned char receive_buf[42]; // receive buffer
// //

View File

@ -48,6 +48,7 @@ static struct {
{ "BF-5R", &radio_rd5r }, // Baofeng RD-5R, TD-5R { "BF-5R", &radio_rd5r }, // Baofeng RD-5R, TD-5R
{ "DM-1701", &radio_rt84 }, // Baofeng DM-1701, Retevis RT84 { "DM-1701", &radio_rt84 }, // Baofeng DM-1701, Retevis RT84
{ "MD-760P", &radio_gd77 }, // Radioddity GD-77, version 3.1.1 and later { "MD-760P", &radio_gd77 }, // Radioddity GD-77, version 3.1.1 and later
{ "DM-1801", &radio_dm1801 }, // Baofeng DM-1801
{ "D868UVE", &radio_d868uv }, // Anytone AT-D868UV { "D868UVE", &radio_d868uv }, // Anytone AT-D868UV
{ "D878UV", &radio_d878uv }, // Anytone AT-D878UV { "D878UV", &radio_d878uv }, // Anytone AT-D878UV
{ "D6X2UV", &radio_dmr6x2 }, // BTECH DMR-6x2 { "D6X2UV", &radio_dmr6x2 }, // BTECH DMR-6x2
@ -230,6 +231,8 @@ void radio_read_image(const char *filename)
fseek(img, 0, SEEK_SET); fseek(img, 0, SEEK_SET);
if (memcmp(ident, "BF-5R", 5) == 0) { if (memcmp(ident, "BF-5R", 5) == 0) {
device = &radio_rd5r; device = &radio_rd5r;
} else if (memcmp(ident, "1801", 4) == 0) {
device = &radio_dm1801;
} else if (memcmp(ident, "MD-760P", 7) == 0) { } else if (memcmp(ident, "MD-760P", 7) == 0) {
device = &radio_gd77; device = &radio_gd77;
} else if (memcmp(ident, "MD-760", 6) == 0) { } else if (memcmp(ident, "MD-760", 6) == 0) {

View File

@ -125,6 +125,7 @@ extern radio_device_t radio_dp880; // Zastone DP880
extern radio_device_t radio_rt27d; // Radtel RT-27D extern radio_device_t radio_rt27d; // Radtel RT-27D
extern radio_device_t radio_rd5r; // Baofeng RD-5R 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_gd77; // Radioddity GD-77, version 3.1.1 and later
extern radio_device_t radio_dm1801; // Baofeng DM-1801
extern radio_device_t radio_d868uv; // Anytone AT-D868UV extern radio_device_t radio_d868uv; // Anytone AT-D868UV
extern radio_device_t radio_d878uv; // Anytone AT-D878UV extern radio_device_t radio_d878uv; // Anytone AT-D878UV
extern radio_device_t radio_dmr6x2; // BTECH DMR-6x2 extern radio_device_t radio_dmr6x2; // BTECH DMR-6x2