diff --git a/client/public/changelog.md b/client/public/changelog.md index e8dccd7..cff6f4f 100644 --- a/client/public/changelog.md +++ b/client/public/changelog.md @@ -2,6 +2,11 @@ > This document records feature updates and bug fixes for the Luxsin X9 controller. Entries are listed in reverse chronological order — the newest release appears first. +## v2026.09.01 + +### Bug Fixes +- Fixed the incorrect firmware version display on the System page. + ## v2026.08.17 ### Changes diff --git a/client/src/lib/luxsinApi.ts b/client/src/lib/luxsinApi.ts index 7ae4ad5..6fe3429 100644 --- a/client/src/lib/luxsinApi.ts +++ b/client/src/lib/luxsinApi.ts @@ -477,7 +477,11 @@ export function parseFirmwareVersion(version: unknown): number { return Number(parts[parts.length - 1]); } -/** Display firmware version as X.Y.0.Z (e.g. 2005 → 2.0.0.5). */ +/** + * Display firmware version. + * n < 2010: X.Y.0.Z (e.g. 2005 → 2.0.0.5). + * n >= 2010: third segment carries the two-digit tail (e.g. 2010 → 2.0.10.0, 2011 → 2.0.11.0). + */ export function formatFirmwareVersionDisplay(version: unknown): string { if (version === null || version === undefined || String(version).trim() === "") { return "—"; @@ -485,6 +489,10 @@ export function formatFirmwareVersionDisplay(version: unknown): string { const n = parseFirmwareVersion(version); const major = Math.floor(n / 1000); const minor = Math.floor((n % 1000) / 100); + if (n >= 2010) { + // Since 2.0.10.0 the third segment counts up (09 → 10), fourth segment stays 0. + return `${major}.${minor}.${n % 100}.0`; + } const patch = 0; const build = n % 10; return `${major}.${minor}.${patch}.${build}`;