T watch pinfix (#10231)
* Minor button debugging bits * pin0 is a pin, pin -1 means disabled
This commit is contained in:
co-authored by
GitHub
parent
9361b85f47
commit
2b5daf2438
@@ -143,6 +143,10 @@ int32_t ButtonThread::runOnce()
|
|||||||
leadUpSequenceActive = false;
|
leadUpSequenceActive = false;
|
||||||
resetLeadUpSequence();
|
resetLeadUpSequence();
|
||||||
}
|
}
|
||||||
|
#ifdef INPUT_DEBUG
|
||||||
|
if (buttonCurrentlyPressed)
|
||||||
|
LOG_WARN("Button held for %u ms", millis() - buttonPressStartTime);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Progressive lead-up sound system
|
// Progressive lead-up sound system
|
||||||
if (!_suppressLeadUp && buttonCurrentlyPressed && (millis() - buttonPressStartTime) >= BUTTON_LEADUP_MS) {
|
if (!_suppressLeadUp && buttonCurrentlyPressed && (millis() - buttonPressStartTime) >= BUTTON_LEADUP_MS) {
|
||||||
@@ -311,7 +315,8 @@ int32_t ButtonThread::runOnce()
|
|||||||
void ButtonThread::attachButtonInterrupts()
|
void ButtonThread::attachButtonInterrupts()
|
||||||
{
|
{
|
||||||
// Interrupt for user button, during normal use. Improves responsiveness.
|
// Interrupt for user button, during normal use. Improves responsiveness.
|
||||||
attachInterrupt(_pinNum, _intRoutine, CHANGE);
|
if (_intRoutine != nullptr)
|
||||||
|
attachInterrupt(_pinNum, _intRoutine, CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -320,7 +325,8 @@ void ButtonThread::attachButtonInterrupts()
|
|||||||
*/
|
*/
|
||||||
void ButtonThread::detachButtonInterrupts()
|
void ButtonThread::detachButtonInterrupts()
|
||||||
{
|
{
|
||||||
detachInterrupt(_pinNum);
|
if (_intRoutine != nullptr)
|
||||||
|
detachInterrupt(_pinNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#define DAC_I2S_BCK 48
|
#define DAC_I2S_BCK 48
|
||||||
#define DAC_I2S_WS 15
|
#define DAC_I2S_WS 15
|
||||||
#define DAC_I2S_DOUT 46
|
#define DAC_I2S_DOUT 46
|
||||||
#define DAC_I2S_MCLK 0
|
#define DAC_I2S_MCLK -1
|
||||||
|
|
||||||
#define HAS_AXP2101
|
#define HAS_AXP2101
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user