Skip to content

Commit

Permalink
better casting
Browse files Browse the repository at this point in the history
  • Loading branch information
blondejamtart committed Apr 6, 2020
1 parent 85d5f4a commit d196567
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions raspiraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ void update_regs(const struct sensor_def *sensor, struct mode_def *mode, int hfl
modRegBit(mode, sensor->vflip_reg, sensor->vflip_reg_bit, vflip, XOR);
if (vflip && !sensor->flips_dont_change_bayer_order)
{
uint8_t tmp = mode->order^2;
mode->order = tmp;
mode->order = (enum bayer_order)((uint8_t)(mode->order)^(2));
// mode->order ^= 2;
}
}

Expand All @@ -942,8 +942,8 @@ void update_regs(const struct sensor_def *sensor, struct mode_def *mode, int hfl
modRegBit(mode, sensor->hflip_reg, sensor->hflip_reg_bit, hflip, XOR);
if (hflip && !sensor->flips_dont_change_bayer_order)
{
uint8_t tmp = mode->order^1;
mode->order = tmp;
mode->order = (enum bayer_order)((uint8_t)(mode->order)^(1));
// mode->order ^= 1;
}
}

Expand Down

0 comments on commit d196567

Please sign in to comment.