Skip to content

Instantly share code, notes, and snippets.

@synox
Created January 29, 2014 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save synox/922d0dd59d1ddd78a182 to your computer and use it in GitHub Desktop.
Save synox/922d0dd59d1ddd78a182 to your computer and use it in GitHub Desktop.
Error: the_user_app.cpp:5:1: error: 'Status' does not name a type the_user_app.cpp: In function 'void setup()': the_user_app.cpp:17:12: warning: unused variable 's' [-Wunused-variable] make: *** [the_user_app.o] Error 1
enum Status {
off=1, missed=2, run=3, leave_now=4, walk=5
};
Status getStatus(int diffSeconds) {
if (diffSeconds < 60) {
return off;
} else {
return walk;
}
}
void setup() {
Status s = getStatus(70);
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment