Skip to content

Commit

Permalink
Plotting: minor fixes for DaisyPlot and GeneralDataPlot
Browse files Browse the repository at this point in the history
One of the fixes is for multi-platform support since the original assumed
a uppercased string would not change the target filename.
  • Loading branch information
PMeira committed Jul 25, 2022
1 parent 284d607 commit e5b99d7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Executive/PlotOptions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function ColorToHTML(const c: Integer): String;
function DoPlotCmd(DSS: TDSSContext): Integer;
// Parse plot options and feed the callback function, if any
var
ParamName, Param: String;
ParamName, Param, ParamOriginal: String;
ParamPointer, i: Integer;
DblBuffer: array[0..50] of Double;
NumChannels: Integer;
Expand Down Expand Up @@ -215,7 +215,8 @@ function DoPlotCmd(DSS: TDSSContext): Integer;
// Get next parameter on command line
ParamPointer := 0;
ParamName := AnsiUpperCase(Parser.NextParam);
Param := AnsiUpperCase(Parser.StrValue);
ParamOriginal := Parser.StrValue;
Param := AnsiUpperCase(ParamOriginal);
while Length(Param) > 0 do
begin
// Interpret Parameter
Expand Down Expand Up @@ -385,7 +386,7 @@ function DoPlotCmd(DSS: TDSSContext): Integer;
if Parser.IntValue > 0 then
MaxLineThickness := Parser.IntValue;
17:
InterpretTStringListArray(DSS, Param, DaisyBusList); // read in Bus list
InterpretTStringListArray(DSS, ParamOriginal, DaisyBusList); // read in Bus list
18:
begin
MinScale := Parser.DblValue;
Expand Down Expand Up @@ -432,7 +433,8 @@ function DoPlotCmd(DSS: TDSSContext): Integer;


ParamName := AnsiUpperCase(Parser.NextParam);
Param := AnsiUpperCase(Parser.StrValue);
ParamOriginal := Parser.StrValue;
Param := AnsiUpperCase(ParamOriginal);
end;

if not ActiveCircuit.Issolved then
Expand All @@ -442,7 +444,7 @@ function DoPlotCmd(DSS: TDSSContext): Integer;
try
jsonDaisyBusList := TJSONArray.Create();
for i := 1 to DaisyBusList.Count do
jsonDaisyBusList.Add(DaisyBusList[i]);
jsonDaisyBusList.Add(DaisyBusList[i - 1]);

jsonChannels := TJSONArray.Create();
for i := 0 to High(Channels) do
Expand Down

0 comments on commit e5b99d7

Please sign in to comment.