From 70e83c13cc4c8e5ba0a240dc5e7edec240afc334 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Tue, 12 May 2020 13:36:07 -0500 Subject: [PATCH] Attempt to auto detect unknown Polychrome firmware versions --- .../PolychromeController/PolychromeController.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Controllers/PolychromeController/PolychromeController.cpp b/Controllers/PolychromeController/PolychromeController.cpp index 6c0c0cd4..678a04a5 100644 --- a/Controllers/PolychromeController/PolychromeController.cpp +++ b/Controllers/PolychromeController/PolychromeController.cpp @@ -60,8 +60,19 @@ PolychromeController::PolychromeController(i2c_smbus_interface* bus, polychrome_ break; default: - led_count = 0; - strcpy(device_name, ""); + unsigned short fw_version = GetFirmwareVersion(); + printf("Polychrome FW Version: %04X\r\n", fw_version); + + led_count = 1; + strcpy(device_name, "ASRock ASR LED/Polychrome Device"); + if((fw_version >> 8) < 0x03) + { + asr_led = true; + } + else + { + asr_led = false; + } break; } }