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 Errors #1

Open
ephirial opened this issue Jul 14, 2024 · 0 comments
Open

Compile Errors #1

ephirial opened this issue Jul 14, 2024 · 0 comments

Comments

@ephirial
Copy link

Hello,

the library does not compile:

.pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp: In member function 'void X9C103S::setResistance(int)': .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:28:3: error: expected ',' or ';' before 'if' if (diff > 0) { ^~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:26:13: warning: unused variable 'diff' [-Wunused-variable] int diff = _value - _resistance ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:30:5: error: expected '}' before 'else' } else { ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:31:4: error: 'diff' was not declared in this scope diff *= -1 ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:31:4: note: suggested alternative: 'div' diff *= -1 ^~~~ div .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:35:29: error: 'diff' was not declared in this scope for (int i = 0; i < diff; i++) { ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:35:29: note: suggested alternative: 'div' for (int i = 0; i < diff; i++) { ^~~~ div .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp: At global scope: .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:44:1: error: expected declaration before '}' token } ^ *** [.pio/build/nanoatmega328/lib322/X9C103S/X9C103S.cpp.o] Error 1

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

1 participant