Guard browser OPFS ordinary session path constants
This commit is contained in:
@@ -9133,8 +9133,12 @@
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
const browserInterpTextPaths = await saveMachineTextFiles("browser-interp", {
|
||||
ini: "[EMC]\nMACHINE = browser-interp\n",
|
||||
const browserInterpMachineId = "browser-interp";
|
||||
const browserInterpIniWasmPath = "/work/browser-machine.ini";
|
||||
const browserInterpParameterWasmPath = "/work/browser-linuxcnc.var";
|
||||
const browserInterpToolTableWasmPath = "/work/browser-tool.tbl";
|
||||
const browserInterpTextPaths = await saveMachineTextFiles(browserInterpMachineId, {
|
||||
ini: `[EMC]\nMACHINE = ${browserInterpMachineId}\n`,
|
||||
toolTable: "T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser finish tool\n",
|
||||
parameters: [
|
||||
"5161 10.5",
|
||||
@@ -9149,26 +9153,26 @@
|
||||
assertMachineTextStorePaths(
|
||||
"opfs_save_machine_text_files_staging",
|
||||
browserInterpTextPaths,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
);
|
||||
const loadedSession = await loadMachineSessionFromOpfs(
|
||||
interp,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
{
|
||||
iniWasmPath: "/work/browser-machine.ini",
|
||||
parameterWasmPath: "/work/browser-linuxcnc.var",
|
||||
toolTableWasmPath: "/work/browser-tool.tbl",
|
||||
iniWasmPath: browserInterpIniWasmPath,
|
||||
parameterWasmPath: browserInterpParameterWasmPath,
|
||||
toolTableWasmPath: browserInterpToolTableWasmPath,
|
||||
},
|
||||
);
|
||||
assertOpfsSessionStaging(
|
||||
"opfs_load_session_staging",
|
||||
loadedSession,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
{
|
||||
wasm: {
|
||||
ini: "/work/browser-machine.ini",
|
||||
parameters: "/work/browser-linuxcnc.var",
|
||||
toolTable: "/work/browser-tool.tbl",
|
||||
ini: browserInterpIniWasmPath,
|
||||
parameters: browserInterpParameterWasmPath,
|
||||
toolTable: browserInterpToolTableWasmPath,
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -9201,7 +9205,7 @@
|
||||
);
|
||||
const savedParameters = await saveMachineParametersToOpfs(
|
||||
interp,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
{
|
||||
5161: 12.34,
|
||||
5162: 56.78,
|
||||
@@ -9209,14 +9213,14 @@
|
||||
5221: 9.87,
|
||||
5399: 66.6,
|
||||
},
|
||||
{ wasmPath: "/work/browser-linuxcnc.var" },
|
||||
{ wasmPath: browserInterpParameterWasmPath },
|
||||
);
|
||||
assertOpfsSavedParameterStaging(
|
||||
"opfs_save_parameters_staging",
|
||||
savedParameters,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
"linuxcnc.var",
|
||||
"/work/browser-linuxcnc.var",
|
||||
browserInterpParameterWasmPath,
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"opfs_save_parameters",
|
||||
@@ -9229,7 +9233,7 @@
|
||||
"parameter_5399=66.6",
|
||||
].join("\n"),
|
||||
);
|
||||
const machineFiles = await loadMachineTextFiles("browser-interp");
|
||||
const machineFiles = await loadMachineTextFiles(browserInterpMachineId);
|
||||
verifyExpectedOutput(
|
||||
"opfs_saved_parameter_text",
|
||||
machineFiles.parameters,
|
||||
@@ -9254,15 +9258,15 @@
|
||||
);
|
||||
const savedToolTable = await saveMachineToolTableToOpfs(
|
||||
interp,
|
||||
"browser-interp",
|
||||
{ wasmPath: "/work/browser-tool.tbl" },
|
||||
browserInterpMachineId,
|
||||
{ wasmPath: browserInterpToolTableWasmPath },
|
||||
);
|
||||
assertOpfsSavedToolTableStaging(
|
||||
"opfs_save_tool_table_staging",
|
||||
savedToolTable,
|
||||
"browser-interp",
|
||||
browserInterpMachineId,
|
||||
"tool.tbl",
|
||||
"/work/browser-tool.tbl",
|
||||
browserInterpToolTableWasmPath,
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"opfs_save_tool_table",
|
||||
@@ -9273,7 +9277,7 @@
|
||||
"tool_1.pocketno=7",
|
||||
].join("\n"),
|
||||
);
|
||||
const savedMachineFiles = await loadMachineTextFiles("browser-interp");
|
||||
const savedMachineFiles = await loadMachineTextFiles(browserInterpMachineId);
|
||||
verifyExpectedOutput(
|
||||
"opfs_saved_tool_table_text",
|
||||
savedMachineFiles.toolTable,
|
||||
|
||||
Reference in New Issue
Block a user