Mercurial > louis > kiibohd-controller
diff Scan/STLcd/lcd_scan.c @ 377:dbbdedccc275
Adding layer rotation (next/prev) capability
- Requires kll update
- Including udev id update
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Mon, 28 Sep 2015 19:58:39 -0700 |
parents | 8a6c2d410ad9 |
children | fc2c2a1e9615 |
line wrap: on
line diff
--- a/Scan/STLcd/lcd_scan.c Sun Sep 20 18:47:10 2015 -0700 +++ b/Scan/STLcd/lcd_scan.c Mon Sep 28 19:58:39 2015 -0700 @@ -345,6 +345,7 @@ // ----- Capabilities ----- uint16_t LCD_layerStack_prevSize = 0; +uint16_t LCD_layerStack_prevTop = 0; void LCD_layerStack_capability( uint8_t state, uint8_t stateType, uint8_t *args ) { // Display capability name @@ -358,12 +359,14 @@ extern uint16_t macroLayerIndexStack[]; extern uint16_t macroLayerIndexStackSize; - // Only process if the stack size has changed - if ( macroLayerIndexStackSize == LCD_layerStack_prevSize ) + // Ignore if the stack size hasn't changed and the top of the stack is the same + if ( macroLayerIndexStackSize == LCD_layerStack_prevSize + && macroLayerIndexStack[macroLayerIndexStackSize - 1] == LCD_layerStack_prevTop ) { return; } LCD_layerStack_prevSize = macroLayerIndexStackSize; + LCD_layerStack_prevTop = macroLayerIndexStack[macroLayerIndexStackSize - 1]; // Number data for LCD const uint8_t numbers[10][128] = {