The Reset button: reset an alarm

An axis might run into a problem and an error occurs. When this happens, the axis stops and an alarm is triggered, and we need to reset the alarm so we can keep using the axis.

The button's name is btnReset, which has the signal clicked connected to the slot actionReset, in which ResetAxis is used. An axis is disabled after it is reset.

QObject::connect(ui->btnReset, &QPushButton::clicked, ks, &ksWorker::actionReset);

The following code is in ksworker.cpp:

void ksWorker::actionReset()
{
   ResetAxis(currentIndex);
   powerStatus[currentIndex] = FALSE;
}