Browse Source

Merge branch 'develop'

Wilfried Klaas 3 years ago
parent
commit
77f1113999
16 changed files with 364 additions and 93 deletions
  1. 7 4
      Beispiele/Tone.tps
  2. 14 0
      Beispiele/servos.tps
  3. 6 0
      README.md
  4. 4 4
      SPS_EMU.000
  5. 3 1
      SPS_EMU.001
  6. 195 0
      SPS_EMU.043
  7. 3 1
      SPS_EMU.044
  8. 3 1
      SPS_EMU.049
  9. 28 27
      SPS_Emu.lpi
  10. 4 1
      SPS_Emu.lpr
  11. BIN
      SPS_Emu.lsu
  12. 1 0
      build.cmd
  13. 4 0
      release.cmd
  14. 24 15
      ugui.lfm
  15. 10 0
      ugui.pas
  16. 58 39
      usps.pas

+ 7 - 4
Beispiele/Tone.tps

@@ -1,7 +1,10 @@
 #TPS:BBC micro:bit V2
 0x00,4,0,""
 0x01,0,3,""
-0x02,7,1,""
-0x03,2,6,""
-0x04,3,3,""
-0x05,F,F,""
+0x02,C,C,""
+0x03,7,1,""
+0x04,2,6,""
+0x05,3,4,""
+0x06,F,F,""
+0x07,0,0,""
+0x08,0,0,""

+ 14 - 0
Beispiele/servos.tps

@@ -0,0 +1,14 @@
+#TPS:Willies SPS Arduino
+0x00,0,0,""
+0x01,7,1,""
+0x02,5,4,""
+0x03,5,B,""
+0x04,5,C,""
+0x05,2,8,""
+0x06,C,C,""
+0x07,3,6,""
+0x08,3,0,""
+0x09,0,0,""
+0x0A,0,0,""
+0x0B,0,0,""
+0x0C,0,0,""

+ 6 - 0
README.md

@@ -1,4 +1,10 @@
 # **SPS_Emulator Version History**
+**12.06.2021 Version 0.2.1.100**
+
+  * Bug: On PCs with an unknown language, the user interface shows internal LSU keys (ID _ #####). Now the user interface starts with English as the default
+  * Feature: Austrian language added
+  * Feature: When executing in the emulator, the delay command can now be bypassed.
+
 **10.06.2021 Version 0.2.1.94**
 
   * Bug: more stable auto programming feature, now for the ArduinoSPS, too.

+ 4 - 4
SPS_EMU.000

@@ -2,9 +2,9 @@
 LSUTextFile=1
 Copyrigth=MCS Media Computer Software
 [LSUInfo]
-CompileDate=10.06.2021
-CompileTime=10:47:50
+CompileDate=12.06.2021
+CompileTime=09:51:47
 Name=Wilfried Klaas
-LSUBinFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.lsu
-LSUTextFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.
+LSUBinFile=.\SPS_EMU.lsu
+LSUTextFile=.\SPS_EMU.
 RegString=

+ 3 - 1
SPS_EMU.001

@@ -46,7 +46,7 @@ ID_EXAMPLE=Load example from web
 
 [infobox]
 ID_APPTITLE=TPS/PLC Emulator
-ID_COPYRIGHT=MCS (C) 2020 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
+ID_COPYRIGHT=MCS (C) 2021 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
 
 [form1Captions]
 ID_TPS_VERSION=PLC target: 
@@ -63,6 +63,7 @@ ID_INPUT_3=Input &3
 ID_INPUT_2=Input &2
 ID_INPUT_1=Input &1
 ID_REFRESH_ADDR=Refresh address
+ID_IGNORE_DELAY=Ignore Delay
 ID_MNEMONIC=Instruction
 ID_MNE_DATA=Data
 ID_CAPTION=TPS/PLC Emulator
@@ -94,6 +95,7 @@ ID_INPUT_3=Input 3
 ID_INPUT_2=Input 2
 ID_INPUT_1=Input 1
 ID_REFRESH_ADDR=Refresh address
+ID_IGNORE_DELAY=on execution ignore any delay command
 ID_MNEMONIC=Instruction
 ID_MNE_DATA=Data
 ID_CAPTION=

+ 195 - 0
SPS_EMU.043

@@ -0,0 +1,195 @@
+[LSUOptions]
+LSUTextFile=1
+
+[form1Buttons]
+ID_EXIT=B&eenden
+ID_NEW=&Neu
+ID_OPEN=Ö&ffnen
+ID_SAVE=&Speichern
+ID_SAVE_AS=&Speichern als
+ID_NEWLINE=Neue &Zeile
+ID_DELLINE=Zeile löschen
+ID_PRGFILE=Programmierdatei
+ID_PRGULOAD=Upload
+ID_HEXFILE=HEX Datei erzeugen
+ID_EXEC_STATEMENT=Befehl ausführen
+ID_EXEC_NEXT=Nächster Schritt
+ID_EXEC_STOP=Debuggen stoppen
+ID_EXEC_DEBUG=Programm starten/stoppen
+ID_ABOUT=&Über
+ID_RESETPRESETS=R
+ID_SAVEPRESETS=S
+ID_LOADPRESETS=L
+ID_NEXT_INSERT=
+
+[form1ButtonHints]
+ID_EXIT=Beenden
+ID_NEW=Neue Datei erzeugen
+ID_OPEN=Datei öffnen
+ID_SAVE=Aktuelle Datei speichern
+ID_SAVE_AS=Datei speichern unter
+ID_NEWLINE=Neue Zeile hinzufügen
+ID_DELLINE=Aktuelle Zeile löschen
+ID_PRGFILE=Programmierdatei anzeigen
+ID_PRGULOAD=Programm übertragen
+ID_HEXFILE=HEX Datei erzeugen
+ID_EXEC_STATEMENT=Einzelnen Befehl ausführen
+ID_EXEC_NEXT=Nächsten Schritt ausführen
+ID_EXEC_STOP=Debuggen stoppen
+ID_EXEC_DEBUG=Programm starten/stoppen
+ID_ABOUT=Über dieses Programm
+ID_RESETPRESETS=Einstellungen zurücksetzen
+ID_LOADPRESETS=Presets aus Datei laden
+ID_SAVEPRESETS=Presets in Datei speichern
+ID_NEXT_INSERT=nächste Zeile, wenn nötig, lege neue Zeile an
+ID_EXAMPLE=Beispiele aus dem Internet laden
+
+[infobox]
+ID_APPTITLE=TPS/SPS Emulator
+ID_COPYRIGHT=MCS (C) 2021 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
+
+[form1Captions]
+ID_TPS_VERSION=TPS Zielsystem: 
+ID_OUTPUT=Ausgänge
+ID_INPUT=Eingänge
+ID_INTERNAL_DATA=Interne Daten
+ID_CONTROL=Steuerung
+ID_OUTPUT_1=Ausgang 1
+ID_OUTPUT_2=Ausgang 2
+ID_OUTPUT_3=Ausgang 3
+ID_OUTPUT_4=Ausgang 4
+ID_INPUT_4=Eingang &4
+ID_INPUT_3=Eingang &3
+ID_INPUT_2=Eingang &2
+ID_INPUT_1=Eingang &1
+ID_REFRESH_ADDR=Adresse aktualisieren
+ID_IGNORE_DELAY=Delay ignorieren
+ID_MNEMONIC=Befehle
+ID_MNE_DATA=Daten
+ID_CAPTION=TPS/SPS Emulator
+ID_GRID_STORAGE=Speicher
+ID_GRID_MNEMONIC=Befehl
+ID_GRID_DATA=Daten
+ID_GRID_DESCRIPTION=Beschr.
+ID_GRID_COMMENT=Notizen
+ID_SAVE_TPS=Datei sichern als
+ID_SAVE_HEX=Datei sichern als
+ID_SAVE_BIN=Datei sichern als
+ID_OPEN=Programm öffnen
+ID_SAVE=Programm speichern
+ID_SAVE_AS=Programm speichern untern
+ID_CLICK_HERE= oder clicken sie hier.
+ 
+[form1Hints]
+ID_TPS_VERSION=TPS Zielsystem für dieses Programm
+ID_OUTPUT=Ausgänge
+ID_INPUT=Eingänge
+ID_INTERNAL_DATA=Interne Daten
+ID_CONTROL=Steuerung
+ID_OUTPUT_1=Ausgang 1
+ID_OUTPUT_2=Ausgang 2
+ID_OUTPUT_3=Ausgang 3
+ID_OUTPUT_4=Ausgang 4
+ID_INPUT_4=Eingang 4
+ID_INPUT_3=Eingang 3
+ID_INPUT_2=Eingang 2
+ID_INPUT_1=Eingang 1
+ID_REFRESH_ADDR=Adresse aktualisieren
+ID_IGNORE_DELAY=Delay bei der Ausführung ignorieren
+ID_MNEMONIC=Befehle
+ID_MNE_DATA=Daten
+ID_CAPTION=
+ID_GRID_STORAGE=
+ID_GRID_MNEMONIC=
+ID_GRID_DATA=
+ID_GRID_DESCRIPTION=
+ID_GRID_COMMENT=
+ID_BTN_PRG_SEL=PRG selektiert
+ID_BTN_PRG_NON=PRG nicht selektiert
+ID_BTN_SEL_SEL=SEL selektiert
+ID_BTN_SEL_NON=SEL nicht selektiert
+
+
+[form2Captions]
+ID_CAPTION=Programmdatei
+
+[form2Hints]
+ID_CAPTION= 
+
+[form2Buttons]
+ID_CLOSE=&Schliessen
+
+[form2ButtonHints]
+ID_CLOSE=Fenster schliessen
+
+[form1Filter]
+ID_SAVE_TPS=TPS/SPS Dateien (*.tps)|*.tps|alle Dateien (*.*)|*.*
+ID_SAVE_HEX=Intel Hex File (*.hex)|*.hex|alle Dateien (*.*)|*.*
+ID_OPEN=TPS/SPS Dateien (*.tps)|*.tps|alle Dateien (*.*)|*.*
+ID_SAVE=TPS/SPS Dateien (*.tps)|*.tps|alle Dateien (*.*)|*.*
+ID_SAVE_BIN=Binärdatei (*)|*|alle Dateien (*.*)|*.*
+
+[form1Action]
+ID_EXIT=B&eenden
+ID_OPEN=Öffnen
+ID_SAVE=Speichern
+ID_DEBUG=Start/Stop
+ID_NEXT_STEP=Nächster Schritt
+ID_STOP=Debug Stop
+ID_EXEC_MNEMONIC=Befehl ausführen
+ID_SHOW_HEX=HEX Datei anzeigen
+ID_UPLOAD=Programm übertragen
+ID_NEW=Neues Programm
+ID_NEW_ROW=Neue Zeile
+ID_DEL_ROW=Zeile löschen
+ID_SAVE_FILE=Datei speichern
+ID_ABOUT=Über
+ID_HEX_FILE=HEX Datei erzeugen
+
+[form1ActionHints]
+ID_EXIT=Programm beenden
+ID_OPEN=Programm öffnen
+ID_SAVE=Programm speichern
+ID_DEBUG=Programm starten/stoppen
+ID_NEXT_STEP=Nächster Schritt ausführen
+ID_STOP=Debuggen Stoppen
+ID_EXEC_MNEMONIC=Befehl ausführen
+ID_SHOW_HEX=HEX Datei anzeigen
+ID_UPLOAD=Programm übertragen
+ID_NEW=Neues Programm
+ID_NEW_ROW=Neue Zeile
+ID_DEL_ROW=Zeile löschen
+ID_SAVE_FILE=Datei speichern
+ID_ABOUT=Über
+ID_HEX_FILE=HEX Datei erzeugen
+
+[statusbar]
+ID_SPS_START=SPS starten
+ID_SPS_RUNNING=SPS läuft
+ID_SPS_STOPPED=SPS gestopped
+ID_SPS_PROGRAMMING=SPS programmieren
+
+[hexfile]
+ID_START_LINE=Addr   BD   Befehl   Daten     Kommentar
+
+[MessagesMSG]
+ID_MB_WARNINGT=Warnung
+ID_MB_QUESTIONT=Frage
+ID_MB_INFOT=Information
+SAVE_CHANGESM=Die Datei wurde geändert. Wollen Sie die Änderungen speichern?
+ID_UPLOAD_OKM=Pogramm übertragen.
+ID_NOT_READYM=Arduino antwortet nicht. Evtl. Arduino nicht angeschlossen, SEL nicht gedrückt oder falsche Firmware?
+ID_PRG_TO_LONGM=Das Program ist zu lang für die selektierte Hardware.
+
+[frmSelectComCaptions]
+ID_COMPORT=Schnittstelle
+ID_ARDUINO_INST=Arduinoinstallation
+ID_COMMENT=Bitte wählen Sie die Schnittstelle des Arduino.
+ID_COMMAND_HINT=Zum Upload halten Sie bitte die SEL Taste gedrückt bis eine Meldung erscheint.
+
+[frmSelectComHints]
+ID_COMPORT=
+ID_ARDUINO_INST=
+ID_COMMENT=
+[LSUOptions]
+LSUTextFile=1

+ 3 - 1
SPS_EMU.044

@@ -46,7 +46,7 @@ ID_EXAMPLE=Load example from web
 
 [infobox]
 ID_APPTITLE=TPS/PLC Emulator
-ID_COPYRIGHT=MCS (C) 2020 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
+ID_COPYRIGHT=MCS (C) 2021 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
 
 [form1Captions]
 ID_TPS_VERSION=PLC target: 
@@ -63,6 +63,7 @@ ID_INPUT_3=Input &3
 ID_INPUT_2=Input &2
 ID_INPUT_1=Input &1
 ID_REFRESH_ADDR=Refresh address
+ID_IGNORE_DELAY=Ignore Delay
 ID_MNEMONIC=Instruction
 ID_MNE_DATA=Data
 ID_CAPTION=TPS/PLC Emulator
@@ -94,6 +95,7 @@ ID_INPUT_3=Input 3
 ID_INPUT_2=Input 2
 ID_INPUT_1=Input 1
 ID_REFRESH_ADDR=Refresh address
+ID_IGNORE_DELAY=on execution ignore any delay command
 ID_MNEMONIC=Instruction
 ID_MNE_DATA=Data
 ID_CAPTION=

+ 3 - 1
SPS_EMU.049

@@ -46,7 +46,7 @@ ID_EXAMPLE=Beispiele aus dem Internet laden
 
 [infobox]
 ID_APPTITLE=TPS/SPS Emulator
-ID_COPYRIGHT=MCS (C) 2020 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
+ID_COPYRIGHT=MCS (C) 2021 Wilfried Klaas #13#10 EMail: w.klaas@gmx.de
 
 [form1Captions]
 ID_TPS_VERSION=TPS Zielsystem: 
@@ -63,6 +63,7 @@ ID_INPUT_3=Eingang &3
 ID_INPUT_2=Eingang &2
 ID_INPUT_1=Eingang &1
 ID_REFRESH_ADDR=Adresse aktualisieren
+ID_IGNORE_DELAY=Delay ignorieren
 ID_MNEMONIC=Befehle
 ID_MNE_DATA=Daten
 ID_CAPTION=TPS/SPS Emulator
@@ -94,6 +95,7 @@ ID_INPUT_3=Eingang 3
 ID_INPUT_2=Eingang 2
 ID_INPUT_1=Eingang 1
 ID_REFRESH_ADDR=Adresse aktualisieren
+ID_IGNORE_DELAY=Delay bei der Ausführung ignorieren
 ID_MNEMONIC=Befehle
 ID_MNE_DATA=Daten
 ID_CAPTION=

+ 28 - 27
SPS_Emu.lpi

@@ -23,7 +23,7 @@
       <AutoIncrementBuild Value="True"/>
       <MinorVersionNr Value="2"/>
       <RevisionNr Value="1"/>
-      <BuildNr Value="95"/>
+      <BuildNr Value="101"/>
       <Language Value="0407"/>
       <StringTable CompanyName="MCS" FileDescription="TPS/SPS Emulator" InternalName="SPS_EMU" LegalCopyright="MCS (C) Wilfried Klaas" OriginalFilename="SPS_EMU.exe" ProductName="TPS/SPS Emulator" ProductVersion="0.2"/>
     </VersionInfo>
@@ -68,7 +68,7 @@
         <PackageName Value="LCL"/>
       </Item3>
     </RequiredPackages>
-    <Units Count="10">
+    <Units Count="15">
       <Unit0>
         <Filename Value="SPS_Emu.lpr"/>
         <IsPartOfProject Value="True"/>
@@ -134,6 +134,26 @@
         <ComponentName Value="Form3"/>
         <ResourceBaseClass Value="Form"/>
       </Unit9>
+      <Unit10>
+        <Filename Value="SPS_EMU.000"/>
+        <IsPartOfProject Value="True"/>
+      </Unit10>
+      <Unit11>
+        <Filename Value="SPS_EMU.001"/>
+        <IsPartOfProject Value="True"/>
+      </Unit11>
+      <Unit12>
+        <Filename Value="SPS_EMU.043"/>
+        <IsPartOfProject Value="True"/>
+      </Unit12>
+      <Unit13>
+        <Filename Value="SPS_EMU.044"/>
+        <IsPartOfProject Value="True"/>
+      </Unit13>
+      <Unit14>
+        <Filename Value="SPS_EMU.049"/>
+        <IsPartOfProject Value="True"/>
+      </Unit14>
     </Units>
   </ProjectOptions>
   <CompilerOptions>
@@ -159,30 +179,11 @@
         </Win32>
       </Options>
     </Linking>
+    <Other>
+      <ExecuteAfter>
+        <Command Value="C:\e-platte\daten\git-sourcen\LCC_Compiler\lcc.exe /B /C /Q &quot;$TargetFile()&quot;"/>
+        <CompileReasons Compile="False" Run="False"/>
+      </ExecuteAfter>
+    </Other>
   </CompilerOptions>
-  <Debugging>
-    <Exceptions Count="7">
-      <Item1>
-        <Name Value="EAbort"/>
-      </Item1>
-      <Item2>
-        <Name Value="ECodetoolError"/>
-      </Item2>
-      <Item3>
-        <Name Value="EFOpenError"/>
-      </Item3>
-      <Item4>
-        <Name Value="Exception"/>
-      </Item4>
-      <Item5>
-        <Name Value="EScannerError"/>
-      </Item5>
-      <Item6>
-        <Name Value="RunError(103)"/>
-      </Item6>
-      <Item7>
-        <Name Value="EInOutError"/>
-      </Item7>
-    </Exceptions>
-  </Debugging>
 </CONFIG>

+ 4 - 1
SPS_Emu.lpr

@@ -13,13 +13,16 @@ uses
 {$R *.res}
 
 var path : string;
+    code : integer;
 begin
   path := ParamStr(0);
   RequireDerivedFormResource := True;
   Application.Scaled:=True;
   Application.Initialize;
   MCSLSU.LSUSetDebug(false);
-  MCSLSU.LSUInit(path, NOR_Mode, GetLNGCode);
+  code := MCSLSU.LSUInit(path, NOR_Mode, GetLNGCode);
+  if code = R_LNG_Not_Supp then
+    code := MCSLSU.LSUInit(path, NOR_Mode, 44);
 
   Application.CreateForm(TForm1, Form1);
   Application.CreateForm(TForm2, Form2);

BIN
SPS_Emu.lsu


+ 1 - 0
build.cmd

@@ -0,0 +1 @@
+lazbuild sps_emu.lpi

+ 4 - 0
release.cmd

@@ -0,0 +1,4 @@
+lazbuild -B sps_emu.lpi
+lcc /B /C /Q .\SPS_EMU.EXE
+"C:\Program Files\7-Zip\7z.exe" a SPS_EMU.ZIP SPS_EMU.EXE
+copy SPS_EMU.ZIP dist\SPS_EMU.ZIP

+ 24 - 15
ugui.lfm

@@ -655,6 +655,16 @@ object Form1: TForm1
         ParentFont = False
         TabOrder = 0
       end
+      object cbIgnDly: TCheckBox
+        Left = 173
+        Height = 24
+        Top = 5
+        Width = 148
+        Caption = 'ID_IGNORE_DELAY'
+        OnChange = cbIgnDlyChange
+        ParentFont = False
+        TabOrder = 1
+      end
     end
   end
   object ToolBar1: TToolBar
@@ -715,9 +725,9 @@ object Form1: TForm1
       Caption = 'ID_EXEC_DEBUG'
     end
     object cbTPSVersion: TComboBox
-      Left = 664
+      Left = 640
       Height = 28
-      Top = 6
+      Top = 5
       Width = 125
       Align = alClient
       AutoSize = False
@@ -738,10 +748,9 @@ object Form1: TForm1
     object Label3: TLabel
       Left = 528
       Height = 26
-      Top = 8
-      Width = 128
+      Top = 5
+      Width = 104
       Align = alClient
-      Alignment = taCenter
       Caption = 'ID_TPS_VERSION'
       Layout = tlCenter
       ParentColor = False
@@ -810,14 +819,14 @@ object Form1: TForm1
       Style = tbsDivider
     end
     object ToolButton18: TToolButton
-      Left = 789
+      Left = 765
       Top = 2
       Action = acHelpAbout
     end
     object MCSLabel: TLabel
-      Left = 824
+      Left = 801
       Height = 26
-      Top = 8
+      Top = 5
       Width = 97
       Align = alClient
       AutoSize = False
@@ -1156,8 +1165,8 @@ object Form1: TForm1
       end>
     OnSavingProperties = XMLPropStorage1SavingProperties
     OnRestoringProperties = XMLPropStorage1RestoringProperties
-    Left = 980
-    Top = 620
+    Left = 496
+    Top = 624
   end
   object SaveDialog1: TSaveDialog
     Title = 'ID_SAVE_TPS'
@@ -1181,8 +1190,8 @@ object Form1: TForm1
   object ImageList2: TImageList
     Height = 32
     Width = 32
-    Left = 698
-    Top = 670
+    Left = 540
+    Top = 664
     Bitmap = {
       4C6969010000200000002000000080804000808040007C7C3EFF484824FF1A1A
       0DFF040402FF040402FF1A1A0DFF484824FF7C7C3EFF80804000808040008080
@@ -47404,7 +47413,7 @@ object Form1: TForm1
     FlowControl = fcNone
     StopBits = sbOne
     Device = 'COM1'
-    Left = 820
+    Left = 624
     Top = 620
   end
   object pmExamples: TPopupMenu
@@ -47419,8 +47428,8 @@ object Form1: TForm1
   object ImageList3: TImageList
     Height = 20
     Width = 20
-    Left = 780
-    Top = 670
+    Left = 496
+    Top = 664
     Bitmap = {
       4C69690100001400000014000000FFFFFF00BABABA3E333333C5020202FA1111
       11E96C6C6C8CF3F3F309FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF

+ 10 - 0
ugui.pas

@@ -35,6 +35,7 @@ type
     ActionList1: TActionList;
     acFileOpen: TFileOpen;
     btnTone: TBitBtn;
+    cbIgnDly: TCheckBox;
     cbTPSVersion: TComboBox;
     cbAdrActual: TCheckBox;
     EditDelay: TLabeledEdit;
@@ -164,6 +165,7 @@ type
     procedure btnToneClick(Sender: TObject);
     procedure cbCommandChange(Sender: TObject);
     procedure cbDataChange(Sender: TObject);
+    procedure cbIgnDlyChange(Sender: TObject);
     procedure cbTPSVersionChange(Sender: TObject);
     procedure FormActivate(Sender: TObject);
     procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
@@ -271,6 +273,7 @@ begin
   ToolButton18.Align := alRight;
   MCSLabel.Align := alRight;
   cbAdrActual.Enabled := False;
+  cbIgnDly.Enabled := False;
   checkPresets();
   tbResetClick(nil);
   if Application.ParamCount >= 1 then
@@ -645,6 +648,7 @@ begin
     acDebug.Enabled := True;
     acDebug.ImageIndex := 57;
     cbAdrActual.Enabled := True;
+    cbIgnDly.Enabled:= True;
     acNextStep.Enabled := False;
     // sps programmieren
     programSps();
@@ -786,6 +790,7 @@ begin
   end;
   // endekennzeichnung schreiben
   sps.writeEEProm(i, $ff);
+  sps.setIgnoreDelay(cbIgnDly.Checked);
 end;
 
 procedure TForm1.acNextStepExecute(Sender: TObject);
@@ -1340,6 +1345,11 @@ begin
   end;
 end;
 
+procedure TForm1.cbIgnDlyChange(Sender: TObject);
+begin
+  sps.SetIgnoreDelay(cbIgnDly.Checked);
+end;
+
 procedure TForm1.cbTPSVersionChange(Sender: TObject);
 begin
   if (cbTPSVersion.ItemIndex = 0) then

+ 58 - 39
usps.pas

@@ -206,6 +206,7 @@ type
     gesture: byte;
     soundLevel: byte;
     lightLevel: byte;
+    ignoreDelay: boolean;
 
     errorMessage: string;
 
@@ -272,10 +273,10 @@ type
     procedure break();
     procedure doSingleCommand(command: byte);
     procedure preFetch();
-    function getLastError():string;
+    function getLastError(): string;
 
     procedure writeEEProm(adr: word; Data: byte);
-    function getE2E():word;
+    function getE2E(): word;
 
     function isActive(): boolean;
     function isDelayActive(): boolean;
@@ -292,6 +293,8 @@ type
     function getFRegister(): byte;
 
     procedure setTPSVersion(tpsversion: TTPSVersion);
+    procedure setIgnoreDelay(ignDly: boolean);
+    function isIgnoreDelay(): boolean;
 
     procedure getCommands(list: TStrings);
     procedure getDatas(cmd: byte; list: TStrings);
@@ -436,7 +439,7 @@ end;
 procedure TSPS.nextStep();
 var
   Value: byte;
-  oldAddr : word;
+  oldAddr: word;
 begin
   errorMessage := '';
   Value := eeprom[addr];
@@ -450,7 +453,8 @@ begin
     // errorMessage := 'Address out of range after address: 0x' + IntToHex(oldAddr, 2);
     // doReset();
   end
-  else begin
+  else
+  begin
     preFetch();
   end;
 end;
@@ -633,18 +637,18 @@ end;
 
 function TSPS.getLastError(): string;
 begin
-  result := errorMessage;
+  Result := errorMessage;
 end;
 
 procedure TSPS.writeEEProm(adr: word; Data: byte);
 begin
   if adr < e2e then
-  eeprom[adr] := Data;
+    eeprom[adr] := Data;
 end;
 
 function TSPS.getE2E(): word;
 begin
-   Result := e2e;
+  Result := e2e;
 end;
 
 function TSPS.isActive(): boolean;
@@ -725,6 +729,16 @@ begin
   end;
 end;
 
+procedure TSPS.setIgnoreDelay(ignDly: boolean);
+begin
+  ignoreDelay := ignDly;
+end;
+
+function TSPS.isIgnoreDelay(): boolean;
+begin
+  Result := ignoreDelay;
+end;
+
 procedure TSPS.getCommands(list: TStrings);
 begin
   MCSStrings.copyArray2List(COMMANDS, list);
@@ -886,35 +900,38 @@ var
   delayValue: integer;
   x: integer;
 begin
-  case Data of
-    0: delayValue := 1;
-    1: delayValue := 2;
-    2: delayValue := 5;
-    3: delayValue := 10;
-    4: delayValue := 20;
-    5: delayValue := 50;
-    6: delayValue := 100;
-    7: delayValue := 200;
-    8: delayValue := 500;
-    9: delayValue := 1000;
-    10: delayValue := 2000;
-    11: delayValue := 5000;
-    12: delayValue := 10000;
-    13: delayValue := 20000;
-    14: delayValue := 30000;
-    15: delayValue := 60000;
-  end;
-  delayActive := True;
-  repeat
-    if (delayValue >= 100) then
-    begin
-      Dec(delayValue, 100);
-      Sleep(100);
-      delayCallback(delayValue);
+  if not ignoreDelay then
+  begin
+    case Data of
+      0: delayValue := 1;
+      1: delayValue := 2;
+      2: delayValue := 5;
+      3: delayValue := 10;
+      4: delayValue := 20;
+      5: delayValue := 50;
+      6: delayValue := 100;
+      7: delayValue := 200;
+      8: delayValue := 500;
+      9: delayValue := 1000;
+      10: delayValue := 2000;
+      11: delayValue := 5000;
+      12: delayValue := 10000;
+      13: delayValue := 20000;
+      14: delayValue := 30000;
+      15: delayValue := 60000;
     end;
-  until ((delayValue <= 100) or stop);
-  delayCallback(0);
-  delayActive := False;
+    delayActive := True;
+    repeat
+      if (delayValue >= 100) then
+      begin
+        Dec(delayValue, 100);
+        Sleep(100);
+        delayCallback(delayValue);
+      end;
+    until ((delayValue <= 100) or stop);
+    delayCallback(0);
+    delayActive := False;
+  end;
 end;
 
 // jump relative back
@@ -1010,7 +1027,7 @@ begin
     11:
     begin
       if (servo1.attached()) then
-        servo1.Write(((a and 15)  * 10) + 10);
+        servo1.Write(((a and 15) * 10) + 10);
     end;
     12:
     begin
@@ -1162,7 +1179,8 @@ begin
     addr := saveaddr[saveCnt];
     exit;
   end;
-  if ((Data <= 6) and ((version = ATTiny84) or (version = Arduino) or (version = MicroBitV2))) then
+  if ((Data <= 6) and ((version = ATTiny84) or (version = Arduino) or
+    (version = MicroBitV2))) then
   begin
     // call subroutine number
     saveaddr[saveCnt] := addr;
@@ -1170,8 +1188,8 @@ begin
     addr := subs[Data];
     exit;
   end;
-  if ((Data = $0f) and ((version = ATTiny84) or (version = Arduino) or (version = MicroBitV2))) then
-
+  if ((Data = $0f) and ((version = ATTiny84) or (version = Arduino) or
+    (version = MicroBitV2))) then
 
   begin
     doReset();
@@ -1319,6 +1337,7 @@ begin
   stack := TByteStack.Create;
   stop := False;
   delayActive := False;
+  ignoreDelay := False;
 end;
 
 destructor TSPS.Destroy;