bug fixes
This commit is contained in:
parent
d1f132d0b0
commit
72b03c0e66
1 changed files with 7 additions and 7 deletions
|
@ -44,7 +44,7 @@ ScStwRace::ScStwRace(QObject *parent) : QObject(parent)
|
|||
// --- Main Functionality ---
|
||||
// --------------------------
|
||||
|
||||
int ScStwRace::start(bool asyncronous) {
|
||||
ScStw::StatusCode ScStwRace::start(bool asyncronous) {
|
||||
if(this->state == WAITING) {
|
||||
if(this->isReadyForNextState()) {
|
||||
this->startWaitLoop->exit(LoopManualExit);
|
||||
|
@ -74,7 +74,7 @@ int ScStwRace::start(bool asyncronous) {
|
|||
return ScStw::Success;
|
||||
}
|
||||
|
||||
int ScStwRace::stop() {
|
||||
ScStw::StatusCode ScStwRace::stop() {
|
||||
if(this->state != RUNNING && this->state != STARTING) {
|
||||
return ScStw::CurrentStateNotVaildForOperationError;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ int ScStwRace::stop() {
|
|||
|
||||
double timeOfStop = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
int returnCode = ScStw::Success;
|
||||
ScStw::StatusCode returnCode = ScStw::Success;
|
||||
|
||||
foreach(ScStwTimer *speedTimer, this->timers){
|
||||
if(!speedTimer->stop(timeOfStop) && speedTimer->getState() != ScStwTimer::DISABLED){
|
||||
|
@ -138,14 +138,14 @@ void ScStwRace::handleTimerStop() {
|
|||
}
|
||||
}
|
||||
|
||||
int ScStwRace::reset() {
|
||||
ScStw::StatusCode ScStwRace::reset() {
|
||||
if(this->state != STOPPED && this->state != INCIDENT) {
|
||||
return ScStw::CurrentStateNotVaildForOperationError;
|
||||
}
|
||||
|
||||
qDebug() << "+ [INFO] resetting race";
|
||||
|
||||
int returnCode = ScStw::Success;
|
||||
ScStw::StatusCode returnCode = ScStw::Success;
|
||||
|
||||
foreach(ScStwTimer *speedTimer, this->timers){
|
||||
if(!speedTimer->reset() && speedTimer->getState() != ScStwTimer::DISABLED) {
|
||||
|
@ -159,13 +159,13 @@ int ScStwRace::reset() {
|
|||
return returnCode;
|
||||
}
|
||||
|
||||
int ScStwRace::cancel() {
|
||||
ScStw::StatusCode ScStwRace::cancel() {
|
||||
if(this->state != PREPAIRING && this->state != WAITING && this->state != STARTING && this->state != RUNNING)
|
||||
return ScStw::CurrentStateNotVaildForOperationError;
|
||||
|
||||
qDebug() << "[INFO][RACE] cancelling race";
|
||||
|
||||
int returnCode = ScStw::Success;
|
||||
ScStw::StatusCode returnCode = ScStw::Success;
|
||||
|
||||
foreach(ScStwTimer *timer, this->timers){
|
||||
if(!timer->cancel() && timer->getState() != ScStwTimer::DISABLED)
|
||||
|
|
Reference in a new issue