From 337c01130a70b8fc549bcc583020c4e9496b919d Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sat, 31 Jan 2026 21:15:54 -0600 Subject: [PATCH] Use HID serial number --- .../HIDLampArrayController/HIDLampArrayController.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Controllers/HIDLampArrayController/HIDLampArrayController.cpp b/Controllers/HIDLampArrayController/HIDLampArrayController.cpp index a0f644715..83ce03016 100644 --- a/Controllers/HIDLampArrayController/HIDLampArrayController.cpp +++ b/Controllers/HIDLampArrayController/HIDLampArrayController.cpp @@ -13,6 +13,7 @@ #include #include "hid_util.h" #include "HIDLampArrayController.h" +#include "StringUtils.h" HIDLampArrayController::HIDLampArrayController(hid_device *dev_handle, const char *path, std::string dev_name) { @@ -132,7 +133,15 @@ std::string HIDLampArrayController::GetDeviceName() std::string HIDLampArrayController::GetSerialString() { - return(""); + wchar_t serial_string[128]; + int ret = hid_get_serial_number_string(dev, serial_string, 128); + + if(ret != 0) + { + return(""); + } + + return(StringUtils::wstring_to_string(serial_string)); } unsigned int HIDLampArrayController::GetLampArrayKind()