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

SonOff pow R2 - Unable to compile 1.13.4 #1579

Closed
AlbertWeterings opened this issue Feb 25, 2019 · 6 comments
Closed

SonOff pow R2 - Unable to compile 1.13.4 #1579

AlbertWeterings opened this issue Feb 25, 2019 · 6 comments
Milestone

Comments

@AlbertWeterings
Copy link
Contributor

When compiling for SonOff POW R2 I get this error:
`sensor:106: error: 'T' has not been declared

void _sensorWebSocketMagnitudes(JsonObject& root, T prefix) {

                                               ^

exit status 1
'T' has not been declared`

@AlbertWeterings AlbertWeterings changed the title SonOff pow R2 - Unable to compile SonOff pow R2 - Unable to compile 1.13.4 Feb 25, 2019
@xoseperez
Copy link
Owner

It compiles fine for me, both on PlatformIO and Arduino IDE 1.8.6 under Linux.
Notice T is a templated variable defined just one line before... maybe your IDE/OS is not getting that, try removing the line break:

template<typename T> void _sensorWebSocketMagnitudes(JsonObject& root, T prefix) {

@AlbertWeterings
Copy link
Contributor Author

removing the line break is fixing the issue in Windows Arduino IDE.

@xoseperez xoseperez added this to the 1.13.5 milestone Feb 26, 2019
@mcspr
Copy link
Collaborator

mcspr commented Feb 26, 2019

@AlbertWeterings do you have git with autocrlf=true? may be related to #1205
check ~/.gitconfig, if it has this:

[core]
    autocrlf = true

.gitattributes to the rescue, *.ino text eol=lf && *.h text eol=lf should override autocrlf settings for users. but i need to check how it will behave with *.gz.h beforehand

@AlbertWeterings
Copy link
Contributor Author

I don't use git, i just download the repository as zip and open it Arduino IDE on Windows.

@mcspr
Copy link
Collaborator

mcspr commented Feb 26, 2019

That's strange. I can build it using Arduino IDE 1.8.8, from Windows Store.
I tried downloading espurna-dev.zip but it does not convert line endings for Windows crfl, so not that either. Hm.

@AlbertWeterings
Copy link
Contributor Author

I'm at Arduino IDE 1.8.5, for Windows there might be the difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants