You've already forked lazarus-ccr
V0.2.2.0: work-in-progress. Triggerform initial display, save and load functioning.
ToDo: Verification of inputs and ErrorList. Update main app upon triggerform save git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5618 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -10,7 +10,7 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="12"/>
|
<EditorIndex Value="12"/>
|
||||||
<CursorPos Y="35"/>
|
<CursorPos Y="35"/>
|
||||||
<UsageCount Value="148"/>
|
<UsageCount Value="149"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<TopLine Value="511"/>
|
<TopLine Value="511"/>
|
||||||
<CursorPos X="25" Y="516"/>
|
<CursorPos X="25" Y="516"/>
|
||||||
<UsageCount Value="148"/>
|
<UsageCount Value="149"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<TopLine Value="33"/>
|
<TopLine Value="33"/>
|
||||||
<CursorPos X="41" Y="45"/>
|
<CursorPos X="41" Y="45"/>
|
||||||
<UsageCount Value="138"/>
|
<UsageCount Value="139"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="13"/>
|
<TopLine Value="13"/>
|
||||||
<CursorPos X="49" Y="20"/>
|
<CursorPos X="49" Y="20"/>
|
||||||
<UsageCount Value="130"/>
|
<UsageCount Value="131"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
@ -54,15 +54,15 @@
|
|||||||
<WindowIndex Value="-1"/>
|
<WindowIndex Value="-1"/>
|
||||||
<TopLine Value="-1"/>
|
<TopLine Value="-1"/>
|
||||||
<CursorPos X="-1" Y="-1"/>
|
<CursorPos X="-1" Y="-1"/>
|
||||||
<UsageCount Value="130"/>
|
<UsageCount Value="131"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="..\foobot_utility.pas"/>
|
<Filename Value="..\foobot_utility.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="9"/>
|
||||||
<TopLine Value="241"/>
|
<TopLine Value="241"/>
|
||||||
<CursorPos X="31" Y="243"/>
|
<CursorPos X="68" Y="261"/>
|
||||||
<UsageCount Value="148"/>
|
<UsageCount Value="149"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<WindowIndex Value="-1"/>
|
<WindowIndex Value="-1"/>
|
||||||
<TopLine Value="-1"/>
|
<TopLine Value="-1"/>
|
||||||
<CursorPos X="-1" Y="-1"/>
|
<CursorPos X="-1" Y="-1"/>
|
||||||
<UsageCount Value="130"/>
|
<UsageCount Value="131"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="foobot_sensors.pas"/>
|
<Filename Value="foobot_sensors.pas"/>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="299"/>
|
<TopLine Value="299"/>
|
||||||
<CursorPos X="14" Y="321"/>
|
<CursorPos X="14" Y="321"/>
|
||||||
<UsageCount Value="82"/>
|
<UsageCount Value="83"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="usplash.pas"/>
|
<Filename Value="usplash.pas"/>
|
||||||
@ -90,7 +90,7 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<CursorPos X="48" Y="37"/>
|
<CursorPos X="48" Y="37"/>
|
||||||
<UsageCount Value="77"/>
|
<UsageCount Value="78"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
@ -102,9 +102,9 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="151"/>
|
<TopLine Value="135"/>
|
||||||
<CursorPos X="44" Y="165"/>
|
<CursorPos X="18" Y="165"/>
|
||||||
<UsageCount Value="68"/>
|
<UsageCount Value="69"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<TopLine Value="43"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="47" Y="13"/>
|
<CursorPos X="47" Y="13"/>
|
||||||
<UsageCount Value="89"/>
|
<UsageCount Value="90"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
<EditorIndex Value="11"/>
|
<EditorIndex Value="11"/>
|
||||||
<TopLine Value="141"/>
|
<TopLine Value="141"/>
|
||||||
<CursorPos X="31" Y="148"/>
|
<CursorPos X="31" Y="148"/>
|
||||||
<UsageCount Value="89"/>
|
<UsageCount Value="90"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit11>
|
</Unit11>
|
||||||
<Unit12>
|
<Unit12>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<TopLine Value="101"/>
|
<TopLine Value="101"/>
|
||||||
<CursorPos Y="154"/>
|
<CursorPos Y="154"/>
|
||||||
<UsageCount Value="40"/>
|
<UsageCount Value="41"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
@ -221,14 +221,14 @@
|
|||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="10"/>
|
||||||
<TopLine Value="381"/>
|
<TopLine Value="381"/>
|
||||||
<CursorPos X="13" Y="384"/>
|
<CursorPos X="13" Y="384"/>
|
||||||
<UsageCount Value="58"/>
|
<UsageCount Value="59"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
<Unit26>
|
<Unit26>
|
||||||
<Filename Value="..\latest_stable\udataform.pas"/>
|
<Filename Value="..\latest_stable\udataform.pas"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="70"/>
|
<TopLine Value="70"/>
|
||||||
<UsageCount Value="58"/>
|
<UsageCount Value="59"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit26>
|
</Unit26>
|
||||||
<Unit27>
|
<Unit27>
|
||||||
@ -272,7 +272,7 @@
|
|||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<TopLine Value="1811"/>
|
<TopLine Value="1811"/>
|
||||||
<CursorPos X="13" Y="1834"/>
|
<CursorPos X="13" Y="1834"/>
|
||||||
<UsageCount Value="36"/>
|
<UsageCount Value="37"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit32>
|
</Unit32>
|
||||||
<Unit33>
|
<Unit33>
|
||||||
@ -287,123 +287,123 @@
|
|||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="229" TopLine="178"/>
|
<Caret Line="21" Column="18"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="362" Column="22" TopLine="349"/>
|
<Caret Line="153" Column="20" TopLine="130"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="539" Column="42" TopLine="524"/>
|
<Caret Line="92" Column="20" TopLine="90"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="14" Column="5"/>
|
<Caret Line="397" Column="17" TopLine="378"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="12" Column="15"/>
|
<Caret Line="745" Column="44" TopLine="698"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="13" Column="26"/>
|
<Caret Line="832" Column="44" TopLine="785"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="21" Column="18"/>
|
<Caret Line="138" TopLine="103"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="153" Column="20" TopLine="130"/>
|
<Caret Line="137" Column="52" TopLine="110"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="92" Column="20" TopLine="90"/>
|
<Caret Line="123" Column="8" TopLine="105"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="397" Column="17" TopLine="378"/>
|
<Caret Line="279" Column="11" TopLine="261"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="745" Column="44" TopLine="698"/>
|
<Caret Line="153" Column="43" TopLine="134"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="832" Column="44" TopLine="785"/>
|
<Caret Line="78" Column="9" TopLine="45"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="138" TopLine="103"/>
|
<Caret Line="417" Column="39" TopLine="370"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="137" Column="52" TopLine="110"/>
|
<Caret Line="419" Column="39" TopLine="372"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="123" Column="8" TopLine="105"/>
|
<Caret Line="884" Column="32" TopLine="837"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="279" Column="11" TopLine="261"/>
|
<Caret Line="1062" Column="28" TopLine="1015"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="utriggersform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="153" Column="43" TopLine="134"/>
|
<Caret Line="77" TopLine="51"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="78" Column="9" TopLine="45"/>
|
<Caret Line="3" Column="7"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="417" Column="39" TopLine="370"/>
|
<Caret Line="30" Column="20" TopLine="28"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="419" Column="39" TopLine="372"/>
|
<Caret Line="883" Column="65" TopLine="852"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="884" Column="32" TopLine="837"/>
|
<Caret Line="1080" Column="61" TopLine="1036"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\foobot_utility.pas"/>
|
||||||
<Caret Line="1062" Column="28" TopLine="1015"/>
|
<Caret Line="277" TopLine="241"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="77" TopLine="51"/>
|
<Caret Line="476" Column="65" TopLine="457"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="3" Column="7"/>
|
<Caret Line="448" Column="8" TopLine="445"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="30" Column="20" TopLine="28"/>
|
<Caret Line="171" Column="16" TopLine="135"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="883" Column="65" TopLine="852"/>
|
<Caret Line="285" Column="79" TopLine="244"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="1080" Column="61" TopLine="1036"/>
|
<Caret Line="287" Column="88" TopLine="245"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="..\foobot_utility.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="277" TopLine="241"/>
|
<Caret Line="275" Column="17" TopLine="260"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="476" Column="65" TopLine="457"/>
|
<Caret Line="161" Column="22" TopLine="150"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="utriggersform.pas"/>
|
||||||
<Caret Line="448" Column="8" TopLine="445"/>
|
<Caret Line="162" Column="16" TopLine="130"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object triggersform: Ttriggersform
|
object triggersform: Ttriggersform
|
||||||
Left = 808
|
Left = 2283
|
||||||
Height = 565
|
Height = 565
|
||||||
Top = 146
|
Top = 82
|
||||||
Width = 794
|
Width = 794
|
||||||
ActiveControl = edt_newrec_pm
|
ActiveControl = edt_newrec_pm
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
@ -863,7 +863,6 @@ object triggersform: Ttriggersform
|
|||||||
Default = True
|
Default = True
|
||||||
DefaultCaption = True
|
DefaultCaption = True
|
||||||
Kind = bkOK
|
Kind = bkOK
|
||||||
ModalResult = 1
|
|
||||||
OnClick = cmd_OKClick
|
OnClick = cmd_OKClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
@ -106,6 +106,7 @@ type
|
|||||||
procedure SetUpUnits;
|
procedure SetUpUnits;
|
||||||
function AssignAndSaveTriggers:boolean;
|
function AssignAndSaveTriggers:boolean;
|
||||||
function AssignAndSaveRecommendedLevels:boolean;
|
function AssignAndSaveRecommendedLevels:boolean;
|
||||||
|
function AllInputsVerified:Boolean;
|
||||||
public
|
public
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -136,11 +137,31 @@ procedure Ttriggersform.FormActivate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
SetUpUnits;
|
SetUpUnits;
|
||||||
end;
|
end;
|
||||||
|
procedure Ttriggersform.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Caption := Application.Title + ' - Set Recommended values (for all Foobots) and Triggers (for ' +
|
||||||
|
FoobotIdentityObject.FoobotIdentityList[mainform.iCurrentFoobot].Name + ')';
|
||||||
|
DisplayCurrentValues;
|
||||||
|
ErrorList.Clear;
|
||||||
|
Update;
|
||||||
|
end;
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
procedure Ttriggersform.cmd_OKClick(Sender: TObject);
|
procedure Ttriggersform.cmd_OKClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// VerifyEveryThing then Save to inifiles;
|
// VerifyEveryThing then Save to inifiles;
|
||||||
AssignAndSaveTriggers;
|
IF AssignAndSaveTriggers
|
||||||
|
AND AssignAndSaveRecommendedLevels
|
||||||
|
AND AllInputsVerified then
|
||||||
|
begin
|
||||||
|
ModalResult:=mrClose;
|
||||||
|
Close;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ModalResult:=mrNone;
|
||||||
|
ShowMessage('Wont close');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Ttriggersform.OnlyNumericKeyPressInteger(Sender: TObject; var Key: char);
|
procedure Ttriggersform.OnlyNumericKeyPressInteger(Sender: TObject; var Key: char);
|
||||||
@ -153,14 +174,11 @@ begin
|
|||||||
if not (Key in ['0'..'9', '.', #8, #9]) then Key := #0;
|
if not (Key in ['0'..'9', '.', #8, #9]) then Key := #0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Ttriggersform.FormShow(Sender: TObject);
|
function Ttriggersform.AllInputsVerified:Boolean;
|
||||||
begin
|
begin
|
||||||
Caption := Application.Title + ' - Set Recommended values (for all Foobots) and Triggers (for ' +
|
Result:=TRUE;
|
||||||
FoobotIdentityObject.FoobotIdentityList[mainform.iCurrentFoobot].Name + ')';
|
|
||||||
DisplayCurrentValues;
|
|
||||||
ErrorList.Clear;
|
|
||||||
Update;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Ttriggersform.AssignAndSaveTriggers:boolean;
|
function Ttriggersform.AssignAndSaveTriggers:boolean;
|
||||||
begin
|
begin
|
||||||
Result:=FALSE;
|
Result:=FALSE;
|
||||||
@ -210,23 +228,23 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// Recommended levels
|
// Recommended levels
|
||||||
lbl_currentrec_pm.Caption :=
|
lbl_currentrec_pm.Caption :=
|
||||||
Format('Current recommended level: %.1f %s', [double(REC_PM),
|
Format('Current recommended level: %.1f %s', [RecommendedLevelsArray[C_PM],
|
||||||
FoobotDataObject.Units[C_PM]]);
|
FoobotDataObject.Units[C_PM]]);
|
||||||
lbl_currentrec_tmp.Caption :=
|
lbl_currentrec_tmp.Caption :=
|
||||||
Format('Current recommended level: %.1f %s', [double(REC_TMP),
|
Format('Current recommended level: %.1f %s', [RecommendedLevelsArray[C_TMP],
|
||||||
FoobotDataObject.Units[C_TMP]]);
|
FoobotDataObject.Units[C_TMP]]);
|
||||||
lbl_currentrec_hum.Caption :=
|
lbl_currentrec_hum.Caption :=
|
||||||
Format('Current recommended level: %.1f %s', [double(REC_HUM),
|
Format('Current recommended level: %.1f %s', [RecommendedLevelsArray[C_HUM],
|
||||||
FoobotDataObject.Units[C_HUM]]);
|
FoobotDataObject.Units[C_HUM]]);
|
||||||
lbl_currentrec_co2.Caption :=
|
lbl_currentrec_co2.Caption :=
|
||||||
Format('Current recommended level: %.0f %s', [double(REC_CO2),
|
Format('Current recommended level: %.0f %s', [RecommendedLevelsArray[C_CO2],
|
||||||
FoobotDataObject.Units[C_CO2]]);
|
FoobotDataObject.Units[C_CO2]]);
|
||||||
lbl_currentrec_voc.Caption :=
|
lbl_currentrec_voc.Caption :=
|
||||||
Format('Current recommended level: %.0f %s', [double(REC_VOC),
|
Format('Current recommended level: %.0f %s', [RecommendedLevelsArray[C_VOC],
|
||||||
FoobotDataObject.Units[C_VOC]]);
|
FoobotDataObject.Units[C_VOC]]);
|
||||||
lbl_currentrec_allpollu.Caption :=
|
lbl_currentrec_allpollu.Caption :=
|
||||||
Format('Current recommended level: %.1f %s',
|
Format('Current recommended level: %.1f %s',
|
||||||
[double(REC_ALLPOLLU), FoobotDataObject.Units[C_ALLPOLLU]]);
|
[RecommendedLevelsArray[C_ALLPOLLU], FoobotDataObject.Units[C_ALLPOLLU]]);
|
||||||
// Trigger highs
|
// Trigger highs
|
||||||
lbl_currenthightrigger_pm.Caption :=
|
lbl_currenthightrigger_pm.Caption :=
|
||||||
Format('Current high trigger: %.1f %s',
|
Format('Current high trigger: %.1f %s',
|
||||||
@ -266,6 +284,30 @@ begin
|
|||||||
lbl_currentlowtrigger_allpollu.Caption :=
|
lbl_currentlowtrigger_allpollu.Caption :=
|
||||||
Format('Current low trigger: %.1f %s',
|
Format('Current low trigger: %.1f %s',
|
||||||
[double(FooBotTriggerArray[C_LOW, C_ALLPOLLU]), FoobotDataObject.Units[C_ALLPOLLU]]);
|
[double(FooBotTriggerArray[C_LOW, C_ALLPOLLU]), FoobotDataObject.Units[C_ALLPOLLU]]);
|
||||||
|
|
||||||
|
// Assign Edit control values
|
||||||
|
// Recommended
|
||||||
|
edt_newrec_pm.Text:=Format('%.1f', [RecommendedLevelsArray[C_PM]]);
|
||||||
|
edt_newrec_tmp.Text:=Format('%.1f', [RecommendedLevelsArray[C_TMP]]);
|
||||||
|
edt_newrec_hum.Text:=Format('%.1f', [RecommendedLevelsArray[C_HUM]]);
|
||||||
|
edt_newrec_co2.Text:=Format('%.0f', [RecommendedLevelsArray[C_CO2]]);
|
||||||
|
edt_newrec_voc.Text:=Format('%.0f', [RecommendedLevelsArray[C_VOC]]);
|
||||||
|
edt_newrec_allpollu.Text:=Format('%.1f', [RecommendedLevelsArray[C_ALLPOLLU]]);
|
||||||
|
// HighTrigger
|
||||||
|
edt_newhightrigger_pm.Text:=Format('%.1f',[double(FooBotTriggerArray[C_HIGH, C_PM])]);
|
||||||
|
edt_newhightrigger_tmp.Text:=Format('%.1f',[double(FooBotTriggerArray[C_HIGH, C_TMP])]);
|
||||||
|
edt_newhightrigger_hum.Text:=Format('%.1f',[double(FooBotTriggerArray[C_HIGH, C_HUM])]);
|
||||||
|
edt_newhightrigger_co2.Text:=Format('%.0f',[double(FooBotTriggerArray[C_HIGH, C_CO2])]);
|
||||||
|
edt_newhightrigger_voc.Text:=Format('%.0f',[double(FooBotTriggerArray[C_HIGH, C_VOC])]);
|
||||||
|
edt_newhightrigger_allpollu.Text:=Format('%.1f',[double(FooBotTriggerArray[C_HIGH, C_ALLPOLLU])]);
|
||||||
|
// LowTrigger
|
||||||
|
edt_newlowtrigger_pm.Text:=Format('%.1f',[double(FooBotTriggerArray[C_LOW, C_PM])]);
|
||||||
|
edt_newlowtrigger_tmp.Text:=Format('%.1f',[double(FooBotTriggerArray[C_LOW, C_TMP])]);
|
||||||
|
edt_newlowtrigger_hum.Text:=Format('%.1f',[double(FooBotTriggerArray[C_LOW, C_HUM])]);
|
||||||
|
edt_newlowtrigger_co2.Text:=Format('%.0f',[double(FooBotTriggerArray[C_LOW, C_CO2])]);
|
||||||
|
edt_newlowtrigger_voc.Text:=Format('%.0f',[double(FooBotTriggerArray[C_LOW, C_VOC])]);
|
||||||
|
edt_newlowtrigger_allpollu.Text:=Format('%.1f',[double(FooBotTriggerArray[C_LOW, C_ALLPOLLU])]);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Ttriggersform.SetUpUnits;
|
procedure Ttriggersform.SetUpUnits;
|
||||||
|
Reference in New Issue
Block a user