From 43e1cb309d0f2b1eda39a63d679a2dd4d2f60995 Mon Sep 17 00:00:00 2001 From: Stefan Dorn Date: Sat, 6 Feb 2016 08:03:35 +0000 Subject: [PATCH] speedup --- generate_layout.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate_layout.rb b/generate_layout.rb index ac84b9f..d0b53dc 100755 --- a/generate_layout.rb +++ b/generate_layout.rb @@ -3,7 +3,7 @@ # Copyright muflax , 2015 # License: GNU GPLv3 (or later) -require "muflax" +# require "muflax" LayoutDir = "src/keyboard/ergodox/layout" LayoutFile = "#{LayoutDir}/saneo-mod.c" @@ -238,7 +238,7 @@ HEADER downs = keys_to_matrix :down ups = keys_to_matrix :up - File.save(LayoutFile) do |f| + File.open(LayoutFile, "w+") do |f| f.puts header f.puts "const uint8_t PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{keys} };" f.puts "const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{downs} };"