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





## Result Macro List ## ## 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 # Iterate through each of the result macros
for result in range( 0, len( macros.resultsIndexSorted ) ): for result in range( 0, len( macros.resultsIndexSorted ) ):
self.fill_dict['ResultMacroList'] += "};" self.fill_dict['ResultMacroList'] += "};"




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


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






## Trigger Macro List ## ## 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 # Iterate through each of the trigger macros
for trigger in range( 0, len( macros.triggersIndexSorted ) ): for trigger in range( 0, len( macros.triggersIndexSorted ) ):
self.fill_dict['TriggerMacroList'] += "};" self.fill_dict['TriggerMacroList'] += "};"




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


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



+ 12
- 0
templates/kiibohdKeymap.h View File

<|ResultMacroList|> <|ResultMacroList|>




// -- Trigger Macro Record

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


// -- Trigger Macros // -- Trigger Macros


// Trigger Macro Guides // Trigger Macro Guides
<|TriggerMacroList|> <|TriggerMacroList|>




// -- Trigger Macro Record List

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




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