change encoder to normal 1/2 Slower

new v4.3b pcb encoder is so fast ,change one time jump 2 icon,so change code to change encoder 1 icon
/home/jumbo/portapack-mayhem/firmware/application/hw/encoder.cpp

include "portapack_persistent_memory.hpp"

using namespace portapack;
static const int8_t transition_map_slow[] = {

 0,    // 0000: noop
 0,    // 0001: start
 0,    // 0010: start
 0,    // 0011: rate
 1,    // 0100: end
 0,    // 0101: noop
 0,    // 0110: rate
-1,    // 0111: end

};

if (persistent_memory::config_login()) {
return transition_map_slow[state & 0xf];

} else{

return transition_map[state & 0xf];

}


ui_setting.cpp
&checkbox_login,

checkbox_login.set_value(persistent_memory::config_login());

persistent_memory::set_config_login(checkbox_login.value());

ui_setting.hpp

Checkbox checkbox_login {
    { 3 * 8, 12 * 16 },
    20,
    "Encoders Pulses Slower"
};

标签:h2+, portapack

已有 2 条评论

  1. Drakex Drakex

    Hi, could you please put the changed files for download. Thank you

  2. Drakex Drakex

    And compiled fw if you have too. Thank you.

添加新评论