mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Whitespace and const correctness tidy
This commit is contained in:
parent
96bf7ea638
commit
147a16a66d
8 changed files with 12 additions and 12 deletions
|
@ -167,7 +167,7 @@ static void performInflightAccelerationCalibration(rollAndPitchTrims_t *rollAndP
|
|||
}
|
||||
}
|
||||
|
||||
static void applyAccelerationTrims(flightDynamicsTrims_t *accelerationTrims)
|
||||
static void applyAccelerationTrims(const flightDynamicsTrims_t *accelerationTrims)
|
||||
{
|
||||
accSmooth[X] -= accelerationTrims->raw[X];
|
||||
accSmooth[Y] -= accelerationTrims->raw[Y];
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
static bool standardBoardAlignment = true; // board orientation correction
|
||||
static float boardRotation[3][3]; // matrix
|
||||
|
||||
static bool isBoardAlignmentStandard(boardAlignment_t *boardAlignment)
|
||||
static bool isBoardAlignmentStandard(const boardAlignment_t *boardAlignment)
|
||||
{
|
||||
return !boardAlignment->rollDegrees && !boardAlignment->pitchDegrees && !boardAlignment->yawDegrees;
|
||||
}
|
||||
|
||||
void initBoardAlignment(boardAlignment_t *boardAlignment)
|
||||
void initBoardAlignment(const boardAlignment_t *boardAlignment)
|
||||
{
|
||||
if (isBoardAlignmentStandard(boardAlignment)) {
|
||||
return;
|
||||
|
@ -62,7 +62,7 @@ static void alignBoard(int32_t *vec)
|
|||
vec[Z] = lrintf(boardRotation[0][Z] * x + boardRotation[1][Z] * y + boardRotation[2][Z] * z);
|
||||
}
|
||||
|
||||
void alignSensors(int32_t *src, int32_t *dest, uint8_t rotation)
|
||||
void alignSensors(const int32_t *src, int32_t *dest, uint8_t rotation)
|
||||
{
|
||||
static uint32_t swap[3];
|
||||
memcpy(swap, src, sizeof(swap));
|
||||
|
|
|
@ -23,5 +23,5 @@ typedef struct boardAlignment_s {
|
|||
int32_t yawDegrees;
|
||||
} boardAlignment_t;
|
||||
|
||||
void alignSensors(int32_t *src, int32_t *dest, uint8_t rotation);
|
||||
void initBoardAlignment(boardAlignment_t *boardAlignment);
|
||||
void alignSensors(const int32_t *src, int32_t *dest, uint8_t rotation);
|
||||
void initBoardAlignment(const boardAlignment_t *boardAlignment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue