mirror of
https://github.com/pelgraine/Meck.git
synced 2026-07-29 04:42:41 +02:00
T-Watch S3 Plus - The whole TILT TEMP diagnostic is now gone: printout, timer, counter declaration, definition, and the ISR increment.
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
#include <esp_bt.h> // 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user