OK, so research and psudocode:
if (SPINDLE_OVERRIDE_SWITCH == ON) {
old_axis = mc.mcMpgGetAxis(MPG_INDEX) // Find out what axis the MPG is currently set to and store it
mc.mcMpgSetAxis(MPG_INDEX, SOME_UNUSED_AXIS) // Set the MPG to an axis we aren't using
current_override = mcSpindleGetOverride() // Get the current spindle override value
counts = mc.mcMpgGetInc(MPG_INDEX) // Read how much the handle moved NOT SURE THIS IS RIGHT
new_override = current_override + (counts * SCALING_FACTOR) // Compute the delta
mc.mcSpindleSetOverride(new_override) // Apply the override to the spindle
mc.mcMpgSetAxis(MPG_INDEX, old_axis) // Reset the MPG axis
}
I'm not sure how this gets called when the handle moves though. For sure I can call it when the override switch state changes, but how do I call it when the handle moves?
Feed override is similar, using GetFRO / SetFRO.