opp (example config files)

Machine config examples

Here are some example machine-wide config files that show real-world examples of how these configs are used.

Note that there are multiple machine config examples here. They’re just included to show different options. You wouldn’t actually use more than one.

#config_version=5

hardware:
    platform: opp

opp:
    ports: com1
    baud: 115200
    debug: True

switches:
    s_test:
        number: 0-0
    s_test_no_debounce:
        number: 0-1
        debounce: quick
    s_test_nc:
        number: 0-2
        type: 'NC'
    s_flipper:
        number: 0-3
    s_test_card2:
        number: 0-8
    s_matrix_test:
        number: 3-48
    s_matrix_test2:
        number: 3-32
    s_matrix_test3:
        number: 3-95

coils:
    c_test:
        number: 0-0
        default_pulse_ms: 23
    c_test_allow_enable:
        number: 0-1
        default_pulse_ms: 23
        platform_settings:
            recycle_factor: 3
        default_hold_power: 1.0
    c_flipper_hold:
        number: 0-2
        default_hold_power: 1.0
    c_flipper_main:
        number: 0-3
        default_pulse_ms: 10
        default_hold_power: 0.375
    c_holdpower_16:
        number: 1-12
        default_hold_power: 0.0625
    c_matrix_test:
        number: 3-0
        default_pulse_ms: 42

lights:
  test_light1:
    number: 0-16
    subtype: matrix
  test_light2:
    number: 0-17
    subtype: matrix
  test_led1:
    number: 1-0
  test_led2:
    number: 1-1

autofire_coils:
    ac_slingshot_test:
        coil: c_test
        switch: s_test

    ac_slingshot_test2:
        coil: c_test_allow_enable
        switch: s_test_no_debounce

    ac_matrix_slingshot_test:
        coil: c_matrix_test
        switch: s_matrix_test

flippers:
    f_test_single:
        debug: true
        main_coil: c_flipper_main
        activation_switch: s_flipper

    f_test_hold:
        debug: true
        main_coil: c_flipper_main
        hold_coil: c_flipper_hold
        activation_switch: s_flipper
#config_version=5

hardware:
    platform: opp

opp:
    ports: com1
    baud: 115200
    debug: True

switches:
    s_test:
        number: 0-0
    s_test_no_debounce:
        number: 0-1
        debounce: quick
    s_test_nc:
        number: 0-2
        type: 'NC'
    s_flipper:
        number: 0-3
    s_test_card2:
        number: 0-8
    s_test_neo:
        number: 1-0

coils:
    c_test:
        number: 0-0
        default_pulse_ms: 23
    c_test_allow_enable:
        number: 0-1
        default_pulse_ms: 23
        platform_settings:
            recycle_factor: 3
        default_hold_power: 1.0
    c_flipper_hold:
        number: 0-2
        default_hold_power: 1.0
    c_flipper_main:
        number: 0-3
        default_pulse_ms: 10
        default_hold_power: 0.375
    c_holdpower_16:
        number: 1-12
        default_hold_power: 0.0625

lights:
  test_light1:
    number: 0-16
    subtype: matrix
  test_light2:
    number: 0-17
    subtype: matrix
  test_led1:
    number: 1-0
  test_led2:
    previous: test_led1
    type: rgb

autofire_coils:
    ac_slingshot_test:
        coil: c_test
        switch: s_test

    ac_slingshot_test2:
        coil: c_test_allow_enable
        switch: s_test_no_debounce

    ac_delayed_kickback:
        coil: c_test
        switch: s_test
        coil_pulse_delay: 20

flippers:
    f_test_single:
        debug: true
        #main_coil_overwrite:
        #    pulse_ms: 11
        main_coil: c_flipper_main
        activation_switch: s_flipper

    f_test_hold:
        debug: true
        main_coil: c_flipper_main
        hold_coil: c_flipper_hold
        activation_switch: s_flipper
#config_version=5

hardware:
    platform: opp

opp:
    ports: com1, com2
    baud: 115200
    debug: True

switches:
    s_test:
        number: 19088743-0-0
    s_test_no_debounce:
        number: 19088743-0-1
        debounce: quick

lights:
  l0-0:
    number: 2-0-0
    subtype: matrix
  l0-1:
    number: 2-0-1
    subtype: matrix
  l0-2:
    number: 2-0-2
    subtype: matrix
  l0-3:
    number: 2-0-3
    subtype: matrix
  l0-4:
    number: 2-0-4
    subtype: matrix
  l0-5:
    number: 2-0-5
    subtype: matrix
  l0-6:
    number: 2-0-6
    subtype: matrix
  l0-7:
    number: 2-0-7
    subtype: matrix
  l1-0:
    number: 2-0-8
    subtype: matrix
  l1-1:
    number: 2-0-9
    subtype: matrix
  l1-2:
    number: 2-0-10
    subtype: matrix
  l1-3:
    number: 2-0-11
    subtype: matrix
  l1-4:
    number: 2-0-12
    subtype: matrix
  l1-5:
    number: 2-0-13
    subtype: matrix
  l1-6:
    number: 2-0-14
    subtype: matrix
  l1-7:
    number: 2-0-15
    subtype: matrix
  l3-7:
    number: 2-0-31
    subtype: matrix
  l_neo_0:
    number: 19088743-0-0
    subtype: led
    type: rgb
  l_neo_1:
    previous: l_neo_0
    type: rgb
    subtype: led