INI import: strip greeting quotes; add gsheet reference
Strip a surrounding pair of double quotes from the [Plasma] Greeting on import (the gsheet "INI_V2" output writes Greeting="..."), and add the master button-layout spreadsheet that documents the RIO.ini format and the 16-bit map-word encoding. Test covers the real sheet output (modifier-stacked words, keypad VK words, RIO command words) round-tripping verbatim. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ public static class RioIniImporter
|
||||
var profile = new RioProfile
|
||||
{
|
||||
Name = name,
|
||||
PlasmaGreeting = ini.GetString("Plasma", "Greeting"),
|
||||
PlasmaGreeting = StripQuotes(ini.GetString("Plasma", "Greeting")),
|
||||
WallpaperPath = ini.GetString("Desktop", "File"),
|
||||
Calibration = new AxisCalibrationConfig
|
||||
{
|
||||
@@ -48,6 +48,16 @@ public static class RioIniImporter
|
||||
return profile;
|
||||
}
|
||||
|
||||
// The gsheet writes the greeting as a quoted string (e.g. Greeting="Hello,");
|
||||
// strip a single pair of surrounding double quotes so it displays cleanly.
|
||||
private static string? StripQuotes(string? value)
|
||||
{
|
||||
if (value is null)
|
||||
return null;
|
||||
string v = value.Trim();
|
||||
return v.Length >= 2 && v[0] == '"' && v[^1] == '"' ? v[1..^1] : v;
|
||||
}
|
||||
|
||||
// Keys look like "RIO00".."RIO6F": "RIO" + a hex address into the iRIO table.
|
||||
private static bool TryParseButtonAddress(string key, out int address)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user