From f7b769a730fc46d3694bc410cd0c91bff2913f5a Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:25:05 -0500 Subject: [PATCH] more descriptive USBD_PRODUCT_STRING when not defined in target.h (#1073) --- src/main/vcpf4/usbd_desc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/vcpf4/usbd_desc.c b/src/main/vcpf4/usbd_desc.c index 1cbcae69ff..f0aa418170 100644 --- a/src/main/vcpf4/usbd_desc.c +++ b/src/main/vcpf4/usbd_desc.c @@ -66,6 +66,18 @@ #define USBD_LANGID_STRING 0x409 #define USBD_MANUFACTURER_STRING FC_FIRMWARE_NAME +#ifndef USBD_PRODUCT_STRING +#if defined STM32F1 +#define USBD_PRODUCT_STRING "EmuFlight STM32F1" +#elif defined STM32F3 +#define USBD_PRODUCT_STRING "EmuFlight STM32F3" +#elif defined STM32F4 +#define USBD_PRODUCT_STRING "EmuFlight STM32F4" +#elif defined STM32F7 +#define USBD_PRODUCT_STRING "EmuFlight STM32F7" +#endif +#endif + #ifdef USBD_PRODUCT_STRING #define USBD_PRODUCT_HS_STRING USBD_PRODUCT_STRING #define USBD_PRODUCT_FS_STRING USBD_PRODUCT_STRING