From c4af01aa8df776eae3d8aed695a67bc2e6f90cdc Mon Sep 17 00:00:00 2001 From: HASUMI Hitoshi Date: Fri, 10 Jun 2022 18:14:10 +0900 Subject: [PATCH] fix https://github.com/picoruby/prk_firmware/issues/106 --- src/ruby/app/models/keyboard.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ruby/app/models/keyboard.rb b/src/ruby/app/models/keyboard.rb index 119ed201..ca00e7b0 100644 --- a/src/ruby/app/models/keyboard.rb +++ b/src/ruby/app/models/keyboard.rb @@ -237,6 +237,14 @@ class Keyboard RGB_SPD: 0x10d } +end + +# +# Keyboard class have to be split to avoid unexpected behavior of the compiler +# + +class Keyboard + letter = [ nil,nil,nil,nil, 'a', # 0x04 @@ -430,10 +438,7 @@ class Keyboard letter = nil end -# -# Keyboard class have to be defined twice to avoid "too big operand" error of mrbc -# It seems `b` operand of OP_LOADSYM will be more than 0xFFFF if the class is united -# +# Keyboard class have to be split to avoid unexpected behavior of the compiler class Keyboard