Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Arduino converter build error #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reppad
Copy link

@reppad reppad commented Jun 15, 2022

Fix a small typo in keyboard::type function to avoid following build error.

KeyboardMessage:45:93: error: redefinition of 'uint8_t key4'
     void type(uint8_t key0, uint8_t key1, uint8_t key2, uint8_t key3, uint8_t key4, uint8_t key4, uint8_t modifiers) {
                                                                                             ^~~~
C:\Users\reppad\AppData\Local\Temp\arduino_modified_sketch_524957\KeyboardMessage.ino:45:79: note: 'uint8_t key4' previously declared here
     void type(uint8_t key0, uint8_t key1, uint8_t key2, uint8_t key3, uint8_t key4, uint8_t key4, uint8_t modifiers) {
                                                                               ^~~~
C:\Users\reppad\AppData\Local\Temp\arduino_modified_sketch_524957\KeyboardMessage.ino: In function 'void keyboard::type(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
KeyboardMessage:51:31: error: 'key5' was not declared in this scope
         prev_report.keys[5] = key5;
                               ^~~~
C:\Users\reppad\AppData\Local\Temp\arduino_modified_sketch_524957\KeyboardMessage.ino:51:31: note: suggested alternative: 'key0'
         prev_report.keys[5] = key5;
                               ^~~~
                               key0
C:\Users\reppad\AppData\Local\Temp\arduino_modified_sketch_524957\KeyboardMessage.ino: In function 'void duckyString(const uint8_t*, size_t)':
KeyboardMessage:64:99: error: too many arguments to function 'void keyboard::type(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)'
         keyboard::type(pgm_read_byte_near(keys + i+1), 0, 0, 0, 0, 0, pgm_read_byte_near(keys + i));
                                                                                                   ^
C:\Users\reppad\AppData\Local\Temp\arduino_modified_sketch_524957\KeyboardMessage.ino:45:10: note: declared here
     void type(uint8_t key0, uint8_t key1, uint8_t key2, uint8_t key3, uint8_t key4, uint8_t key4, uint8_t modifiers) {
          ^~~~

"redefinition of 'uint8_t key4'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant