Skip to content

Commit

Permalink
Merge branch 'release/v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmhunter committed May 15, 2016
2 parents 71fd523 + d9a7341 commit 2f8bb21
Show file tree
Hide file tree
Showing 31 changed files with 1,684 additions and 2,211 deletions.
780 changes: 364 additions & 416 deletions .idea/workspace.xml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions NinjaCalc.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@
<orderEntry type="library" name="org.testfx:testfx-junit:4.0.2-alpha" level="project" />
<orderEntry type="library" name="symja_java8-2016-04-15" level="project" />
<orderEntry type="library" name="org.scilab.forge:jlatexmath:1.0.2" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://C:/Program Files/install4j6/resource/i4jruntime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
2 changes: 1 addition & 1 deletion NinjaCalc.install4j
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<install4j version="6.0.4" transformSequenceNumber="5">
<directoryPresets config="C:/Users/gbmhunter/GoogleDrive/Projects/NinjaCalc" />
<application name="NinjaCalc" distributionSourceDir="" applicationId="7231-2225-0472-1196" mediaDir="C:/Users/gbmhunter/GoogleDrive/Projects/NinjaCalc/install" mediaFilePattern="${compiler:sys.shortName}_v${compiler:sys.version}_${compiler:sys.platform}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="NinjaCalc" publisher="Geoffrey Hunter" publisherWeb="http://mbedded-ninja.github.io/NinjaCalc/" version="1.2.0" allPathsRelative="false" backupOnSave="false" autoSave="false" convertDotsToUnderscores="false" macSignature="????" macVolumeId="8b8be1286580b078" javaMinVersion="1.8" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName="">
<application name="NinjaCalc" distributionSourceDir="" applicationId="7231-2225-0472-1196" mediaDir="C:/Users/gbmhunter/GoogleDrive/Projects/NinjaCalc/install" mediaFilePattern="${compiler:sys.shortName}_v${compiler:sys.version}_${compiler:sys.platform}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="NinjaCalc" publisher="Geoffrey Hunter" publisherWeb="http://mbedded-ninja.github.io/NinjaCalc/" version="1.2.1" allPathsRelative="false" backupOnSave="false" autoSave="false" convertDotsToUnderscores="false" macSignature="????" macVolumeId="8b8be1286580b078" javaMinVersion="1.8" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName="">
<languages skipLanguageSelection="false" languageSelectionInPrincipalLanguage="false">
<principalLanguage id="en" customLocalizationFile="" />
<additionalLanguages />
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

- Author: gbmhunter <[email protected]> ([www.mbedded.ninja](http://www.mbedded.ninja))
- Created: 2015-11-02
- Last Modified: 2016-04-24
- Version: v1.2.0
- Last Modified: 2016-05-15
- Version: v1.2.1
- Company: mbedded.ninja
- Project: NinjaTerm
- Language: Java
Expand Down Expand Up @@ -38,6 +38,7 @@ See the [project home page](http://mbedded-ninja.github.io/NinjaCalc/) for a lis

1. Download the latest installer-based release from [http://mbedded-ninja.github.io/NinjaCalc/](http://mbedded-ninja.github.io/NinjaCalc/).
2. Run the installer and play (or work, right?)!
3. NinjaCalc should automatically inform you if there is a new version available on start-up of the application.

Installing a newer version of NinjaCalc should automatically overwrite the old one.

Expand Down Expand Up @@ -73,22 +74,23 @@ Myself (gbmhunter) currently holds the license for this software, and so I am th

The install4j script is located at `/NinjaCalc.install4j`.

1. Open the `/NinjaCalc.install4j` file in "install4j Multi-Platform Edition".
2. Update the "Version" field as appropriate.
3. Click the "Build Project" button.
4. Wait until build completes. install4j should have created installer files for each supported platform (currently Windows and Mac OS), as well as an updates.xml file, in the `install` directory.
5. Overwrite the old `updates.xml` file in the repos root directory with the one that install4j created in the `install` directory.
6. Upload the installable packages to GitHub as a new release (if appropriate).
7. Push the repository changes to the master branch (updates.xml is the most important file to be updated).
8. Update the download button links on the homepage in the `gh-pages` branch of the repo to point to the new release files.
1. After code changes are complete, make sure the NinjaCalc.jar artifact has been built from within IntelliJ (`Build->Build Artifacts->NinjaCalc:jar->Build`).
2. Open the `/NinjaCalc.install4j` file in "install4j Multi-Platform Edition".
3. Update the "Version" field as appropriate.
4. Click the "Build Project" button.
5. Wait until build completes. install4j should have created installer files for each supported platform (currently Windows and Mac OS), as well as an updates.xml file, in the `install` directory.
6. Overwrite the old `updates.xml` file in the repos root directory with the one that install4j created in the `install` directory.
7. Upload the installable packages to GitHub as a new release (if appropriate).
8. Commit and push the repository changes to the master branch (updates.xml is the most important file to be updated). The "Git Flow" plugin for SourceTree can make this step easy.
9. Update the download button links on the homepage in the `gh-pages` branch of the repo to point to the new release files.


# Debugging A Deployed App (Locally)

You can get the `System.out` and `System.err` streams by running the NinjaCalc.jar file from the commandline. For example, in Windows you would type at the command-line:
You can get the `System.out` and `System.err` streams by running the `NinjaCalc.jar` file from the commandline. For example, in Windows you would type at the command-line:


`C:\Program Files (x86)\NinjaCal\java -jar NinjaCalc.jar`
`C:\Program Files (x86)\NinjaCalc\java -jar NinjaCalc.jar`

# File Structure

Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
v1.2.1
------

- Disabled metric prefixes for IPC-2152 calculator variables, closes #118.
- Fixed info section of "Via Current" calculator, closes #112.
- Added ability to display closest higher value and closest lower value on the standard resistor finder, closes #120.
- Fixed bug where initial values for calculator variables were not "NaN" (see Standard Resistance Finder calculator for example), closes #117.
- Fixed bug where splash screen remained in background after app has started, closes #116.

v1.2.0
------

Expand Down
83 changes: 5 additions & 78 deletions src/Calculators/Electronics/Basic/OhmsLaw/OhmsLawCalcModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import Core.CalcVar.CalcVarDirections;
import Core.CalcVar.CalcVarNumerical;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
Expand All @@ -17,6 +18,7 @@
import javafx.scene.web.WebView;

import java.io.IOException;
import java.io.Serializable;
import java.net.URL;

/**
Expand Down Expand Up @@ -117,38 +119,14 @@ public OhmsLawCalcModel() {
}
);


//===============================================================================================//
//========================================= VOLTAGE (i/o) =======================================//
//===============================================================================================//

/*this.voltage = new CalcVarNumerical(
"voltage",
voltageValueTextField,
null,
() -> {
Double current = this.current.getRawVal();
Double resistance = this.resistance.getRawVal();
return current * resistance;
},
new NumberUnitMultiplier[]{
//new NumberUnitMultiplier("mV", 1e-3),
new NumberUnitMultiplier("V", 1e0, NumberPreference.DEFAULT),
//new NumberUnitMultiplier("kV", 1e3),
},
4,
() -> {
if (voltageRadioButton.isSelected())
return CalcVarDirections.Output;
else return CalcVarDirections.Input;
},
null,
"The voltage across the resistor." // Help text
);
this.voltage.setIsEngineeringNotationEnabled(true);*/

this.voltage.setName("voltage");
this.voltage.setValueTextField(this.voltageValueTextField);
this.voltage.setEquationFunction(() -> {
this.voltage.setEquationFunction((IEquationFunction & Serializable)() -> {
// Read dependency variables
Double current = this.current.getRawVal();
Double resistance = this.resistance.getRawVal();
Expand Down Expand Up @@ -176,32 +154,6 @@ public OhmsLawCalcModel() {
//============================================ CURRENT ==========================================//
//===============================================================================================//


/*this.current = new CalcVarNumerical(
"current",
currentValueTextField,
null,
() -> {
Double voltage = this.voltage.getRawVal();
Double resistance = this.resistance.getRawVal();
return voltage / resistance;
},
new NumberUnitMultiplier[]{
//new NumberUnitMultiplier("pA", 1e-12),
//new NumberUnitMultiplier("nA", 1e-9),
//new NumberUnitMultiplier("uA", 1e-6),
//new NumberUnitMultiplier("mA", 1e-3),
new NumberUnitMultiplier("A", 1e0, NumberPreference.DEFAULT),
},
4,
() -> {
if (currentRadioButton.isSelected()) return CalcVarDirections.Output;
else return CalcVarDirections.Input;
},
null,
"The current going through the resistor" // Help text
);*/

this.current.setName("current");
this.current.setValueTextField(this.currentValueTextField);
this.current.setEquationFunction(() -> {
Expand All @@ -228,36 +180,11 @@ public OhmsLawCalcModel() {

this.calcVars.add(this.current);


//===============================================================================================//
//========================================== RESISTANCE =========================================//
//===============================================================================================//


/*this.resistance = new CalcVarNumerical(
"resistance",
resistanceValueTextField,
null,
() -> {
Double voltage = this.voltage.getRawVal();
Double current = this.current.getRawVal();
return voltage / current;
},
new NumberUnitMultiplier[]{
//new NumberUnitMultiplier("mΩ", 1e-3),
new NumberUnitMultiplier("Ω", 1e0, NumberPreference.DEFAULT),
//new NumberUnitMultiplier("kΩ", 1e3),
//new NumberUnitMultiplier("MΩ", 1e6),
//new NumberUnitMultiplier("GΩ", 1e9),
},
4,
() -> {
if (resistanceRadioButton.isSelected()) return CalcVarDirections.Output;
else return CalcVarDirections.Input;
},
null,
"The resistance of the resistor (or other circuit component)." // Help text
);*/

this.resistance.setName("resistance");
this.resistance.setValueTextField(this.resistanceValueTextField);
this.resistance.setEquationFunction(() -> {
Expand Down
Loading

0 comments on commit 2f8bb21

Please sign in to comment.