rusEFI has a fuel cut rev limiter. Would a fuel only cut mostly suffice for NLS? From the logic stand point, I think
@ comments match the likely desired options.
Option 1 Minimal --> If clutch then change max rev threshold
Option 2 better --> If clutch and TPS > threshold then change max rev threshold
Option 3 even better --> If clutch, TPS > threshold and RPM's > threshold, then change max rev threshold
I might add that the clutch switch should be de-bounced, AKA when the clutch signal is initially noticed, wait something like 5mS to 10mS, then check again. If the clutch is still activated, then you have a real clutch event. At this point, change the clutch bit which signals the controlling software.
I might also add that the clutch signal should trigger a timed event, such that when the clutch bit
changes to the activate state, it should only allow changing the rev limiter for up to like 5 seconds. Then if you either time out, or if the clutch is de-activated, the rev limiter is changed back to the normal state. By triggering a timer on the change in state instead of just using the switch state, it prevent a broken switch from buggering your day at the track.
The 3rd option can easily be turned into the 1st option if you set your threshold is set for anything greater than 0% TPS and your RPM limit to anything above 0RPM. So if someone does not desire those features, they can disable them. However I agree it is likely that those thresholds would be desired. If the logic for NLS is going to be developed, it would likely be beneficial to develop with all three options.
About hard vs soft rev limiter, that's probably worth it's own thread. Once the soft rev limit exists, the threshold could be adjusted via this NLS logic. For now that's a separate problem, and significantly difficult to implement. It would be much easier to implement this NLS logic.