Fix bug: imcompatible image for RT3 (and MD-380).

This commit is contained in:
Serge Vakulenko 2018-11-02 16:50:52 -07:00
parent 2900deb67b
commit 393c12777c
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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;
}
//