| 283 | } |
| 284 | |
| 285 | bool Everything::addExecutor(Executor *executor) |
| 286 | { |
| 287 | if(m_nExecutorCount>=Constants::MAX_EXECUTOR_COUNT) |
| 288 | { |
| 289 | if(debug) |
| 290 | { |
| 291 | Serial.print(F("Did not add executor named ")); |
| 292 | Serial.print(executor->getName()); |
| 293 | Serial.println(F("(You've exceeded maximum number of executors; edit Constants.h)")); |
| 294 | } |
| 295 | return false; |
| 296 | } |
| 297 | else |
| 298 | { |
| 299 | m_Executors[m_nExecutorCount]=executor; |
| 300 | ++m_nExecutorCount; |
| 301 | } |
| 302 | |
| 303 | if(debug) |
| 304 | { |
| 305 | Serial.print(F("Everything: adding executor named ")); |
| 306 | Serial.println(executor->getName()); |
| 307 | Serial.print(F("Everything: Free RAM = ")); |
| 308 | Serial.println(freeRam()); |
| 309 | } |
| 310 | return true; |
| 311 | } |
| 312 | |
| 313 | //friends! |
| 314 | void receiveSmartString(String message) |