mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
paw3902: Default to using SENS_FLOW_ROT rotation
This restores the behavior to what it was previous to #16338 (74083d6).
Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
This commit is contained in:
committed by
Daniel Agar
parent
c266c3e43a
commit
cbf34109d1
@@ -46,8 +46,14 @@ void PAW3902::print_usage()
|
||||
I2CSPIDriverBase *PAW3902::instantiate(const BusCLIArguments &cli, const BusInstanceIterator &iterator,
|
||||
int runtime_instance)
|
||||
{
|
||||
float yaw_rotation_degrees = NAN;
|
||||
|
||||
if (cli.custom1 >= 0) {
|
||||
yaw_rotation_degrees = cli.custom1;
|
||||
}
|
||||
|
||||
PAW3902 *instance = new PAW3902(iterator.configuredBusOption(), iterator.bus(), iterator.devid(), cli.bus_frequency,
|
||||
cli.spi_mode, iterator.DRDYGPIO(), cli.custom1);
|
||||
cli.spi_mode, iterator.DRDYGPIO(), yaw_rotation_degrees);
|
||||
|
||||
if (!instance) {
|
||||
PX4_ERR("alloc failed");
|
||||
@@ -67,6 +73,7 @@ extern "C" __EXPORT int paw3902_main(int argc, char *argv[])
|
||||
int ch = 0;
|
||||
using ThisDriver = PAW3902;
|
||||
BusCLIArguments cli{false, true};
|
||||
cli.custom1 = -1;
|
||||
cli.spi_mode = SPIDEV_MODE0;
|
||||
cli.default_spi_frequency = SPI_SPEED;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user