mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-11-03 23:02:34 +01:00 
			
		
		
		
	Additional DD backlight config (#19124)
* Additional dd backlight config * Update docs
This commit is contained in:
		
							parent
							
								
									b494bc4459
								
							
						
					
					
						commit
						af6aa225eb
					
				@ -14,8 +14,10 @@
 | 
				
			|||||||
    "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
 | 
					    "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
 | 
				
			||||||
    "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
 | 
					    "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
 | 
				
			||||||
    "BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
 | 
					    "BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
 | 
				
			||||||
 | 
					    "BACKLIGHT_LIMIT_VAL": {"info_key": "backlight.max_brightness", "value_type": "int"},
 | 
				
			||||||
    "BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
 | 
					    "BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
 | 
				
			||||||
    "BACKLIGHT_PIN": {"info_key": "backlight.pin"},
 | 
					    "BACKLIGHT_PIN": {"info_key": "backlight.pin"},
 | 
				
			||||||
 | 
					    "BACKLIGHT_PINS": {"info_key": "backlight.pins", "value_type": "array"},
 | 
				
			||||||
    "BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
 | 
					    "BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
 | 
				
			||||||
    "CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
 | 
					    "CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
 | 
				
			||||||
    "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
 | 
					    "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
 | 
				
			||||||
 | 
				
			|||||||
@ -115,7 +115,9 @@
 | 
				
			|||||||
                    "minimum": 1,
 | 
					                    "minimum": 1,
 | 
				
			||||||
                    "maximum": 31
 | 
					                    "maximum": 31
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
 | 
					                "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
 | 
				
			||||||
                "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
 | 
					                "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
 | 
				
			||||||
 | 
					                "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
 | 
				
			||||||
                "on_state": {"$ref": "qmk.definitions.v1#/bit"}
 | 
					                "on_state": {"$ref": "qmk.definitions.v1#/bit"}
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
				
			|||||||
@ -132,8 +132,15 @@ Enable by setting
 | 
				
			|||||||
    * The length of one backlight “breath” in seconds
 | 
					    * The length of one backlight “breath” in seconds
 | 
				
			||||||
* `levels`
 | 
					* `levels`
 | 
				
			||||||
    * The number of brightness levels (maximum 31, excluding off)
 | 
					    * The number of brightness levels (maximum 31, excluding off)
 | 
				
			||||||
 | 
					* `max_brightness`
 | 
				
			||||||
 | 
					    * The maximum duty cycle of the backlight LED(s) (0-255)
 | 
				
			||||||
* `pin`
 | 
					* `pin`
 | 
				
			||||||
    * The pin that controls the backlight LED(s)
 | 
					    * The pin that controls the backlight LED(s)
 | 
				
			||||||
 | 
					* `pins`
 | 
				
			||||||
 | 
					    * Array of pins that controls the backlight LED(s) (See [Multiple Backlight Pins](feature_backlight.md#multiple-backlight-pins))
 | 
				
			||||||
 | 
					* `on_state`
 | 
				
			||||||
 | 
					    * The state of the indicator pins when the LED is "on" - `1` for high, `0` for low
 | 
				
			||||||
 | 
					    * Default: `1`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example:
 | 
					Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -451,7 +451,7 @@ def _config_to_json(key_type, config_value):
 | 
				
			|||||||
        if array_type == 'int':
 | 
					        if array_type == 'int':
 | 
				
			||||||
            return list(map(int, config_value.split(',')))
 | 
					            return list(map(int, config_value.split(',')))
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            return config_value.split(',')
 | 
					            return list(map(str.strip, config_value.split(',')))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif key_type == 'bool':
 | 
					    elif key_type == 'bool':
 | 
				
			||||||
        return config_value in true_values
 | 
					        return config_value in true_values
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user