fix Windows locale: force decimal dot in JSON state message

Format() used the system locale decimal separator, so on Russian/Eastern
European Windows smeter_dbm and float fields got commas ("−87,5"), producing
invalid JSON that JS silently dropped — breaking S-meter and frequency display.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 16:43:34 +03:00
co-authored by Claude Sonnet 4.6
parent 2ab90e8855
commit 7a0b778114
+5 -1
View File
@@ -1168,7 +1168,11 @@ function TWebServer.BuildStateJson: string;
const
MODE_N: array[0..7] of string =
('LSB','USB','DSB','CWL','CWU','FM','AM','SAM');
var
FS: TFormatSettings;
begin
FS := DefaultFormatSettings;
FS.DecimalSeparator := '.';
FStateLock.Enter;
try
Result := Format(
@@ -1204,7 +1208,7 @@ begin
FAttnIdx,
BoolToStr(FTuning, 'true', 'false'),
BoolToStr(FDuplex, 'true', 'false')
]);
], FS);
finally
FStateLock.Leave;
end;