# HG changeset patch # User Jacob Alexander # Date 1444000760 25200 # Node ID 5f085e29a66cf0c682bb443b3eebc470f434ed45 # Parent a113d416950e4e579eac9f420cfa2aacdd7d0aa6 Fix Latching bug (introduced when fixing shift and lock recently) - Also conditionally refresh the lcd screen if enabled /w interconnect (Not the ideal way to update, but the only way with the current KLL version) diff -r a113d416950e -r 5f085e29a66c .gitignore --- a/.gitignore Tue Sep 29 20:21:29 2015 -0700 +++ b/.gitignore Sun Oct 04 16:19:20 2015 -0700 @@ -41,6 +41,7 @@ .Trashes ehthumbs.db Thumbs.db +*.attr # Editor generated files # ########################## diff -r a113d416950e -r 5f085e29a66c Macro/PartialMap/macro.c --- a/Macro/PartialMap/macro.c Tue Sep 29 20:21:29 2015 -0700 +++ b/Macro/PartialMap/macro.c Sun Oct 04 16:19:20 2015 -0700 @@ -422,7 +422,22 @@ nat_ptr_t **map = (nat_ptr_t**)LayerIndex[ cachedLayer ].triggerMap; const Layer *layer = &LayerIndex[ cachedLayer ]; - return map[ scanCode - layer->first ]; + // Cache trigger list before attempting to expire latch + nat_ptr_t *trigger_list = map[ scanCode - layer->first ]; + + // Check if latch has been pressed for this layer + uint8_t latch = LayerState[ cachedLayer ] & 0x02; + if ( latch && latch_expire ) + { + Macro_layerState( 0, 0, cachedLayer, 0x02 ); +#if defined(ConnectEnabled_define) && defined(LCDEnabled_define) + // Evaluate the layerStack capability if available (LCD + Interconnect) + extern void LCD_layerStack_capability( uint8_t state, uint8_t stateType, uint8_t *args ); + LCD_layerStack_capability( 0, 0, 0 ); +#endif + } + + return trigger_list; } // If no trigger macro is defined at the given layer, fallthrough to the next layer