forked from mirrors/qmk_userspace
		
	[Docs] Fix JOYSTICK_AXIS_COUNT name in docs (#19605)
		
	This commit is contained in:
		
					parent
					
						
							
								4f83b673bd
							
						
					
				
			
			
				commit
				
					
						917d93e968
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -40,7 +40,7 @@ When defining axes for your joystick, you must provide a definition array typica
 | 
				
			||||||
For instance, the below example configures two axes. The X axis is read from the `A4` pin. With the default axis resolution of 8 bits, the range of values between 900 and 575 are scaled to -127 through 0, and values 575 to 285 are scaled to 0 through 127. The Y axis is configured as a virtual axis, and its value is not read from any pin. Instead, the user must update the axis value programmatically.
 | 
					For instance, the below example configures two axes. The X axis is read from the `A4` pin. With the default axis resolution of 8 bits, the range of values between 900 and 575 are scaled to -127 through 0, and values 575 to 285 are scaled to 0 through 127. The Y axis is configured as a virtual axis, and its value is not read from any pin. Instead, the user must update the axis value programmatically.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```c
 | 
					```c
 | 
				
			||||||
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
 | 
					joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
 | 
				
			||||||
    JOYSTICK_AXIS_IN(A4, 900, 575, 285),
 | 
					    JOYSTICK_AXIS_IN(A4, 900, 575, 285),
 | 
				
			||||||
    JOYSTICK_AXIS_VIRTUAL
 | 
					    JOYSTICK_AXIS_VIRTUAL
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -64,7 +64,7 @@ The `low` and `high` values can be swapped to effectively invert the axis.
 | 
				
			||||||
The following example adjusts two virtual axes (X and Y) based on keypad presses, with `KC_P0` as a precision modifier:
 | 
					The following example adjusts two virtual axes (X and Y) based on keypad presses, with `KC_P0` as a precision modifier:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```c
 | 
					```c
 | 
				
			||||||
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
 | 
					joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
 | 
				
			||||||
    JOYSTICK_AXIS_VIRTUAL, // x
 | 
					    JOYSTICK_AXIS_VIRTUAL, // x
 | 
				
			||||||
    JOYSTICK_AXIS_VIRTUAL  // y
 | 
					    JOYSTICK_AXIS_VIRTUAL  // y
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue