Skip to content

Commit

Permalink
fix(displays): Fix potentiometer bug - adjust pixel intensity (#5415)
Browse files Browse the repository at this point in the history
* Fix potentiometer bug

* Lower intensity of pixel effect

* Remove logging
  • Loading branch information
bouveng authored Jul 26, 2021
1 parent 63df888 commit b8d899c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ text {
/* custom svg */
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 0 V10 Z H10 Z' stroke='%23000' stroke-width='3' fill='none'/%3E%3C/svg%3E");
background-size: 2px;
opacity: 0.75;
opacity: 0.35;
/* subtle tint and edge bleed */
background-color: rgba(0, 0, 255, 0.025);
box-shadow: inset 0px 0px 30px 10px rgba(0, 75, 255, 0.04);
Expand Down
2 changes: 0 additions & 2 deletions src/instruments/src/Common/displayUnit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export const DisplayUnit: React.FC<DisplayUnitProps> = (props) => {
const [electricityState] = useSimVar(props.electricitySimvar, 'bool', 200);

useUpdate((deltaTime) => {
console.log(`Updated ${deltaTime} ${new Date().getTime()}`);
console.log(state);
if (timer !== null) {
if (timer > 0) {
setTimer(timer - (deltaTime / 1000));
Expand Down
2 changes: 1 addition & 1 deletion src/instruments/src/Common/pixels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
z-index: 999;
position: absolute;
background-size: $density * 1px;
opacity: 0.75;
opacity: 0.35;

@if $checkered {
background-image: url("data:image/svg+xml,%3Csvg width='2' height='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect height='1' width='1' y='0' x='0' /%3E%3Crect height='1' width='1' y='1' x='1' /%3E%3C/svg%3E");
Expand Down
2 changes: 1 addition & 1 deletion src/instruments/src/PFD/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class PFD extends Component {
return (
<DisplayUnit
electricitySimvar={this.isCaptainSide() ? 'L:A32NX_ELEC_AC_ESS_BUS_IS_POWERED' : 'L:A32NX_ELEC_AC_2_BUS_IS_POWERED'}
potentiometerIndex={this.isCaptainSide() === 1 ? 88 : 90}
potentiometerIndex={this.isCaptainSide() ? 88 : 90}
>
<svg className="pfd-svg" version="1.1" viewBox="0 0 158.75 158.75" xmlns="http://www.w3.org/2000/svg">
<Horizon pitch={pitch} roll={roll} heading={heading} FDActive={FDActive} selectedHeading={selectedHeading} isOnGround={isOnGround} radioAlt={radioAlt} decisionHeight={decisionHeight} isAttExcessive={this.isAttExcessive} deltaTime={this.deltaTime} />
Expand Down

0 comments on commit b8d899c

Please sign in to comment.