src/busylight.cpp
// Switches status based on a name of a status struct
Switches status based on a name of a status struct
Switches status based on a name of a status struct
bool switchStatus(String name) {
  Serial.println("Switching to " + name);
  for(int j=0; j<STATUSES_COUNT; j++) {
    if (String(statuses[j].name) == name) {
      switchStatus(statuses[j]);
      return true;
    }
  }
  return false;
}
bool switchStatus ( String name ) { Serial . println ( " " + name ) ; for ( int j = 0 ; j < STATUSES_COUNT ; j ++ ) { if ( String ( statuses [ j ] . name ) == name ) { switchStatus ( statuses [ j ] ) ; return true ; } } return false ; }
Switches status based on a name of a status struct
Switches status based on a name of a status struct