mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 22:30:36 +08:00
MatekH743 board_id, usb vid/pid changes, and MPU6000 delay before transfer - not after (#18733)
* Make board_id compatible with ardupilot * Initialize outputs for CAM1/CAM2 and Vsw pad * Correct board type 1013 in bootloader to match AP * Change usb vendor string to "Matek" * Change cdcacm pid to 1013 * Comment out FLASH_BASED_PARAMS because of #15331
This commit is contained in:
@@ -436,8 +436,8 @@ uint8_t MPU6000::RegisterRead(Register reg)
|
||||
uint8_t cmd[2] {};
|
||||
cmd[0] = static_cast<uint8_t>(reg) | DIR_READ;
|
||||
set_frequency(SPI_SPEED); // low speed for regular registers
|
||||
transfer(cmd, cmd, sizeof(cmd));
|
||||
px4_udelay(10);
|
||||
transfer(cmd, cmd, sizeof(cmd));
|
||||
return cmd[1];
|
||||
}
|
||||
|
||||
@@ -445,8 +445,8 @@ void MPU6000::RegisterWrite(Register reg, uint8_t value)
|
||||
{
|
||||
uint8_t cmd[2] { (uint8_t)reg, value };
|
||||
set_frequency(SPI_SPEED); // low speed for regular registers
|
||||
transfer(cmd, cmd, sizeof(cmd));
|
||||
px4_udelay(10);
|
||||
transfer(cmd, cmd, sizeof(cmd));
|
||||
}
|
||||
|
||||
void MPU6000::RegisterSetAndClearBits(Register reg, uint8_t setbits, uint8_t clearbits)
|
||||
|
||||
Reference in New Issue
Block a user