void RKCommandHistory::setHistory (const QStringList& _history, bool append) { RK_TRACE (MISC); if (append) history.append (_history); else history = _history; trim (); goToEnd (); }
void RKCommandHistory::append (const QString& new_line) { RK_TRACE (MISC); if (allow_empty || (!new_line.isEmpty ())) { if (allow_dupes || (new_line != history.value (history.size () - 1))) { history.append (new_line); trim (); } } goToEnd (); }
DispenserControl::DispenserControl ( const PinName homePin, const PinName endPin, const PinName motorStepPin, const PinName motorDirPin ) : homeSwitchPin ( homePin ), endSwitchPin ( endPin ), dispenserStepPin ( motorStepPin ), dispenserDirPin ( motorDirPin ) { inMotion = false; atEnd = false; atHome = false; maximumNumberOfSteps = 0; dispenserCurrentPosition = 0; listener = NULL; goToHome (); goToEnd (); moveDispenserHead ( ( maximumNumberOfSteps / 2 ), HOME ); }