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(); emit longPressed();
} }
void GpioButton::onInterruptOccured(bool value) void GpioButton::onInterruptOccurred(bool value)
{ {
if (value) { if (value) {
// Pressed // Pressed
@ -206,7 +206,7 @@ bool GpioButton::enable()
m_monitor = nullptr; m_monitor = nullptr;
return false; 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 // Setup timer, if this timer reaches timeout, a long pressed happend
m_timer = new QTimer(this); m_timer = new QTimer(this);

View File

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

View File

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

View File

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

View File

@ -170,7 +170,7 @@ int main(int argc, char *argv[])
}); });
// Inform about interrupt // 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"); qDebug() << "GPIO" << gpioNumber << "interrupt occured. Current value:" << (value ? "1" : "0");
}); });