Rename encoder pins defines (#24003)
This commit is contained in:
parent
8471dcc563
commit
bc0c69570b
25 changed files with 100 additions and 91 deletions
|
@ -135,8 +135,8 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''):
|
|||
b_pads.append(encoder["pin_b"])
|
||||
resolutions.append(encoder.get("resolution", None))
|
||||
|
||||
config_h_lines.append(generate_define(f'ENCODERS_PAD_A{postfix}', f'{{ {", ".join(a_pads)} }}'))
|
||||
config_h_lines.append(generate_define(f'ENCODERS_PAD_B{postfix}', f'{{ {", ".join(b_pads)} }}'))
|
||||
config_h_lines.append(generate_define(f'ENCODER_A_PINS{postfix}', f'{{ {", ".join(a_pads)} }}'))
|
||||
config_h_lines.append(generate_define(f'ENCODER_B_PINS{postfix}', f'{{ {", ".join(b_pads)} }}'))
|
||||
|
||||
if None in resolutions:
|
||||
cli.log.debug(f"Unable to generate ENCODER_RESOLUTION{postfix} configuration")
|
||||
|
|
|
@ -375,8 +375,8 @@ def _extract_audio(info_data, config_c):
|
|||
def _extract_encoders_values(config_c, postfix=''):
|
||||
"""Common encoder extraction logic
|
||||
"""
|
||||
a_pad = config_c.get(f'ENCODERS_PAD_A{postfix}', '').replace(' ', '')[1:-1]
|
||||
b_pad = config_c.get(f'ENCODERS_PAD_B{postfix}', '').replace(' ', '')[1:-1]
|
||||
a_pad = config_c.get(f'ENCODER_A_PINS{postfix}', '').replace(' ', '')[1:-1]
|
||||
b_pad = config_c.get(f'ENCODER_B_PINS{postfix}', '').replace(' ', '')[1:-1]
|
||||
resolutions = config_c.get(f'ENCODER_RESOLUTIONS{postfix}', '').replace(' ', '')[1:-1]
|
||||
|
||||
default_resolution = config_c.get('ENCODER_RESOLUTION', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue