|
@@ -178,7 +178,8 @@ type
|
|
procedure StringGrid1EditingDone(Sender: TObject);
|
|
procedure StringGrid1EditingDone(Sender: TObject);
|
|
procedure StringGrid1Selection(Sender: TObject; aCol, aRow: integer);
|
|
procedure StringGrid1Selection(Sender: TObject; aCol, aRow: integer);
|
|
procedure tbPreset1Click(Sender: TObject);
|
|
procedure tbPreset1Click(Sender: TObject);
|
|
- procedure tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint; var Handled: boolean);
|
|
|
|
|
|
+ procedure tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint;
|
|
|
|
+ var Handled: boolean);
|
|
procedure tbPrgChange(Sender: TObject);
|
|
procedure tbPrgChange(Sender: TObject);
|
|
procedure tbResetClick(Sender: TObject);
|
|
procedure tbResetClick(Sender: TObject);
|
|
procedure tbSelChange(Sender: TObject);
|
|
procedure tbSelChange(Sender: TObject);
|
|
@@ -193,6 +194,7 @@ type
|
|
dirty: boolean;
|
|
dirty: boolean;
|
|
lastNote: byte;
|
|
lastNote: byte;
|
|
Examples: TStringList;
|
|
Examples: TStringList;
|
|
|
|
+ procedure doStopExecute();
|
|
procedure initMidi;
|
|
procedure initMidi;
|
|
procedure playNote(note: byte);
|
|
procedure playNote(note: byte);
|
|
procedure loadFromList(Lines: TStringList; filename: string);
|
|
procedure loadFromList(Lines: TStringList; filename: string);
|
|
@@ -202,7 +204,7 @@ type
|
|
|
|
|
|
procedure loadFile(filename: string);
|
|
procedure loadFile(filename: string);
|
|
procedure programSps;
|
|
procedure programSps;
|
|
- procedure nextStep;
|
|
|
|
|
|
+ procedure nextStep(singleStep: boolean);
|
|
procedure renumberGrid;
|
|
procedure renumberGrid;
|
|
procedure saveFile(filename: string);
|
|
procedure saveFile(filename: string);
|
|
procedure selectAddress(addr: byte);
|
|
procedure selectAddress(addr: byte);
|
|
@@ -619,8 +621,8 @@ begin
|
|
begin
|
|
begin
|
|
if (StringGrid1.Cells[1, x] <> '') then
|
|
if (StringGrid1.Cells[1, x] <> '') then
|
|
begin
|
|
begin
|
|
- line := StringGrid1.Cells[0, x] + ',' + StringGrid1.Cells[1, x] + ',' +
|
|
|
|
- StringGrid1.Cells[2, x] + ',"' + StringGrid1.Cells[4, x] + '"';
|
|
|
|
|
|
+ line := StringGrid1.Cells[0, x] + ',' + StringGrid1.Cells[1, x] +
|
|
|
|
+ ',' + StringGrid1.Cells[2, x] + ',"' + StringGrid1.Cells[4, x] + '"';
|
|
Writeln(f, line);
|
|
Writeln(f, line);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -655,12 +657,20 @@ begin
|
|
Statusbar1.SimpleText := MCSLSU.GetLSUText('statusbar', 'ID_SPS_RUNNING', lsuCode);
|
|
Statusbar1.SimpleText := MCSLSU.GetLSUText('statusbar', 'ID_SPS_RUNNING', lsuCode);
|
|
while (not stopit) do
|
|
while (not stopit) do
|
|
begin
|
|
begin
|
|
- nextStep();
|
|
|
|
|
|
+ nextStep(False);
|
|
|
|
+ if not sps.isActive() then
|
|
|
|
+ begin
|
|
|
|
+ stopit := True;
|
|
|
|
+ doStopExecute(); // error in sps
|
|
|
|
+ end;
|
|
if (cbAdrActual.Checked) then
|
|
if (cbAdrActual.Checked) then
|
|
selectAddress(sps.getAddress());
|
|
selectAddress(sps.getAddress());
|
|
Application.ProcessMessages;
|
|
Application.ProcessMessages;
|
|
end;
|
|
end;
|
|
- Statusbar1.SimpleText := MCSLSU.GetLSUText('statusbar', 'ID_SPS_STOPPED', lsuCode);
|
|
|
|
|
|
+ if sps.getLastError() <> '' then
|
|
|
|
+ MyMsgBox(sps.getLastError(), 'Error', MB_OK + MB_ICONERROR)
|
|
|
|
+ else
|
|
|
|
+ Statusbar1.SimpleText := MCSLSU.GetLSUText('statusbar', 'ID_SPS_STOPPED', lsuCode);
|
|
cbAdrActual.Enabled := False;
|
|
cbAdrActual.Enabled := False;
|
|
acNextStep.Enabled := True;
|
|
acNextStep.Enabled := True;
|
|
sps.doReset();
|
|
sps.doReset();
|
|
@@ -767,7 +777,7 @@ end;
|
|
|
|
|
|
procedure TForm1.acNextStepExecute(Sender: TObject);
|
|
procedure TForm1.acNextStepExecute(Sender: TObject);
|
|
begin
|
|
begin
|
|
- nextStep();
|
|
|
|
|
|
+ nextStep(True);
|
|
selectAddress(sps.getAddress());
|
|
selectAddress(sps.getAddress());
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -787,7 +797,7 @@ begin
|
|
savePreset(filename);
|
|
savePreset(filename);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TForm1.nextStep;
|
|
|
|
|
|
+procedure TForm1.nextStep(singleStep: boolean);
|
|
begin
|
|
begin
|
|
if (not sps.isActive()) then
|
|
if (not sps.isActive()) then
|
|
begin
|
|
begin
|
|
@@ -800,14 +810,14 @@ begin
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
acNextStep.Enabled := False;
|
|
acNextStep.Enabled := False;
|
|
- acStop.Enabled := False;
|
|
|
|
|
|
+ acStop.Enabled := not singleStep;
|
|
inputMicrobit();
|
|
inputMicrobit();
|
|
inputSps();
|
|
inputSps();
|
|
sps.nextStep();
|
|
sps.nextStep();
|
|
outputSps();
|
|
outputSps();
|
|
outputMicrobit();
|
|
outputMicrobit();
|
|
- acNextStep.Enabled := True;
|
|
|
|
- acStop.Enabled := True;
|
|
|
|
|
|
+ acNextStep.Enabled := singleStep;
|
|
|
|
+ acStop.Enabled := not singleStep;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -890,7 +900,8 @@ begin
|
|
tmp := tmp + '0';
|
|
tmp := tmp + '0';
|
|
line := line + tmp;
|
|
line := line + tmp;
|
|
|
|
|
|
- line := line + ' ' + StringGrid1.Cells[3, x] + ' ,"' + StringGrid1.Cells[4, x] + '"';
|
|
|
|
|
|
+ line := line + ' ' + StringGrid1.Cells[3, x] + ' ,"' +
|
|
|
|
+ StringGrid1.Cells[4, x] + '"';
|
|
list.add(line);
|
|
list.add(line);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -901,24 +912,28 @@ end;
|
|
|
|
|
|
procedure TForm1.acStopExecute(Sender: TObject);
|
|
procedure TForm1.acStopExecute(Sender: TObject);
|
|
begin
|
|
begin
|
|
-
|
|
|
|
if (sps.isActive()) then
|
|
if (sps.isActive()) then
|
|
begin
|
|
begin
|
|
stopit := True;
|
|
stopit := True;
|
|
sps.break();
|
|
sps.break();
|
|
- acDebug.ImageIndex := 40;
|
|
|
|
- // repeat
|
|
|
|
- // Application.ProcessMessages;
|
|
|
|
- // until (not sps.isDelayActive());
|
|
|
|
- sps.doReset();
|
|
|
|
- acStop.Enabled := False;
|
|
|
|
- acDebug.Enabled := True;
|
|
|
|
- outputSps();
|
|
|
|
- selectAddress(0);
|
|
|
|
- activateSps(False);
|
|
|
|
|
|
+ doStopExecute();
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TForm1.doStopExecute();
|
|
|
|
+begin
|
|
|
|
+ acDebug.ImageIndex := 40;
|
|
|
|
+ // repeat
|
|
|
|
+ // Application.ProcessMessages;
|
|
|
|
+ // until (not sps.isDelayActive());
|
|
|
|
+ sps.doReset();
|
|
|
|
+ acStop.Enabled := False;
|
|
|
|
+ acDebug.Enabled := True;
|
|
|
|
+ outputSps();
|
|
|
|
+ selectAddress(0);
|
|
|
|
+ activateSps(False);
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TForm1.acThisStepExecute(Sender: TObject);
|
|
procedure TForm1.acThisStepExecute(Sender: TObject);
|
|
var
|
|
var
|
|
Data, com: byte;
|
|
Data, com: byte;
|
|
@@ -1023,12 +1038,12 @@ begin
|
|
if (return = mrOk) then
|
|
if (return = mrOk) then
|
|
begin
|
|
begin
|
|
hexFile := serialUpload;
|
|
hexFile := serialUpload;
|
|
- SdpoSerial1.BaudRate:= br__9600;
|
|
|
|
|
|
+ SdpoSerial1.BaudRate := br__9600;
|
|
|
|
|
|
if cbTPSVersion.ItemIndex = 5 then
|
|
if cbTPSVersion.ItemIndex = 5 then
|
|
begin
|
|
begin
|
|
// Micro:bit V2 auto programm
|
|
// Micro:bit V2 auto programm
|
|
- SdpoSerial1.BaudRate:= br115200;
|
|
|
|
|
|
+ SdpoSerial1.BaudRate := br115200;
|
|
end;
|
|
end;
|
|
|
|
|
|
SdpoSerial1.Device := comService;
|
|
SdpoSerial1.Device := comService;
|
|
@@ -1124,7 +1139,8 @@ var
|
|
begin
|
|
begin
|
|
if (dirty) then
|
|
if (dirty) then
|
|
begin
|
|
begin
|
|
- i := MCSLSU.LSUAutoMsgBox('Messages', 'SAVE_CHANGES', MB_ICONQUESTION or MB_YESNOCANCEL);
|
|
|
|
|
|
+ i := MCSLSU.LSUAutoMsgBox('Messages', 'SAVE_CHANGES', MB_ICONQUESTION or
|
|
|
|
+ MB_YESNOCANCEL);
|
|
if (i = mrYes) then
|
|
if (i = mrYes) then
|
|
begin
|
|
begin
|
|
saveFile(activeFile);
|
|
saveFile(activeFile);
|
|
@@ -1254,7 +1270,8 @@ begin
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
- Caption := MCSLSU.GetLSUText('form1Captions', 'ID_CAPTION', lsuCode) + ':' + ExtractFileName(activeFile);
|
|
|
|
|
|
+ Caption := MCSLSU.GetLSUText('form1Captions', 'ID_CAPTION', lsuCode) +
|
|
|
|
+ ':' + ExtractFileName(activeFile);
|
|
end;
|
|
end;
|
|
|
|
|
|
end;
|
|
end;
|
|
@@ -1269,7 +1286,8 @@ begin
|
|
StringGrid1.Columns[i].Title.Caption :=
|
|
StringGrid1.Columns[i].Title.Caption :=
|
|
MCSLSU.GetLSUText('form1Captions', StringGrid1.Columns[i].Title.Caption, lsuCode);
|
|
MCSLSU.GetLSUText('form1Captions', StringGrid1.Columns[i].Title.Caption, lsuCode);
|
|
end;
|
|
end;
|
|
- StringGrid1.Cells[0, 0] := MCSLSU.GetLSUText('form1Captions', 'ID_GRID_STORAGE', lsuCode);
|
|
|
|
|
|
+ StringGrid1.Cells[0, 0] := MCSLSU.GetLSUText('form1Captions',
|
|
|
|
+ 'ID_GRID_STORAGE', lsuCode);
|
|
StringGrid1.Repaint;
|
|
StringGrid1.Repaint;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1462,6 +1480,14 @@ end;
|
|
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
|
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
|
begin
|
|
begin
|
|
canClose := checkDirty();
|
|
canClose := checkDirty();
|
|
|
|
+ if canClose then
|
|
|
|
+ begin
|
|
|
|
+ if (sps.isActive()) then
|
|
|
|
+ begin
|
|
|
|
+ acStopExecute(Sender);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TForm1.StringGrid1EditingDone(Sender: TObject);
|
|
procedure TForm1.StringGrid1EditingDone(Sender: TObject);
|
|
@@ -1486,7 +1512,8 @@ begin
|
|
begin
|
|
begin
|
|
x := StringGrid1.Row;
|
|
x := StringGrid1.Row;
|
|
StringGrid1.Cells[3, x] :=
|
|
StringGrid1.Cells[3, x] :=
|
|
- sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]), HexToInt(StringGrid1.Cells[2, x]));
|
|
|
|
|
|
+ sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]),
|
|
|
|
+ HexToInt(StringGrid1.Cells[2, x]));
|
|
setDirty(True);
|
|
setDirty(True);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -1593,10 +1620,13 @@ begin
|
|
WriteIniInteger(key, 'accx', XMLPropStorage1.ReadInteger(key + '.accx', 0), filename);
|
|
WriteIniInteger(key, 'accx', XMLPropStorage1.ReadInteger(key + '.accx', 0), filename);
|
|
WriteIniInteger(key, 'accy', XMLPropStorage1.ReadInteger(key + '.accy', 0), filename);
|
|
WriteIniInteger(key, 'accy', XMLPropStorage1.ReadInteger(key + '.accy', 0), filename);
|
|
WriteIniInteger(key, 'accz', XMLPropStorage1.ReadInteger(key + '.accz', 0), filename);
|
|
WriteIniInteger(key, 'accz', XMLPropStorage1.ReadInteger(key + '.accz', 0), filename);
|
|
- WriteIniInteger(key, 'sound', XMLPropStorage1.ReadInteger(key + '.sound', 0), filename);
|
|
|
|
- WriteIniInteger(key, 'light', XMLPropStorage1.ReadInteger(key + '.light', 0), filename);
|
|
|
|
|
|
+ WriteIniInteger(key, 'sound', XMLPropStorage1.ReadInteger(key + '.sound', 0),
|
|
|
|
+ filename);
|
|
|
|
+ WriteIniInteger(key, 'light', XMLPropStorage1.ReadInteger(key + '.light', 0),
|
|
|
|
+ filename);
|
|
WriteIniInteger(key, 'comp', XMLPropStorage1.ReadInteger(key + '.comp', 0), filename);
|
|
WriteIniInteger(key, 'comp', XMLPropStorage1.ReadInteger(key + '.comp', 0), filename);
|
|
- WriteIniInteger(key, 'gesture', XMLPropStorage1.ReadInteger(key + '.gesture', 0), filename);
|
|
|
|
|
|
+ WriteIniInteger(key, 'gesture', XMLPropStorage1.ReadInteger(key +
|
|
|
|
+ '.gesture', 0), filename);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TForm1.loadSection(filename: string; key: string);
|
|
procedure TForm1.loadSection(filename: string; key: string);
|
|
@@ -1604,10 +1634,14 @@ begin
|
|
XMLPropStorage1.WriteBoolean(key + '.set', ReadIniBool(key, 'set', False, filename));
|
|
XMLPropStorage1.WriteBoolean(key + '.set', ReadIniBool(key, 'set', False, filename));
|
|
XMLPropStorage1.WriteBoolean(key + '.prg', ReadIniBool(key, 'prg', False, filename));
|
|
XMLPropStorage1.WriteBoolean(key + '.prg', ReadIniBool(key, 'prg', False, filename));
|
|
XMLPropStorage1.WriteBoolean(key + '.sel', ReadIniBool(key, 'sel', False, filename));
|
|
XMLPropStorage1.WriteBoolean(key + '.sel', ReadIniBool(key, 'sel', False, filename));
|
|
- XMLPropStorage1.WriteBoolean(key + '.input1', ReadIniBool(key, 'input1', False, filename));
|
|
|
|
- XMLPropStorage1.WriteBoolean(key + '.input2', ReadIniBool(key, 'input2', False, filename));
|
|
|
|
- XMLPropStorage1.WriteBoolean(key + '.input3', ReadIniBool(key, 'input3', False, filename));
|
|
|
|
- XMLPropStorage1.WriteBoolean(key + '.input4', ReadIniBool(key, 'input4', False, filename));
|
|
|
|
|
|
+ XMLPropStorage1.WriteBoolean(key + '.input1', ReadIniBool(key,
|
|
|
|
+ 'input1', False, filename));
|
|
|
|
+ XMLPropStorage1.WriteBoolean(key + '.input2', ReadIniBool(key,
|
|
|
|
+ 'input2', False, filename));
|
|
|
|
+ XMLPropStorage1.WriteBoolean(key + '.input3', ReadIniBool(key,
|
|
|
|
+ 'input3', False, filename));
|
|
|
|
+ XMLPropStorage1.WriteBoolean(key + '.input4', ReadIniBool(key,
|
|
|
|
+ 'input4', False, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.adc1', ReadIniInteger(key, 'adc1', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.adc1', ReadIniInteger(key, 'adc1', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.adc2', ReadIniInteger(key, 'adc2', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.adc2', ReadIniInteger(key, 'adc2', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.rc1', ReadIniInteger(key, 'rc1', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.rc1', ReadIniInteger(key, 'rc1', 0, filename));
|
|
@@ -1617,10 +1651,13 @@ begin
|
|
XMLPropStorage1.WriteInteger(key + '.accx', ReadIniInteger(key, 'accx', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.accx', ReadIniInteger(key, 'accx', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.accy', ReadIniInteger(key, 'accy', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.accy', ReadIniInteger(key, 'accy', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.accz', ReadIniInteger(key, 'accz', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.accz', ReadIniInteger(key, 'accz', 0, filename));
|
|
- XMLPropStorage1.WriteInteger(key + '.sound', ReadIniInteger(key, 'sound', 0, filename));
|
|
|
|
- XMLPropStorage1.WriteInteger(key + '.light', ReadIniInteger(key, 'light', 0, filename));
|
|
|
|
|
|
+ XMLPropStorage1.WriteInteger(key + '.sound', ReadIniInteger(key,
|
|
|
|
+ 'sound', 0, filename));
|
|
|
|
+ XMLPropStorage1.WriteInteger(key + '.light', ReadIniInteger(key,
|
|
|
|
+ 'light', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.comp', ReadIniInteger(key, 'comp', 0, filename));
|
|
XMLPropStorage1.WriteInteger(key + '.comp', ReadIniInteger(key, 'comp', 0, filename));
|
|
- XMLPropStorage1.WriteInteger(key + '.gesture', ReadIniInteger(key, 'gesture', 0, filename));
|
|
|
|
|
|
+ XMLPropStorage1.WriteInteger(key + '.gesture', ReadIniInteger(key,
|
|
|
|
+ 'gesture', 0, filename));
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TForm1.tbPreset1Click(Sender: TObject);
|
|
procedure TForm1.tbPreset1Click(Sender: TObject);
|
|
@@ -1661,17 +1698,26 @@ begin
|
|
ADC2.Value := XMLPropStorage1.ReadInteger(key + '.adc2', ADC2.Value);
|
|
ADC2.Value := XMLPropStorage1.ReadInteger(key + '.adc2', ADC2.Value);
|
|
RC1.Value := XMLPropStorage1.ReadInteger(key + '.rc1', RC1.Value);
|
|
RC1.Value := XMLPropStorage1.ReadInteger(key + '.rc1', RC1.Value);
|
|
RC2.Value := XMLPropStorage1.ReadInteger(key + '.rc2', RC2.Value);
|
|
RC2.Value := XMLPropStorage1.ReadInteger(key + '.rc2', RC2.Value);
|
|
- fMicrobit.tbLogo.Checked := XMLPropStorage1.ReadBoolean(key + '.logo', fMicrobit.tbLogo.Checked);
|
|
|
|
- fMicrobit.accx.Value := XMLPropStorage1.ReadInteger(key + '.accx', fMicrobit.accx.Value);
|
|
|
|
- fMicrobit.accy.Value := XMLPropStorage1.ReadInteger(key + '.accy', fMicrobit.accy.Value);
|
|
|
|
- fMicrobit.accz.Value := XMLPropStorage1.ReadInteger(key + '.accz', fMicrobit.accz.Value);
|
|
|
|
- fMicrobit.snd.Value := XMLPropStorage1.ReadInteger(key + '.sound', fMicrobit.snd.Value);
|
|
|
|
- fMicrobit.light.Value := XMLPropStorage1.ReadInteger(key + '.light', fMicrobit.light.Value);
|
|
|
|
- fMicrobit.compass.Value := XMLPropStorage1.ReadInteger(key + '.comp', fMicrobit.compass.Value);
|
|
|
|
- fMicrobit.cbGesture.ItemIndex := XMLPropStorage1.ReadInteger(key + '.gesture', fMicrobit.cbGesture.ItemIndex);
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-procedure TForm1.tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint; var Handled: boolean);
|
|
|
|
|
|
+ fMicrobit.tbLogo.Checked := XMLPropStorage1.ReadBoolean(key + '.logo',
|
|
|
|
+ fMicrobit.tbLogo.Checked);
|
|
|
|
+ fMicrobit.accx.Value := XMLPropStorage1.ReadInteger(key + '.accx',
|
|
|
|
+ fMicrobit.accx.Value);
|
|
|
|
+ fMicrobit.accy.Value := XMLPropStorage1.ReadInteger(key + '.accy',
|
|
|
|
+ fMicrobit.accy.Value);
|
|
|
|
+ fMicrobit.accz.Value := XMLPropStorage1.ReadInteger(key + '.accz',
|
|
|
|
+ fMicrobit.accz.Value);
|
|
|
|
+ fMicrobit.snd.Value := XMLPropStorage1.ReadInteger(key + '.sound',
|
|
|
|
+ fMicrobit.snd.Value);
|
|
|
|
+ fMicrobit.light.Value := XMLPropStorage1.ReadInteger(key + '.light',
|
|
|
|
+ fMicrobit.light.Value);
|
|
|
|
+ fMicrobit.compass.Value := XMLPropStorage1.ReadInteger(key + '.comp',
|
|
|
|
+ fMicrobit.compass.Value);
|
|
|
|
+ fMicrobit.cbGesture.ItemIndex :=
|
|
|
|
+ XMLPropStorage1.ReadInteger(key + '.gesture', fMicrobit.cbGesture.ItemIndex);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TForm1.tbPreset1ContextPopup(Sender: TObject; MousePos: TPoint;
|
|
|
|
+ var Handled: boolean);
|
|
var
|
|
var
|
|
key: string;
|
|
key: string;
|
|
begin
|
|
begin
|
|
@@ -1775,8 +1821,8 @@ begin
|
|
if (InfoBox.newVersion) then
|
|
if (InfoBox.newVersion) then
|
|
begin
|
|
begin
|
|
MCSLabel.Font.Color := clred;
|
|
MCSLabel.Font.Color := clred;
|
|
- MCSLabel.Hint := InfoBox.versionHint + chr($0a) + chr($0d) + MCSLSU.GetLSUText(
|
|
|
|
- 'form1Captions', 'ID_CLICK_HERE', lsuCode);
|
|
|
|
|
|
+ MCSLabel.Hint := InfoBox.versionHint + chr($0a) + chr($0d) +
|
|
|
|
+ MCSLSU.GetLSUText('form1Captions', 'ID_CLICK_HERE', lsuCode);
|
|
end;
|
|
end;
|
|
MCSLabel.Caption := InfoBox.versionText;
|
|
MCSLabel.Caption := InfoBox.versionText;
|
|
end;
|
|
end;
|
|
@@ -1820,7 +1866,8 @@ begin
|
|
if (StringGrid1.Cells[2, x] = '') then
|
|
if (StringGrid1.Cells[2, x] = '') then
|
|
StringGrid1.Cells[2, x] := '0';
|
|
StringGrid1.Cells[2, x] := '0';
|
|
StringGrid1.Cells[3, x] :=
|
|
StringGrid1.Cells[3, x] :=
|
|
- sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]), HexToInt(StringGrid1.Cells[2, x]));
|
|
|
|
|
|
+ sps.getCommandText(HexToInt(StringGrid1.Cells[1, x]),
|
|
|
|
+ HexToInt(StringGrid1.Cells[2, x]));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|