From 393c12777cf27935b24ef60462d7a330083e0861 Mon Sep 17 00:00:00 2001 From: Serge Vakulenko Date: Fri, 2 Nov 2018 16:50:52 -0700 Subject: [PATCH] Fix bug: imcompatible image for RT3 (and MD-380). --- d868uv.c | 2 +- md380.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/d868uv.c b/d868uv.c index 47ebdbe..8156996 100644 --- a/d868uv.c +++ b/d868uv.c @@ -595,7 +595,7 @@ static void d868uv_upload(radio_device_t *radio, int cont_flag) // static int d868uv_is_compatible(radio_device_t *radio) { - return 1; + return strncmp("D868UVE", (char*)&radio_mem[0], 7) == 0; } static void print_id(FILE *out, int verbose) diff --git a/md380.c b/md380.c index c961d4d..c90a2c3 100644 --- a/md380.c +++ b/md380.c @@ -402,7 +402,8 @@ static void md380_upload(radio_device_t *radio, int cont_flag) // static int md380_is_compatible(radio_device_t *radio) { - return strncmp("D868UVE", (char*)&radio_mem[0], 7) == 0; + return strncmp("DfuSe", (char*)&radio_mem[0], 5) == 0 && + strncmp("DR780", (char*)&radio_mem[0x125], 5) == 0; } //