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

Compile error with Digispark #113

Open
2 of 6 tasks
mbenitog opened this issue Sep 26, 2021 · 1 comment
Open
2 of 6 tasks

Compile error with Digispark #113

mbenitog opened this issue Sep 26, 2021 · 1 comment

Comments

@mbenitog
Copy link

mbenitog commented Sep 26, 2021

Are you using the live version that could be found here ?

  • Yes, absolutely
  • No, I might try it out

What type of issue is it ?

  • Graphical issue (UX, UI, Graphical Glitch)
  • Feature issue (Command not/bad implemented, Non functional feature)
  • Crash (The buttons clicks does nothing at all, Error in console)
  • Question (Any type about the project :D)

I'm using a Digispark board and I encountered a type issue when compiling:

cannot convert 'const __FlashStringHelper*' to 'fstr_t*' for argument '1' to 'void printText(fstr_t*)'

It seems that the function printText() expects a wrong type of argument fstr_t

void printText(fstr_t *txt) {
  DigiKeyboard.print(txt);
  DigiKeyboard.update();
}

If fstr_t is replaced by __FlashStringHelper the code compiles and works fine. The function was introduced in this commit (line 255)

Fixed function:

void printText(__FlashStringHelper *txt) {
  DigiKeyboard.print(txt);
  DigiKeyboard.update();
}

I don't know If this is the correct solution to the problem and it would be great if it could be reviewed. Thanks in advance!

@lowlevl
Copy link
Collaborator

lowlevl commented Sep 28, 2021

Hello @mbenitog,

Thanks for your report and sorry for the delay, so the problem is that it does not compile on Digispark..
Unfortunately I don't have any Digispark board, neither do I have a development environment for this.

From what I see on the web, the __FlashStringHelper is an alias to fstr_t which in this case should work. What core are you using for you board ?

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

No branches or pull requests

2 participants