summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-08-03 16:00:12 +0200
committerErich Eckner <git@eckner.net>2018-08-03 16:00:12 +0200
commitd3946d1bc558854811213817f718a603fe62b088 (patch)
treed039be7075b441bd32a4052e0911ddc90b984125
parent229ddeb3d3a6c600606d3189bb30d0bd3edb0984 (diff)
downloadROM-d3946d1bc558854811213817f718a603fe62b088.tar.xz
subzykel-Verschiebung sollte nicht in absShift landen
-rw-r--r--ROM.lps87
-rw-r--r--romunit.pas29
2 files changed, 53 insertions, 63 deletions
diff --git a/ROM.lps b/ROM.lps
index fae3e1e..d1a363d 100644
--- a/ROM.lps
+++ b/ROM.lps
@@ -7,9 +7,9 @@
<Unit0>
<Filename Value="ROM.lpr"/>
<IsPartOfProject Value="True"/>
- <TopLine Value="177"/>
- <CursorPos X="19" Y="206"/>
- <UsageCount Value="110"/>
+ <TopLine Value="173"/>
+ <CursorPos X="140" Y="186"/>
+ <UsageCount Value="111"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@@ -17,10 +17,10 @@
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="775"/>
- <CursorPos X="20" Y="800"/>
+ <TopLine Value="592"/>
+ <CursorPos X="47" Y="620"/>
<FoldState Value=" T3iC04043T"/>
- <UsageCount Value="110"/>
+ <UsageCount Value="111"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
@@ -28,7 +28,7 @@
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos Y="10"/>
- <UsageCount Value="109"/>
+ <UsageCount Value="110"/>
</Unit2>
<Unit3>
<Filename Value="../units/matheunit.pas"/>
@@ -59,121 +59,122 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="ROM.lpr"/>
- <Caret Line="16" Column="42"/>
+ <Caret Line="40" TopLine="22"/>
</Position1>
<Position2>
<Filename Value="ROM.lpr"/>
- <Caret Line="243" Column="9" TopLine="242"/>
+ <Caret Line="117" TopLine="100"/>
</Position2>
<Position3>
<Filename Value="ROM.lpr"/>
- <Caret Line="16" Column="42"/>
+ <Caret Line="216" Column="56" TopLine="198"/>
</Position3>
<Position4>
<Filename Value="ROM.lpr"/>
- <Caret Line="238" Column="45" TopLine="209"/>
+ <Caret Line="250" Column="22" TopLine="219"/>
</Position4>
<Position5>
- <Filename Value="ROM.lpr"/>
- <Caret Line="241" Column="15" TopLine="212"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="30" TopLine="28"/>
</Position5>
<Position6>
<Filename Value="ROM.lpr"/>
- <Caret Line="225" Column="3" TopLine="204"/>
+ <Caret Line="19" Column="58"/>
</Position6>
<Position7>
<Filename Value="ROM.lpr"/>
+ <Caret Line="37" TopLine="19"/>
</Position7>
<Position8>
<Filename Value="ROM.lpr"/>
- <Caret Line="284" Column="42" TopLine="257"/>
+ <Caret Line="99" TopLine="83"/>
</Position8>
<Position9>
<Filename Value="ROM.lpr"/>
- <Caret Line="19" Column="58" TopLine="3"/>
+ <Caret Line="19" Column="7"/>
</Position9>
<Position10>
<Filename Value="ROM.lpr"/>
- <Caret Line="40" TopLine="22"/>
+ <Caret Line="36" Column="7" TopLine="7"/>
</Position10>
<Position11>
<Filename Value="ROM.lpr"/>
- <Caret Line="117" TopLine="100"/>
+ <Caret Line="95" Column="26" TopLine="66"/>
</Position11>
<Position12>
<Filename Value="ROM.lpr"/>
- <Caret Line="216" Column="56" TopLine="198"/>
+ <Caret Line="96" Column="11" TopLine="67"/>
</Position12>
<Position13>
<Filename Value="ROM.lpr"/>
- <Caret Line="250" Column="22" TopLine="219"/>
+ <Caret Line="205" Column="18" TopLine="176"/>
</Position13>
<Position14>
<Filename Value="romunit.pas"/>
- <Caret Line="30" TopLine="28"/>
+ <Caret Line="30"/>
</Position14>
<Position15>
- <Filename Value="ROM.lpr"/>
- <Caret Line="19" Column="58"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="888" Column="63" TopLine="871"/>
</Position15>
<Position16>
- <Filename Value="ROM.lpr"/>
- <Caret Line="37" TopLine="19"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="1009" TopLine="975"/>
</Position16>
<Position17>
- <Filename Value="ROM.lpr"/>
- <Caret Line="99" TopLine="83"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="13" Column="64"/>
</Position17>
<Position18>
- <Filename Value="ROM.lpr"/>
- <Caret Line="19" Column="7"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="272" Column="22" TopLine="243"/>
</Position18>
<Position19>
- <Filename Value="ROM.lpr"/>
- <Caret Line="36" Column="7" TopLine="7"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="276" Column="47" TopLine="265"/>
</Position19>
<Position20>
- <Filename Value="ROM.lpr"/>
- <Caret Line="95" Column="26" TopLine="66"/>
+ <Filename Value="romunit.pas"/>
</Position20>
<Position21>
- <Filename Value="ROM.lpr"/>
- <Caret Line="96" Column="11" TopLine="67"/>
+ <Filename Value="romunit.pas"/>
+ <Caret Line="30" Column="23"/>
</Position21>
<Position22>
<Filename Value="ROM.lpr"/>
- <Caret Line="205" Column="18" TopLine="176"/>
+ <Caret Line="206" Column="19" TopLine="153"/>
</Position22>
<Position23>
<Filename Value="romunit.pas"/>
- <Caret Line="30"/>
+ <Caret Line="11" Column="24"/>
</Position23>
<Position24>
<Filename Value="romunit.pas"/>
- <Caret Line="888" Column="63" TopLine="871"/>
+ <Caret Line="62" Column="71" TopLine="47"/>
</Position24>
<Position25>
<Filename Value="romunit.pas"/>
- <Caret Line="1009" TopLine="975"/>
+ <Caret Line="11" Column="77"/>
</Position25>
<Position26>
<Filename Value="romunit.pas"/>
- <Caret Line="13" Column="64"/>
+ <Caret Line="27" Column="22"/>
</Position26>
<Position27>
<Filename Value="romunit.pas"/>
- <Caret Line="272" Column="22" TopLine="243"/>
+ <Caret Line="49" Column="91" TopLine="20"/>
</Position27>
<Position28>
<Filename Value="romunit.pas"/>
- <Caret Line="276" Column="47" TopLine="265"/>
+ <Caret Line="62" Column="77" TopLine="56"/>
</Position28>
<Position29>
<Filename Value="romunit.pas"/>
+ <Caret Line="146" Column="15" TopLine="118"/>
</Position29>
<Position30>
<Filename Value="romunit.pas"/>
- <Caret Line="30" Column="23"/>
+ <Caret Line="206" Column="84" TopLine="193"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/romunit.pas b/romunit.pas
index 7782814..a3289c5 100644
--- a/romunit.pas
+++ b/romunit.pas
@@ -594,29 +594,18 @@ end;
procedure gesamtverschiebung(var inPuls,outPuls: tExtPointArray; var absShift: extended);
var
- iMax,oMax,i: longint;
+ oMin,i: longint;
begin
- iMax:=0;
- for i:=1 to length(inPuls)-1 do
- if inPuls[i]['y']>inPuls[iMax]['y'] then
- iMax:=i;
- oMax:=0;
- for i:=1 to length(outPuls)-1 do
- if outPuls[i]['y']>outPuls[oMax]['y'] then
- oMax:=i;
- if absShift<-0.9e9 then
- absShift:=outPuls[oMax]['x']-inPuls[iMax]['x']
- else
- absShift:=(outPuls[oMax]['x']-inPuls[iMax]['x'])-round((outPuls[oMax]['x']-inPuls[iMax]['x'])-absShift);
-
for i:=0 to length(outPuls)-1 do
outPuls[i]['x']:=outPuls[i]['x']-absShift;
- oMax:=0;
- while (oMax<length(outPuls)) and (outPuls[oMax]['x']<inPuls[0]['x']) do
- inc(oMax);
- for i:=oMax to length(outPuls)-1 do
- outPuls[i-oMax]:=outPuls[i];
- setlength(outPuls,length(outPuls)-oMax);
+ oMin:=0;
+ while (oMin<length(outPuls)) and (outPuls[oMin]['x']<inPuls[0]['x']) do
+ inc(oMin);
+ if oMin>0 then
+ dec(oMin);
+ for i:=oMin to length(outPuls)-1 do
+ outPuls[i-oMin]:=outPuls[i];
+ setlength(outPuls,length(outPuls)-oMin);
cut(inPuls,outPuls[length(outPuls)-1]['x']);
writeln(stderr,'Die konstante Verschiebung wurde auf '+floattostr(absShift)+' T optimiert.');
end;