From 0f5b62f36b0d9a87ce4bb04259c6fe547dff4881 Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Tue, 14 Jul 2026 19:11:52 +1000 Subject: [PATCH] T-Watch S3 Plus - The whole TILT TEMP diagnostic is now gone: printout, timer, counter declaration, definition, and the ISR increment. --- variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.cpp | 11 +---------- variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.cpp b/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.cpp index 2957900c..58596c6b 100644 --- a/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.cpp +++ b/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.cpp @@ -4,9 +4,8 @@ #include // TEMP power-debug: esp_bt_controller_get_status() volatile bool TWatchS3PlusBoard::_tilt_flag = false; -volatile uint32_t TWatchS3PlusBoard::_tilt_isr_count = 0; // TEMP diagnostic -void IRAM_ATTR TWatchS3PlusBoard::onTiltISR() { _tilt_flag = true; _tilt_isr_count++; } +void IRAM_ATTR TWatchS3PlusBoard::onTiltISR() { _tilt_flag = true; } // ---- Wrapper-free BMA423 step counter (raw I2C) ---------------------------- // SensorLib's SensorBMA423 step-counter methods do not compile in this build, @@ -204,14 +203,6 @@ bool TWatchS3PlusBoard::tiltFired() { _accel->update(); // reading the status clears the sensor INT return true; } - // TEMP diagnostic: periodically report the raw INT pin level and ISR count, - // to distinguish "pin stuck high / never re-arms" from "never asserts". - static unsigned long _tilt_dbg_next = 0; - if (millis() >= _tilt_dbg_next) { - _tilt_dbg_next = millis() + 5000; - Serial.printf("[TILT] pin=%d isr_count=%u\n", - digitalRead(PIN_ACCEL_IRQ), (unsigned)_tilt_isr_count); - } return false; } diff --git a/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.h b/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.h index 5da5cc1d..50fa738c 100644 --- a/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.h +++ b/variants/lilygo_twatch_s3_plus/TWatchS3PlusBoard.h @@ -18,7 +18,6 @@ class TWatchS3PlusBoard : public ESP32Board { XPowersLibInterface* PMU = NULL; SensorBMA423* _accel = nullptr; static volatile bool _tilt_flag; - static volatile uint32_t _tilt_isr_count; // TEMP diagnostic static void IRAM_ATTR onTiltISR(); // defined in the .cpp (IRAM relocation) bool power_init();