Fix typo in signal

This commit is contained in:
Michael Zanetti 2021-11-01 14:17:39 +01:00
parent d589b09d4e
commit 211e54a71d
5 changed files with 7 additions and 7 deletions

View File

@ -164,7 +164,7 @@ void GpioButton::onTimeout()
emit longPressed();
}
void GpioButton::onInterruptOccured(bool value)
void GpioButton::onInterruptOccurred(bool value)
{
if (value) {
// Pressed
@ -206,7 +206,7 @@ bool GpioButton::enable()
m_monitor = nullptr;
return false;
}
connect(m_monitor, &GpioMonitor::interruptOccured, this, &GpioButton::onInterruptOccured);
connect(m_monitor, &GpioMonitor::interruptOccurred, this, &GpioButton::onInterruptOccurred);
// Setup timer, if this timer reaches timeout, a long pressed happend
m_timer = new QTimer(this);

View File

@ -77,7 +77,7 @@ signals:
private slots:
void onTimeout();
void onInterruptOccured(bool value);
void onInterruptOccurred(bool value);
public slots:
bool enable();

View File

@ -147,10 +147,10 @@ void GpioMonitor::setValue(Gpio::Value value)
switch (m_value) {
case Gpio::ValueLow:
emit interruptOccured(false);
emit interruptOccurred(false);
break;
case Gpio::ValueHigh:
emit interruptOccured(true);
emit interruptOccurred(true);
break;
default:
break;

View File

@ -76,7 +76,7 @@ protected:
void run() override;
signals:
void interruptOccured(bool value);
void interruptOccurred(bool value);
void enabledChanged(bool enabled);
private slots:

View File

@ -170,7 +170,7 @@ int main(int argc, char *argv[])
});
// Inform about interrupt
QObject::connect(monitor, &GpioMonitor::interruptOccured, [gpioNumber](bool value) {
QObject::connect(monitor, &GpioMonitor::interruptOccurred, [gpioNumber](bool value) {
qDebug() << "GPIO" << gpioNumber << "interrupt occured. Current value:" << (value ? "1" : "0");
});