mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Make all battery sensor drivers report their sample interval
To make use of the time abstraction in the leaky integrator.
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
#include "syslink.h"
|
||||
#include "crtp.h"
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
||||
|
||||
|
||||
@@ -137,7 +139,9 @@ private:
|
||||
|
||||
uORB::PublicationMulti<input_rc_s> _rc_pub{ORB_ID(input_rc)};
|
||||
|
||||
Battery _battery{1, nullptr};
|
||||
// nrf chip schedules battery updates with SYSLINK_SEND_PERIOD_MS
|
||||
static constexpr uint32_t SYSLINK_BATTERY_STATUS_INTERVAL_US = 10_ms;
|
||||
Battery _battery{1, nullptr, SYSLINK_BATTERY_STATUS_INTERVAL_US};
|
||||
|
||||
int32_t _rssi;
|
||||
battery_state _bstate;
|
||||
|
||||
Reference in New Issue
Block a user