unsigned char a = digitalRead(_LCDML_CONTROL_encoder_pin_a);
unsigned char b = digitalRead(_LCDML_CONTROL_encoder_pin_b);
unsigned char t = digitalRead(_LCDML_CONTROL_encoder_pin_button);
It is more robust to used volatile in front of unsigned char for variables which are changing by hardware.
Compiler may do optimizations leading to really strange program behaviour. This happened in my case when using your code in an own application.
in LCDML_041_u8g2lib line 229fff:
unsigned char a = digitalRead(_LCDML_CONTROL_encoder_pin_a); unsigned char b = digitalRead(_LCDML_CONTROL_encoder_pin_b); unsigned char t = digitalRead(_LCDML_CONTROL_encoder_pin_button);
It is more robust to used volatile in front of unsigned char for variables which are changing by hardware.
Compiler may do optimizations leading to really strange program behaviour. This happened in my case when using your code in an own application.
I did not check the rest of your software.