完善 working5 gmoccapy HAL 输入对标

This commit is contained in:
2026-06-26 22:07:41 -04:00
parent 0d79b3545b
commit 917cec15ad
20 changed files with 2853 additions and 27 deletions

View File

@@ -20,6 +20,16 @@ export const gmoccapyCommunicationModel = {
path: ["gmoccapy.* pins", "HAL shared memory", "halui/iocontrol/motmod/spindle_sim"],
notes: "postgui HAL connects gmoccapy pins after halcomp.ready().",
},
hardwareButtons: {
label: "HAL hardware buttons",
path: ["external HAL bit", "gmoccapy.h-button/v-button pin", "_button_pin_changed", "visible sensitive GTK button", "linuxcnc.command()"],
notes: "gmoccapy maps rising-edge hard-button pins to the current visible software button; insensitive or hidden targets are ignored.",
},
halPins: {
label: "HAL input pins",
path: ["external HAL value", "gmoccapy.* input pin", "hal_glib.GPin value_changed", "gmoccapy callback", "linuxcnc.command() or GTK widget state"],
notes: "jog pins, jog increment pins, ignore-limits, optional-stop/blockdelete, override counts/direct-value, reset and message pins enter gmoccapy through HAL callbacks.",
},
remap: {
label: "Interpreter REMAP",
path: ["milltask", "RS274NGC", "Python remap prolog/ngc/epilog"],
@@ -148,6 +158,34 @@ export const gmoccapyCommunicationModel = {
nativeStatus: "iocontrol.0.coolant-flood/mist",
gate: "blocked in estop/off",
},
{
actionId: "hardware-button",
webAction: "explicit data-gmoccapy-hal-pin button mapping",
nativeCommand: "_button_pin_changed -> GtkButton emit clicked/pressed/toggled",
nativeStatus: "same status as the target software button",
gate: "rising-edge pin ignored when target button is hidden or insensitive",
},
{
actionId: "hal-pin-input",
webAction: "GMOCAPY_HAL_PIN",
nativeCommand: "_ignore_limits/_optional_blocks/_blockdelete/_on_counts_changed/_on_analog_value_changed/_reset_override/_del_message_changed",
nativeStatus: "ignore-limits, block delete, optional stop, feed/rapid/spindle/jog override widget state and operator message state",
gate: "counts require count-enable, direct-value requires analog-enable, reset/delete-message pins are rising-edge only",
},
{
actionId: "hal-jog-pin",
webAction: "GMOCAPY_HAL_PIN jog.axis/jog-inc",
nativeCommand: "_on_pin_jog_changed/_on_pin_incr_changed",
nativeStatus: "manual jog command, active jog increment and gmoccapy.jog.jog-increment HAL OUT",
gate: "axis pins use press/release level, task must be on and manual; increment pins are rising-edge only",
},
{
actionId: "hal-warning-confirm",
webAction: "GMOCAPY_HAL_PIN warning-confirm",
nativeCommand: "dialogs.warning_dialog confirm_pin polling",
nativeStatus: "active warning dialog response",
gate: "level-polled while warning dialog is active",
},
],
};
@@ -163,6 +201,8 @@ export function createGmoccapyCommunicationSummary(model = gmoccapyCommunication
model.startupStages.findIndex((stage) => stage.id === "gmoccapy"),
hasNativeNmlCommandPath: model.nativePaths.command.path.includes("NML emcCommand"),
hasNativeHalPath: model.nativePaths.hal.path.includes("HAL shared memory"),
hasNativeHardwareButtonPath: model.nativePaths.hardwareButtons.path.includes("_button_pin_changed"),
hasNativeHalPinInputPath: model.nativePaths.halPins.path.includes("hal_glib.GPin value_changed"),
hasWebStorePath: model.webPath.path.includes("store.dispatch"),
semanticBoundary: model.semanticBoundary,
};