Skip to content

Commit

Permalink
Another tweak for ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed May 4, 2016
1 parent ab4231c commit edf9ffd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RCSwitch.cpp
Expand Up @@ -120,7 +120,11 @@ void RCSwitch::setProtocol(int nProtocol) {
if (nProtocol < 1 || nProtocol > numProto) {
nProtocol = 1; // TODO: trigger an error, e.g. "bad protocol" ???
}
#ifdef ESP8266
this->protocol = proto[nProtocol-1];
#else
memcpy_P(&this->protocol, &proto[nProtocol-1], sizeof(Protocol));
#endif
}

/**
Expand Down

0 comments on commit edf9ffd

Please sign in to comment.