// Key Trigger List Buffer and Layer Cache
// The layer cache is set on press only, hold and release events refer to the value set on press
TriggerGuide macroTriggerListBuffer[ MaxScanCode ];
-uint8_t macroTriggerListBufferSize = 0;
+var_uint_t macroTriggerListBufferSize = 0;
var_uint_t macroTriggerListLayerCache[ MaxScanCode ];
// Pending Trigger Macro Index List
// Add trigger to the Interconnect Cache
// During each processing loop, a scancode may be re-added depending on it's state
- for ( uint8_t c = 0; c < macroInterconnectCacheSize; c++ )
+ for ( var_uint_t c = 0; c < macroInterconnectCacheSize; c++ )
{
// Check if the same ScanCode
if ( macroInterconnectCache[ c ].scanCode == trigger->scanCode )
uint8_t scanCode = ((TriggerGuide*)&triggerMacro->guide[ pos - TriggerGuideSize ])->scanCode;
// Lookup scanCode in buffer list for the current state and stateType
- for ( uint8_t keyIndex = 0; keyIndex < macroTriggerListBufferSize; keyIndex++ )
+ for ( var_uint_t keyIndex = 0; keyIndex < macroTriggerListBufferSize; keyIndex++ )
{
if ( macroTriggerListBuffer[ keyIndex ].scanCode == scanCode )
{
TriggerMacroVote vote = TriggerMacroVote_Invalid;
// Iterate through the key buffer, comparing to each key in the combo
- for ( uint8_t key = 0; key < macroTriggerListBufferSize; key++ )
+ for ( var_uint_t key = 0; key < macroTriggerListBufferSize; key++ )
{
// Lookup key information
TriggerGuide *keyInfo = ¯oTriggerListBuffer[ key ];
inline void Macro_updateTriggerMacroPendingList()
{
// Iterate over the macroTriggerListBuffer to add any new Trigger Macros to the pending list
- for ( uint8_t key = 0; key < macroTriggerListBufferSize; key++ )
+ for ( var_uint_t key = 0; key < macroTriggerListBufferSize; key++ )
{
// TODO LED States
// TODO Analog Switches
printHex( argSet[2] );
print( "..." NL );
+ // Make sure this isn't the reload capability
+ // If it is, and the remote reflash define is not set, ignore
+ if ( flashModeEnabled_define == 0 ) for ( uint32_t cap = 0; cap < CapabilitiesNum; cap++ )
+ {
+ if ( CapabilitiesList[ cap ].func == (const void*)Output_flashMode_capability )
+ {
+ print( NL );
+ warn_print("flashModeEnabled not set, cancelling firmware reload...");
+ info_msg("Set flashModeEnabled to 1 in your kll configuration.");
+ return;
+ }
+ }
+
void (*capability)(uint8_t, uint8_t, uint8_t*) = (void(*)(uint8_t, uint8_t, uint8_t*))(CapabilitiesList[ cap ].func);
capability( argSet[0], argSet[1], &argSet[2] );
}
info_msg("Pending Key Events: ");
printInt16( (uint16_t)macroTriggerListBufferSize );
print(" : ");
- for ( uint8_t key = 0; key < macroTriggerListBufferSize; key++ )
+ for ( var_uint_t key = 0; key < macroTriggerListBufferSize; key++ )
{
printHex( macroTriggerListBuffer[ key ].scanCode );
print(" ");