Skip to content

Compile error with Digispark #113

@mbenitog

Description

@mbenitog

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions