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:
Cyd
2026-06-27 22:55:36 -05:00
co-authored by Claude Opus 4.8
parent 094637b0a4
commit a4a3b58f7e
3 changed files with 44 additions and 1 deletions
+11 -1
View File
@@ -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)
{