Fix typo in signal
This commit is contained in:
parent
d589b09d4e
commit
211e54a71d
@ -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);
|
||||
|
||||
@ -77,7 +77,7 @@ signals:
|
||||
|
||||
private slots:
|
||||
void onTimeout();
|
||||
void onInterruptOccured(bool value);
|
||||
void onInterruptOccurred(bool value);
|
||||
|
||||
public slots:
|
||||
bool enable();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -76,7 +76,7 @@ protected:
|
||||
void run() override;
|
||||
|
||||
signals:
|
||||
void interruptOccured(bool value);
|
||||
void interruptOccurred(bool value);
|
||||
void enabledChanged(bool enabled);
|
||||
|
||||
private slots:
|
||||
|
||||
@ -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");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user