comparison 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
comparison
equal deleted inserted replaced
376:47f89f1bfdb7 377:dbbdedccc275
343 343
344 344
345 // ----- Capabilities ----- 345 // ----- Capabilities -----
346 346
347 uint16_t LCD_layerStack_prevSize = 0; 347 uint16_t LCD_layerStack_prevSize = 0;
348 uint16_t LCD_layerStack_prevTop = 0;
348 void LCD_layerStack_capability( uint8_t state, uint8_t stateType, uint8_t *args ) 349 void LCD_layerStack_capability( uint8_t state, uint8_t stateType, uint8_t *args )
349 { 350 {
350 // Display capability name 351 // Display capability name
351 if ( stateType == 0xFF && state == 0xFF ) 352 if ( stateType == 0xFF && state == 0xFF )
352 { 353 {
356 357
357 // Parse the layer stack, top to bottom 358 // Parse the layer stack, top to bottom
358 extern uint16_t macroLayerIndexStack[]; 359 extern uint16_t macroLayerIndexStack[];
359 extern uint16_t macroLayerIndexStackSize; 360 extern uint16_t macroLayerIndexStackSize;
360 361
361 // Only process if the stack size has changed 362 // Ignore if the stack size hasn't changed and the top of the stack is the same
362 if ( macroLayerIndexStackSize == LCD_layerStack_prevSize ) 363 if ( macroLayerIndexStackSize == LCD_layerStack_prevSize
364 && macroLayerIndexStack[macroLayerIndexStackSize - 1] == LCD_layerStack_prevTop )
363 { 365 {
364 return; 366 return;
365 } 367 }
366 LCD_layerStack_prevSize = macroLayerIndexStackSize; 368 LCD_layerStack_prevSize = macroLayerIndexStackSize;
369 LCD_layerStack_prevTop = macroLayerIndexStack[macroLayerIndexStackSize - 1];
367 370
368 // Number data for LCD 371 // Number data for LCD
369 const uint8_t numbers[10][128] = { 372 const uint8_t numbers[10][128] = {
370 { STLcdNumber0_define }, 373 { STLcdNumber0_define },
371 { STLcdNumber1_define }, 374 { STLcdNumber1_define },