Skip to content

Fix documentation issues from #399 #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Electrical/Analog/transistors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ Early voltage effect.

C_jE ~ if V_EB > phi_E - Z_E
((C_jE0 * gamma_E * (1 - ((phi_E - Z_E) / phi_E))^(-gamma_E - 1)) / phi_E) *
V_BE -
V_EB -
((C_jE0 * gamma_E * (1 - ((phi_E - Z_E) / phi_E))^(-gamma_E - 1)) / phi_E) *
(phi_E - Z_E) + (C_jE0) / (1 - (phi_E - Z_E) / phi_E)^gamma_E
else
(C_jE0) / (1 - V_BE / phi_E)^gamma_E
(C_jE0) / (1 - V_EB / phi_E)^gamma_E
Comment on lines +303 to +307
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that's a typo, my bad. I'm surprised it wasn't caught in the tests, it thought I added some for all branches.

end
end

Expand Down
4 changes: 4 additions & 0 deletions src/Electrical/Digital/components.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
using ModelingToolkit: ODESystem, t_nounits as t
using ..Electrical: DigitalPin, _not, _and, _or, _xor
const System = ODESystem

# Adders
"""
```julia
Expand Down
4 changes: 4 additions & 0 deletions src/Electrical/Digital/gates.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
using ModelingToolkit: ODESystem, t_nounits as t
using ..Electrical: DigitalPin, _not, _and, _or, _xor
const System = ODESystem

"""
```julia
Not(; name)
Expand Down
4 changes: 4 additions & 0 deletions src/Electrical/Digital/sources.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
using ModelingToolkit: ODESystem, t_nounits as t
using ..Electrical: DigitalPin
const System = ODESystem

"""
```julia
PulseDiff(; name, Val = 1, dt = 0.1)
Expand Down
27 changes: 17 additions & 10 deletions src/Electrical/Electrical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using ..Thermal: HeatPort
using ..Mechanical.Rotational: Flange, Support
using ..Blocks: RealInput, RealOutput

export Pin, OnePort
export Pin, OnePort, DigitalPin
include("utils.jl")

export Capacitor,
Expand All @@ -30,14 +30,6 @@ include("Analog/mosfets.jl")
export NPN, PNP
include("Analog/transistors.jl")

# include("Digital/gates.jl")
# include("Digital/sources.jl")

# TODO:
# - digital
# - machines
# - multi-phase

export Logic
include("Digital/logic.jl")

Expand All @@ -47,7 +39,22 @@ export StdLogicVector, StdULogicVector,
include("Digital/logic_vectors.jl")

export LogicTable,
AndTable, OrTable, NotTable, XorTable
AndTable, OrTable, NotTable, XorTable,
_not, _and, _or, _xor
include("Digital/tables.jl")

export Not, And, Nand, Or, Nor, Xor, Xnor
include("Digital/gates.jl")

export HalfAdder, FullAdder, MUX, DEMUX, Encoder, Decoder
include("Digital/components.jl")

export PulseDiff, Set, Reset, Pulse
include("Digital/sources.jl")

# TODO:
# - digital
# - machines
# - multi-phase

end
13 changes: 7 additions & 6 deletions src/Mechanical/Translational/sensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Linear 1D force sensor, measures the force between two flanges.

# Connectors:

- `flange`: 1-dim. translational flange
- `output`: real output
- `flange_a`: 1-dim. translational flange ([`MechanicalPort`](@ref))
- `flange_b`: 1-dim. translational flange ([`MechanicalPort`](@ref))
- `output`: real output ([`RealOutput`](@ref))
"""
@mtkmodel ForceSensor begin
@components begin
Expand All @@ -33,8 +34,8 @@ Linear 1D position sensor.

# Connectors:

- `flange`: 1-dim. translational flange
- `output`: real output
- `flange`: 1-dim. translational flange ([`MechanicalPort`](@ref))
- `output`: real output ([`RealOutput`](@ref))
"""
@mtkmodel PositionSensor begin
@components begin
Expand Down Expand Up @@ -64,8 +65,8 @@ Linear 1D acceleration sensor.

# Connectors:

- `flange`: 1-dim. translational flange
- `output`: real output
- `flange`: 1-dim. translational flange ([`MechanicalPort`](@ref))
- `output`: real output ([`RealOutput`](@ref))
"""
@mtkmodel AccelerationSensor begin
@components begin
Expand Down
Loading