Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmhunter committed Feb 20, 2023
2 parents ebe31ea + 3465ff6 commit 6b00b7b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [v3.4.6]

* Fixed incorrect imperial unit display of 'mill' to 'mil' in the IPC2151 track current calculator.
* Plane proximity input value is disabled if "is plane present" select is set to False in the IPC2151 track current calculator.

## [v3.4.5](https://github.com/gbmhunter/NinjaCalc/tree/v3.4.5) (2023-02-19)

### Features
Expand Down
3 changes: 3 additions & 0 deletions components/calc-var-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export class CalcVarInput extends React.Component {
throw Error('Direction of "' + calcVar.direction + '" not supported.')
}

if (this.props.disabled) {
disabled = true
}

const validationState = calcVar.validation.state

Expand Down
3 changes: 2 additions & 1 deletion components/calc-var-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class VarRow extends React.Component {
id={this.props.id}
calc={this.props.calc}
valueChanged={this.props.valueChanged}
width={this.props.width} />
width={this.props.width}
disabled={disabled} />
} else if (calcVar.type === 'select') {
const options = calcVar.options.map((option, idx) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class UI extends React.Component {
dispVal: "35",
units: [
new UnitsMultiplicative('um', 1e-6),
new UnitsMultiplicative('mill', unitConversionConstants.METERS_PER_MILS),
new UnitsMultiplicative('mil', unitConversionConstants.METERS_PER_MILS),
new UnitsMultiplicative('oz', unitConversionConstants.COPPER_THICKNESS_M_PER_OZ),
],
selUnit: "um",
Expand All @@ -195,18 +195,18 @@ class UI extends React.Component {
if (value < 17.5e-6)
return [
"warning",
"Track thickness is below the minimum value (17.5um) extracted from the track thickness modififer graph in IPC-2152. Results might not be as accurate (extrapolation will occur).",
"Track thickness is below the minimum value (17.5um/0.5oz) extracted from the track thickness modifier graph in IPC-2152. Results might not be as accurate (extrapolation will occur).",
];
if (value > 105.0036e-6)
return [
"warning",
"Track thickness is above the maximum value (105um) extracted from the track thickness modififer graph in IPC-2152. Results might not be as accurate (extrapolation will occur).",
"Track thickness is above the maximum value (105um) extracted from the track thickness modifier graph in IPC-2152. Results might not be as accurate (extrapolation will occur).",
];
return ["ok", ""];
},
},
helpText:
"The thickness (height) of the track. This is equal to the thickness of the copper layer the track is on. This is also called the copper weight. Common values are 17um (0.5oz) or 35um (1oz).",
"The thickness (height) of the track. This is equal to the thickness of the copper layer the track is on. This is also called the copper weight. Common values are 17.5um (0.5oz) or 35um (1oz).",
}), // trackThickness

trackThicknessModifier: new CalcVar({
Expand All @@ -229,7 +229,7 @@ class UI extends React.Component {
dispVal: "1.6",
units: [
new UnitsMultiplicative('mm', 1e-3),
new UnitsMultiplicative('mill', unitConversionConstants.METERS_PER_MILS),
new UnitsMultiplicative('mil', unitConversionConstants.METERS_PER_MILS),
],
selUnit: "mm",
validation: {
Expand Down Expand Up @@ -277,7 +277,7 @@ class UI extends React.Component {
options: ["Yes", "No"],
selOption: "Yes",
helpText:
'Set this to "True" if there is a copper plane either above or below the current-carrying track, and then enter the distance to it in the "Plane Proximity" field. If there is no plane, set this to "False", and the "Plane Proximity" variable will also disappear.',
'Set this to "True" if there is a copper plane either above or below the current-carrying track, and then enter the distance to it in the "Plane Proximity" field. If there is no plane, set this to "False", and the "Plane Proximity" variable will be disabled.',
}),

// ============================================================================================= //
Expand All @@ -290,7 +290,7 @@ class UI extends React.Component {
dispVal: "1.6",
units: [
new UnitsMultiplicative('mm', 1e-3),
new UnitsMultiplicative('mill', unitConversionConstants.METERS_PER_MILS),
new UnitsMultiplicative('mil', unitConversionConstants.METERS_PER_MILS),
],
selUnit: "mm",
validation: {
Expand Down Expand Up @@ -404,7 +404,7 @@ class UI extends React.Component {
direction: "output",
units: [
new UnitsMultiplicative('mm', 1e-3),
new UnitsMultiplicative('mill', unitConversionConstants.METERS_PER_MILS),
new UnitsMultiplicative('mil', unitConversionConstants.METERS_PER_MILS),
],
selUnit: "mm",
sigFig: 3,
Expand Down

1 comment on commit 6b00b7b

@vercel
Copy link

@vercel vercel bot commented on 6b00b7b Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.