Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Add extended up B on modX and modY angles
Browse files Browse the repository at this point in the history
  • Loading branch information
Crane1195 committed Aug 19, 2022
1 parent f6bb134 commit a349261
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/Logic/DAC.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,14 @@ outputStatus rectangleDAC(inputStatus *inputs, coordinates currentCoords, SOCD l
}
// Tilt angle
else {
returnStatus.leftStickX += (positionX * currentCoords.modX_Diagonal.x);
returnStatus.leftStickY += (positionY * currentCoords.modX_Diagonal.y);
if (!inputs->b) {
returnStatus.leftStickX += (positionX * currentCoords.modX_Diagonal.x);
returnStatus.leftStickY += (positionY * currentCoords.modX_Diagonal.y);
}
else {
returnStatus.leftStickX += (positionX * currentCoords.modX_Diagonal_B.x);
returnStatus.leftStickY += (positionY * currentCoords.modX_Diagonal_B.y);
}
}
}
}
Expand Down Expand Up @@ -255,8 +261,14 @@ outputStatus rectangleDAC(inputStatus *inputs, coordinates currentCoords, SOCD l
}
// Tilt angle
else {
returnStatus.leftStickX += (positionX * currentCoords.modY_Diagonal.x);
returnStatus.leftStickY += (positionY * currentCoords.modY_Diagonal.y);
if (!inputs->b) {
returnStatus.leftStickX += (positionX * currentCoords.modY_Diagonal.x);
returnStatus.leftStickY += (positionY * currentCoords.modY_Diagonal.y);
}
else {
returnStatus.leftStickX += (positionX * currentCoords.modY_Diagonal_B.x);
returnStatus.leftStickY += (positionY * currentCoords.modY_Diagonal_B.y);
}
}
}
}
Expand Down

0 comments on commit a349261

Please sign in to comment.