Browse Source

adding new HEX file serial upload.

Klaas, Wilfried 5 years ago
parent
commit
c417b615fa
4 changed files with 15 additions and 21 deletions
  1. 2 0
      .gitignore
  2. 7 17
      Beispiele/SimpleServo.tps
  3. 5 3
      ugui.pas
  4. 1 1
      usps.pas

+ 2 - 0
.gitignore

@@ -30,3 +30,5 @@ lib/
 *.app/
 
 SPS_Emu\.zip
+
+SPS_Emu\.xml

+ 7 - 17
Beispiele/SimpleServo.tps

@@ -1,18 +1,8 @@
 #TPS:Willies SPS Arduino
-0x00,4,4,""
-0x01,5,2,""
-0x02,4,F,""
-0x03,7,C,""
-0x04,F,8,""
-0x05,4,0,""
-0x06,F,8,""
-0x07,2,0,""
-0x08,A,2,""
-0x09,F,F,""
-0x0A,0,0,""
-0x0B,0,0,""
-0x0C,0,0,""
-0x0D,0,0,""
-0x0E,0,0,""
-0x0F,0,0,""
-0x10,0,0,""
+0x00,F,E,""
+0x01,2,7,""
+0x02,F,D,""
+0x03,2,7,""
+0x04,3,4,""
+0x05,0,0,""
+0x06,0,0,""

+ 5 - 3
ugui.pas

@@ -756,13 +756,15 @@ begin
   pos := 0;
   line := '';
   hexFile := MCSIO.CreateUniqueFile(MCSIO.GetTempDir, 'TPS', '.hex');
-  hexFileSource := TStringList.Create;
+  makeHexFile(hexFile);
+
+{  hexFileSource := TStringList.Create;
 
   for x := 1 to StringGrid1.RowCount - 1 do
   begin
     if (pos = 0) then
     begin
-      line := line + 'd ';
+      line := line + ':';
     end;
     tmp := StringGrid1.Cells[1, x];
     line := line + tmp;
@@ -803,7 +805,7 @@ begin
   MCSIO.StrToFile(hexFile, hexFileSource.Text);
 
   hexFileSource.Free;
-
+}
   Result := hexFile;
 end;
 

+ 1 - 1
usps.pas

@@ -130,7 +130,7 @@ const
     ('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
   F_LIST_AT: array[0..15] of string = ('A=ADC.1', 'A=ADC.2', 'A=RCin.1', 'A=RCin.2',
     'PWM.1=A', 'PWM.2=A', 'Servo.1=A', 'Servo.2=A', 'Tone=A', '', '', '',
-    '', '', '', 'PrgEnd');
+    '', 'LED off', 'LED on', 'PrgEnd');
 
 type
   {TPSVersion}