Send ESP-NOW accel only on deadzone change and harden BLE+WiFi OTA coex.
Quiet pods no longer spam 100 Hz samples; mute wifi logs and throttle BLE notifies during slave distribution so the wifi task stack does not panic. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-1
@@ -19,7 +19,7 @@
|
||||
/** Sensor interrupt line → ESP32 GPIO (active high, rising edge). */
|
||||
#define BMA456_INT_GPIO 10
|
||||
|
||||
/** Software filter: log accel only when |axis - last| > deadzone (raw LSB). */
|
||||
/** Software filter: emit accel only when |axis - last| > deadzone (raw LSB). */
|
||||
#define BMA456_DEFAULT_ACCEL_DEADZONE 100u
|
||||
|
||||
/**
|
||||
@@ -81,6 +81,16 @@ bool bma456_is_ready(void);
|
||||
void bma456_set_accel_deadzone(uint32_t deadzone_lsb);
|
||||
uint32_t bma456_get_accel_deadzone(void);
|
||||
|
||||
/**
|
||||
* ESP-NOW stream filter: true if sample exceeds deadzone vs last streamed
|
||||
* sample (or no baseline yet). On true, commits (x,y,z) as stream baseline.
|
||||
* Independent of the log filter baseline.
|
||||
*/
|
||||
bool bma456_accel_stream_take_if_changed(int16_t x, int16_t y, int16_t z);
|
||||
|
||||
/** Force next stream take to accept (call when accel stream is enabled). */
|
||||
void bma456_accel_stream_reset_baseline(void);
|
||||
|
||||
/** Log accel when any axis moved more than deadzone since last reported sample. */
|
||||
void bma456_report_accel_if_changed(int16_t x, int16_t y, int16_t z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user