Skip to content
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

Fix .PLOT directive #163

Merged
merged 2 commits into from
Oct 19, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,33 @@ private void AddPlotToResultIfValid(string plotImage, IReadingContext context, X
}
else
{
context.Result.ValidationResult.AddError(ValidationEntrySource.Reader, $"{plotImage} is not valid for: {simulation.Name}");
context.Result.ValidationResult.AddError(ValidationEntrySource.Reader, $"{plotImage} is not valid for: {simulation.Name}");
}
}

private void CreatePointForSeries(ISimulationWithEvents simulation, IReadingContext context, object eventArgs, List<Export> exports, List<Series> series)
{
double x = 0;

//TODO
if (simulation is Transient transient)
{
x = transient.Time;
}

if (simulation is AC frequency)
{
x = frequency.Frequency;
}

if (simulation is Noise noise)
{
x = noise.Frequency;
}

if (simulation is DC dc)
{
x = dc.GetCurrentSweepValue().FirstOrDefault();
}

for (var i = 0; i < exports.Count; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SpiceSharpParser/SpiceSharpParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<StartupObject />
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>latest</LangVersion>
<Version>3.2.0</Version>
<Version>3.2.1</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.5|AnyCPU'">
Expand Down
Loading