Browse Source

Adding backend support for more RAM optimizations.

simple
Jacob Alexander 9 years ago
parent
commit
1454611c7b
2 changed files with 22 additions and 2 deletions
  1. 10
    2
      backends/kiibohd.py
  2. 12
    0
      templates/kiibohdKeymap.h

+ 10
- 2
backends/kiibohd.py View File

@@ -129,7 +129,7 @@ class Backend:


## Result Macro List ##
self.fill_dict['ResultMacroList'] = "ResultMacro ResultMacroList[] = {\n"
self.fill_dict['ResultMacroList'] = "const ResultMacro ResultMacroList[] = {\n"

# Iterate through each of the result macros
for result in range( 0, len( macros.resultsIndexSorted ) ):
@@ -137,6 +137,10 @@ class Backend:
self.fill_dict['ResultMacroList'] += "};"


## Result Macro Record ##
self.fill_dict['ResultMacroRecord'] = "ResultMacroRecord ResultMacroRecordList[ ResultMacroNum ];"


## Trigger Macros ##
self.fill_dict['TriggerMacros'] = ""

@@ -164,7 +168,7 @@ class Backend:


## Trigger Macro List ##
self.fill_dict['TriggerMacroList'] = "TriggerMacro TriggerMacroList[] = {\n"
self.fill_dict['TriggerMacroList'] = "const TriggerMacro TriggerMacroList[] = {\n"

# Iterate through each of the trigger macros
for trigger in range( 0, len( macros.triggersIndexSorted ) ):
@@ -173,6 +177,10 @@ class Backend:
self.fill_dict['TriggerMacroList'] += "};"


## Trigger Macro Record ##
self.fill_dict['TriggerMacroRecord'] = "TriggerMacroRecord TriggerMacroRecordList[ TriggerMacroNum ];"


## Max Scan Code ##
self.fill_dict['MaxScanCode'] = "#define MaxScanCode 0x{0:X}".format( macros.overallMaxScanCode )


+ 12
- 0
templates/kiibohdKeymap.h View File

@@ -45,6 +45,12 @@
<|ResultMacroList|>


// -- Trigger Macro Record

// Keeps a record/state of each result macro
<|ResultMacroRecord|>


// -- Trigger Macros

// Trigger Macro Guides
@@ -57,6 +63,12 @@
<|TriggerMacroList|>


// -- Trigger Macro Record List

// Keeps a record/state of each trigger macro
<|TriggerMacroRecord|>



// ----- Trigger Maps -----