Skip to content

Commit

Permalink
Upgrade PicoRuby
Browse files Browse the repository at this point in the history
- Stop comparing keymap.rb's timestamp as it didn't work well
  • Loading branch information
hasumikin committed Jun 16, 2023
1 parent 13b0725 commit d8caf45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions mrblib/usb_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,9 @@

Keyboard.mount_volume

keymap_updated_at = -1

while true
USB.tud_task
if Keyboard.autoreload_ready?
if File.exist?("/keymap.rb")
unixtime = File::Stat.new("/keymap.rb").mtime.to_i
if unixtime != keymap_updated_at
Keyboard.restart
keymap_updated_at = unixtime
else
Keyboard.autoreload_off
end
end
if Keyboard.autoreload_ready? && File.exist?("/keymap.rb")
Keyboard.restart
end
end

0 comments on commit d8caf45

Please sign in to comment.