Add accelerometer deadzone via UART and ESP-NOW.
Filter BMA456 logs by configurable LSB threshold; master can set deadzone for local sensor or slaves using ACCEL_DEADZONE (UART) and ESP-NOW broadcast until unicast delivery is restored. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,7 +9,17 @@
|
||||
|
||||
#define BMA456_ADDRESS 0x18
|
||||
|
||||
#define BMA456_DEFAULT_ACCEL_DEADZONE 100u
|
||||
|
||||
/** Initialize BMA456 on the shared I2C bus. Returns ESP_OK or logs and skips sensor use. */
|
||||
esp_err_t init_bma456(i2c_master_bus_handle_t bus_handle);
|
||||
|
||||
bool bma456_is_ready(void);
|
||||
|
||||
void bma456_set_accel_deadzone(uint32_t deadzone_lsb);
|
||||
uint32_t bma456_get_accel_deadzone(void);
|
||||
|
||||
/** Log accel sample only when any axis changed more than deadzone since last report. */
|
||||
void bma456_report_accel_if_changed(int16_t x, int16_t y, int16_t z);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user