feat: continuous sensor sampling (10Hz attitude) + LoRa on-demand power + I2C driver hardening

- LSM6DSL: ODR 12.5->52Hz high-performance, gyro FS 2000->500dps, FIFO stream mode,
  watermark 4 sets (24 words) interrupt driven, 4-sample average output 13Hz,
  1s no-data watchdog auto recovery
- MMC5983: enable 20Hz continuous measurement mode (was dead code), remove per-read SW_RST,
  STATUS polling + INT dual path, write-1-clear Meas_M_Done to release INT latch,
  2-sample average output 10Hz, timeout auto recovery
- I2C driver: add wait timeout and state machine retry limit to read/write,
  NACK fast-return FALSE, eliminate bus-stuck infinite loop
- main.c: continuous acquire loop (no IDLE dead-end on first failure),
  keep UpdateOk valid to fix up/coll command race, TimingAcquisition compatible with
  continuous mode, add LoraPowerHandler (LoRa RX during comm, sleep otherwise, saves ~10mA),
  remove 10Hz hot-path debug prints
- Attitude update ~10Hz (IMU 13Hz / mag 10Hz), gateway upload cadence unchanged
This commit is contained in:
2026-09-03 16:15:09 +08:00
parent 706eb1247e
commit 93e00b8b0a
5 changed files with 387 additions and 358 deletions
-4
View File
@@ -103,9 +103,6 @@ typedef union {
typedef enum{
MMC5983_STATUS_IDLE,
MMC5983_STATUS_START,
MMC5983_STATUS_DELAY,
MMC5983_STATUS_WAIT_DELAY,
MMC5983_STATUS_READ,
MMC5983_STATUS_WAIT_READ,
MMC5983_STATUS_STOP,
}MMC5983Status_m;
@@ -129,7 +126,6 @@ void MMC5983Calib(void);
void MMC5983GetADValue(int32_t *Mag);
void MMC5983_Get_Mag(float *mag);
MMC5983Status_m GetMMC5983Status(void);
void MMC5983StartRead(void);
bool GetMMC5983CalibStatus(void);
#endif