Skip to content

Using sw_flip_events on a flipper config doesn't allow you to override pulse time. #1924

@kaydeeH

Description

@kaydeeH

Given the example config below:

coils:
    c_flipper_a_hold :
        number: 1616_2-11
        default_pulse_ms: 40
        default_hold_power: 0.7
        tags: coils
     c_flipper_a :
        number: 1616_2-12
        default_pulse_ms: 21
        tags: coils

flippers:
    flipper_a:
        main_coil: c_flipper_a
        hold_coil: c_flipper_a_hold
        activation_switch: s_flipper_a_button
        enable_events: e_active_event
        disable_events: e_inactive_event
        sw_flip_events: e_special_condition_flip
        sw_release_events: e_special_condition_deflip

When the e_special_condition_flip event is received, the flipper only pulses the main coil for the coil's configured default_pulse_ms time, which may not be enough "juice" to get the flipper to actuate enough for the hold coil to grab it, resulting in a non-flip (though the flipper buzzes like it's trying until the e_special_condition_deflip event is received). It would be ideal if you could configure an override pulse time for sw_flip_events. Perhaps like the following:

flippers:
    flipper_a:
        main_coil: c_flipper_a
        hold_coil: c_flipper_a_hold
        activation_switch: s_flipper_a_button
        enable_events: e_active_event
        disable_events: e_inactive_even
        sw_flip_events: e_special_condition_flip
            main_coil_pulse_time_ms: 500
            main_coil_pulse_power: .7
        sw_release_events: e_special_condition_deflip

It may also be worthwhile to be able to specify hold settings along with main coil settings, but this doesn't seem to be the core of the issue as the hold coil's default settings are likely not an issue in this use case.

I tried getting around this with coil_player and that worked great on the virtualized hardware, but it has limits on pulse time on actual Fast hardware (see #1923) so that didn't work.

The only way I could get this to work was to use enable_events and disable_events on the main and hold coil configs directly combined with allow_enable=true, which force pulses the coil at full power until the disable event is received. It's not an ideal workaround, but it gets the job done.

But, without being able to specify a main coil pulse time override for the sw_flip_events config on a flipper, I'm not sure there's a lot of practical use for that feature.... unless I'm missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions