intechstudio / grid-fw

GNU General Public License v3.0
24 stars 7 forks source link

Push Encoder behaviour issue on SAMD51 modules w/ firmware ≥ v1.2.25 #63

Closed mattcoffyn closed 10 months ago

mattcoffyn commented 1 year ago

Issue Summary

Both my EN16 & EF44 modules have developed an issue with encoder behaviour. This is affecting all encoders on both modules. Press and Release of the button causes the encoder value to increase and triggers the Rotate Right action on the encoder's event. This only occurs on firmware versions v1.2.25 and higher.

1. Encoder Value Increase Details

On both button press and button release, encoder value increases by 76 (not 127 as previously thought).

Example MIDI output on default EN16 profile below. Encoder set to CC 33 in absolute mode. Button set to MIDI note A1.

Rotate left to confirm Encoder value 11:47:55.997 Control 1 33 0

Push Button 11:48:00.809 Control 1 33 76 11:48:00.832 Note On 1 A1 127

Release Button 11:48:05.301 Control 1 33 127 11:48:05.324 Note Off 1 A1 0

Rotate left to confirm Encoder value 11:48:07.777 Control 1 33 126

Where encoder value is >0 before button press, it will increase by 76 (to max of 127) on both press and release. Tested by setting different encoder values before press, and by rotating between press and release (push and hold).

This behaviour is also consistent regardless of action stored on the encoder event (including no action). E.g. on the same default profile, removing the MIDI block from the encoder event means no CC output is captured, but behaviour is confirmed through self:encoder_value() on LED or console print.

2. Action Trigger Issue Details

As well as the encoder value change, the button triggers the Rotate Right action on the encoder event. This is independent of actions (if any) stored on either the button or encoder.

The example in the screenshots below shows the debug output of the button press and release as well as the events for both button and encoder.

Note: When the editor is open and Interaction Tracking is set to Event, the UI also swtiches to the Encoder event on button press.

Screenshot 2023-11-02 at 12 30 37 Screenshot 2023-11-02 at 12 31 55

Debugging

As above, I have recreated this with various permutations of actions on both the button and encoder event, including leaving both empty. This is recreated on all encoders on both the EN16 and EF44.

Other variables explored:

Current versions:

joshuahhn commented 11 months ago

I also got this problem at EN16 and EF44.

fun thing: some buttons doesn't have this problem.

SukuWc commented 10 months ago

Thanks for the detailed report, based on that we could patch the issue. Please update to latest firmware! Release version v1.2.28