picoruby / prk_firmware

A keyboard firmware platform in PicoRuby
MIT License
573 stars 53 forks source link

Take out Joystick report #152

Closed yswallow closed 2 years ago

yswallow commented 2 years ago

Fix #148

I checked this version works with iPhone 8.

prk_firmware-0.9.18-20221121-a09fbed.uf2.zip

hasumikin commented 2 years ago

@yswallow Thank you for the PR. Unfortunately, it seems shift keys (KC_LSFT and KC_RSFT) cause unintentional inputs. This video capture shows the phenomenon. I literally pushed and released only a shift key on the video. I confirmed this issue with two different keyboards (GPK60-46W and SouthernCross). I'll continue to investigate though, let me inform you of this issue.

https://user-images.githubusercontent.com/8454208/203321830-49dcdfbe-e4e6-4cfe-aed6-2e54d656a96f.mp4

yswallow commented 2 years ago

hmm.... It's not happen on Windows10 and Linux on prk_firmware-0.9.18-20221121-a09fbed.uf2.zip above.

And I can't build the newest because rake setup does only showing steep -h. ( rake fails with Command failed with status (2): [ls src/ruby/test/tmp/hal/ > /dev/null 2>&1...]. )

Can you provide that UF2?

hasumikin commented 2 years ago

@yswallow つ https://drive.google.com/file/d/1G3qIyEDF3RKdoQm9bau5Yf_vM81ydGIq/view?usp=share_link

Let me fix Rakefile...

yswallow commented 2 years ago

OK, it reproduced. It may need some key-types. So my comment above is wrong.

I think this is happened by pointer failure: memories pointed by uint8_t *keyboard_keycodes was overwritten.

https://github.com/picoruby/prk_firmware/blob/527f8dc75fb33fc4f7c5958c6c60e0a35f1980ce/src/usb_descriptors.c#L246

I'll fix it.

yswallow commented 2 years ago

Can you build & test this?

https://github.com/yswallow/prk_firmware/tree/fix-152

hasumikin commented 2 years ago

Will try it tonight, thanks!

hasumikin commented 2 years ago

@yswallow It is working for me! I'm now asking guys to confirm here https://github.com/picoruby/prk_firmware/issues/148#issuecomment-1324668459

BTW, I fixed Rakefile and pushed master branch. Try rake when you have time

yswallow commented 2 years ago

I did.

rake failed with "cc.host_command not found".

https://github.com/picoruby/mruby-pico-compiler/blob/master/mrbgem.rake#L204

So I removed cc.host_command || on the file, then the rake worked.

hasumikin commented 2 years ago

@yswallow Sorry for that inconvenience again and again. I did fix it. Should work this time. You may need to rake deep_clean once

yswallow commented 2 years ago

It works! Thank you!