Merge pull request #171 from atomiclama/fpvCanAngleFix
fix for fpv cam angle
This commit is contained in:
commit
de3ea1c439
|
@ -219,7 +219,7 @@ void filterRc(void){
|
|||
void scaleRcCommandToFpvCamAngle(void) {
|
||||
int16_t roll = rcCommand[ROLL];
|
||||
int16_t yaw = rcCommand[YAW];
|
||||
rcCommand[ROLL] = constrain(cos(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * roll + sin(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * yaw, -500, 500);
|
||||
rcCommand[ROLL] = constrain(cos(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * roll - sin(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * yaw, -500, 500);
|
||||
rcCommand[YAW] = constrain(cos(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * yaw + sin(masterConfig.rxConfig.fpvCamAngleDegrees*RAD) * roll, -500, 500);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue