mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-03 16:41:56 +00:00
Fix spurious button presses on some T-Echos (#6590)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -181,7 +181,7 @@ void TwoButton::isrSecondary()
|
||||
void TwoButton::startThread()
|
||||
{
|
||||
if (!OSThread::enabled) {
|
||||
OSThread::setInterval(50);
|
||||
OSThread::setInterval(10);
|
||||
OSThread::enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +210,14 @@ bool RadioLibInterface::canSleep()
|
||||
return res;
|
||||
}
|
||||
|
||||
/** Allow other firmware components to ask whether we are currently sending a packet
|
||||
Initially implemented to protect T-Echo's capacitive touch button from spurious presses during tx
|
||||
*/
|
||||
bool RadioLibInterface::isSending()
|
||||
{
|
||||
return sendingPacket != NULL;
|
||||
}
|
||||
|
||||
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
|
||||
bool RadioLibInterface::cancelSending(NodeNum from, PacketId id)
|
||||
{
|
||||
|
||||
@@ -132,6 +132,11 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified
|
||||
*/
|
||||
virtual bool isActivelyReceiving() = 0;
|
||||
|
||||
/** Are we are currently sending a packet?
|
||||
* This method is public, intending to expose this information to other firmware components
|
||||
*/
|
||||
virtual bool isSending();
|
||||
|
||||
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
|
||||
virtual bool cancelSending(NodeNum from, PacketId id) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user