Skip to content

Conversation

ChrisRackauckas
Copy link
Member

Summary

This PR addresses multiple documentation issues reported in #399:

  • ✅ Missing docstrings for Digital Gates components
  • ✅ Incorrect variable usage in PNP transistor model
  • ✅ Missing cross-references in sensor documentation

Changes Made

Digital Module Fixes

  • Enabled previously commented-out Digital Gates module (gates.jl)
  • Enabled Digital Components module (components.jl)
  • Enabled Digital Sources module (sources.jl)
  • Added proper exports for all Digital components (Not, And, Nand, Or, Nor, Xor, Xnor, HalfAdder, FullAdder, MUX, DEMUX, Encoder, Decoder, PulseDiff, Set, Reset, Pulse)
  • Exported DigitalPin connector and logic functions (_not, _and, _or, _xor)
  • Reorganized module includes to ensure logic functions are loaded before components that use them

PNP Transistor Fix

  • Fixed incorrect variable reference in PNP transistor model where V_BE was used instead of V_EB in the advanced continuation equations (lines 303 and 307)

Documentation Cross-References

  • Added cross-references to MechanicalPort and RealOutput in:
    • AccelerationSensor
    • PositionSensor
    • ForceSensor

Test plan

  • Package precompiles successfully
  • Digital components are properly exported and accessible
  • No new test failures introduced

Fixes #399

🤖 Generated with Claude Code

- Enable Digital Gates module and add proper exports (Not, And, Nand, Or, Nor, Xor, Xnor)
- Enable Digital Components module and add exports (HalfAdder, FullAdder, MUX, DEMUX, Encoder, Decoder)
- Enable Digital Sources module and add exports (PulseDiff, Set, Reset, Pulse)
- Export DigitalPin connector and logic functions (_not, _and, _or, _xor)
- Fix PNP transistor variable error: changed V_BE to V_EB in lines 303 and 307
- Add cross-references to MechanicalPort and RealOutput in AccelerationSensor, PositionSensor, and ForceSensor documentation
- Reorganize Digital module includes to ensure logic functions are loaded before gates/components

These changes address missing docstrings and incorrect formatting mentioned in the issue.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comment on lines +303 to +307
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup documentation

2 participants