You've already forked lazarus-ccr
V0.2.2.0 work-in-progress. ToDo: Trigger config form
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5614 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8,9 +8,9 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="foobotmonitor.lpr"/>
|
<Filename Value="foobotmonitor.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="12"/>
|
<EditorIndex Value="13"/>
|
||||||
<CursorPos Y="35"/>
|
<CursorPos Y="35"/>
|
||||||
<UsageCount Value="119"/>
|
<UsageCount Value="120"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -20,9 +20,9 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="1113"/>
|
<TopLine Value="981"/>
|
||||||
<CursorPos X="86" Y="1135"/>
|
<CursorPos X="43" Y="1035"/>
|
||||||
<UsageCount Value="119"/>
|
<UsageCount Value="120"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -32,20 +32,20 @@
|
|||||||
<ComponentName Value="configform"/>
|
<ComponentName Value="configform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="8"/>
|
||||||
<TopLine Value="33"/>
|
<TopLine Value="33"/>
|
||||||
<CursorPos X="41" Y="45"/>
|
<CursorPos X="41" Y="45"/>
|
||||||
<UsageCount Value="109"/>
|
<UsageCount Value="110"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\foobot_httpclient.pas"/>
|
<Filename Value="..\foobot_httpclient.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="380"/>
|
<CursorPos X="49" Y="20"/>
|
||||||
<CursorPos X="35" Y="387"/>
|
<UsageCount Value="102"/>
|
||||||
<UsageCount Value="101"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\foobot_objects.pas"/>
|
<Filename Value="..\foobot_objects.pas"/>
|
||||||
@ -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="101"/>
|
<UsageCount Value="102"/>
|
||||||
</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="10"/>
|
||||||
<TopLine Value="123"/>
|
<TopLine Value="129"/>
|
||||||
<CursorPos X="49" Y="212"/>
|
<CursorPos X="49" Y="212"/>
|
||||||
<UsageCount Value="119"/>
|
<UsageCount Value="120"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
@ -72,15 +72,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="101"/>
|
<UsageCount Value="102"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="foobot_sensors.pas"/>
|
<Filename Value="foobot_sensors.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="5"/>
|
||||||
<TopLine Value="299"/>
|
<TopLine Value="299"/>
|
||||||
<CursorPos X="14" Y="321"/>
|
<CursorPos X="14" Y="321"/>
|
||||||
<UsageCount Value="53"/>
|
<UsageCount Value="54"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
@ -89,9 +89,9 @@
|
|||||||
<ComponentName Value="splashform"/>
|
<ComponentName Value="splashform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="3"/>
|
||||||
<CursorPos X="42" Y="25"/>
|
<CursorPos X="42" Y="25"/>
|
||||||
<UsageCount Value="48"/>
|
<UsageCount Value="49"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
@ -100,26 +100,26 @@
|
|||||||
<ComponentName Value="triggersform"/>
|
<ComponentName Value="triggersform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="2"/>
|
||||||
<CursorPos X="41" Y="7"/>
|
<CursorPos X="41" Y="7"/>
|
||||||
<UsageCount Value="39"/>
|
<UsageCount Value="40"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="..\latest_stable\foobot_httpclient.pas"/>
|
<Filename Value="..\latest_stable\foobot_httpclient.pas"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="9"/>
|
||||||
<TopLine Value="43"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="47" Y="13"/>
|
<CursorPos X="47" Y="13"/>
|
||||||
<UsageCount Value="74"/>
|
<UsageCount Value="75"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
<Filename Value="..\latest_stable\foobot_objects.pas"/>
|
<Filename Value="..\latest_stable\foobot_objects.pas"/>
|
||||||
<EditorIndex Value="11"/>
|
<EditorIndex Value="12"/>
|
||||||
<TopLine Value="143"/>
|
<TopLine Value="143"/>
|
||||||
<CursorPos X="35" Y="59"/>
|
<CursorPos X="35" Y="59"/>
|
||||||
<UsageCount Value="74"/>
|
<UsageCount Value="75"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit11>
|
</Unit11>
|
||||||
<Unit12>
|
<Unit12>
|
||||||
@ -187,10 +187,10 @@
|
|||||||
<Unit21>
|
<Unit21>
|
||||||
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
|
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
|
||||||
<UnitName Value="Lazarus"/>
|
<UnitName Value="Lazarus"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="101"/>
|
<TopLine Value="101"/>
|
||||||
<CursorPos Y="154"/>
|
<CursorPos Y="154"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
@ -216,17 +216,17 @@
|
|||||||
</Unit24>
|
</Unit24>
|
||||||
<Unit25>
|
<Unit25>
|
||||||
<Filename Value="C:\trunklatest\fpc\packages\rtl-objpas\src\inc\dateutil.inc"/>
|
<Filename Value="C:\trunklatest\fpc\packages\rtl-objpas\src\inc\dateutil.inc"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="11"/>
|
||||||
<TopLine Value="381"/>
|
<TopLine Value="381"/>
|
||||||
<CursorPos X="13" Y="384"/>
|
<CursorPos X="13" Y="384"/>
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="44"/>
|
||||||
<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="7"/>
|
||||||
<TopLine Value="70"/>
|
<TopLine Value="70"/>
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="44"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit26>
|
</Unit26>
|
||||||
<Unit27>
|
<Unit27>
|
||||||
@ -267,10 +267,10 @@
|
|||||||
<Unit32>
|
<Unit32>
|
||||||
<Filename Value="C:\trunklatest\lazarus\lcl\graphics.pp"/>
|
<Filename Value="C:\trunklatest\lazarus\lcl\graphics.pp"/>
|
||||||
<UnitName Value="Graphics"/>
|
<UnitName Value="Graphics"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="4"/>
|
||||||
<TopLine Value="1811"/>
|
<TopLine Value="1811"/>
|
||||||
<CursorPos X="13" Y="1834"/>
|
<CursorPos X="13" Y="1834"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit32>
|
</Unit32>
|
||||||
<Unit33>
|
<Unit33>
|
||||||
@ -285,123 +285,123 @@
|
|||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="953" TopLine="920"/>
|
<Caret Line="938" Column="17" TopLine="930"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="929" Column="17" TopLine="921"/>
|
<Caret Line="940" Column="17" TopLine="932"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="930" Column="17" TopLine="922"/>
|
<Caret Line="942" Column="17" TopLine="934"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="932" Column="17" TopLine="924"/>
|
<Caret Line="287" TopLine="250"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="931" Column="17" TopLine="923"/>
|
<Caret Line="580" Column="32" TopLine="574"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="932" Column="17" TopLine="924"/>
|
<Caret Line="581" Column="32" TopLine="575"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="934" Column="17" TopLine="926"/>
|
<Caret Line="580" Column="32" TopLine="574"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="936" Column="17" TopLine="928"/>
|
<Caret Line="973" Column="18" TopLine="934"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="938" Column="17" TopLine="930"/>
|
<Caret Line="987" Column="17" TopLine="945"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="940" Column="17" TopLine="932"/>
|
<Caret Line="580" Column="49" TopLine="575"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="942" Column="17" TopLine="934"/>
|
<Caret Line="581" Column="49" TopLine="576"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="287" TopLine="250"/>
|
<Caret Line="582" Column="49" TopLine="577"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="580" Column="32" TopLine="574"/>
|
<Caret Line="583" Column="49" TopLine="578"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="581" Column="32" TopLine="575"/>
|
<Caret Line="586" Column="49" TopLine="581"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="580" Column="32" TopLine="574"/>
|
<Caret Line="589" Column="49" TopLine="584"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="973" Column="18" TopLine="934"/>
|
<Caret Line="592" Column="49" TopLine="587"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="987" Column="17" TopLine="945"/>
|
<Caret Line="595" Column="49" TopLine="590"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="580" Column="49" TopLine="575"/>
|
<Caret Line="598" Column="49" TopLine="593"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="581" Column="49" TopLine="576"/>
|
<Caret Line="402" Column="29" TopLine="369"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="582" Column="49" TopLine="577"/>
|
<Caret Line="438" Column="37" TopLine="401"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="583" Column="49" TopLine="578"/>
|
<Caret Line="415" Column="89" TopLine="393"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="586" Column="49" TopLine="581"/>
|
<Caret Line="417" Column="66" TopLine="395"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="589" Column="49" TopLine="584"/>
|
<Caret Line="1076" Column="38" TopLine="1035"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="592" Column="49" TopLine="587"/>
|
<Caret Line="709" Column="8" TopLine="696"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="595" Column="49" TopLine="590"/>
|
<Caret Line="462" Column="59" TopLine="411"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="598" Column="49" TopLine="593"/>
|
<Caret Line="463" Column="44" TopLine="422"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="402" Column="29" TopLine="369"/>
|
<Caret Line="408" Column="36" TopLine="382"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="438" Column="37" TopLine="401"/>
|
<Caret Line="1001" Column="34" TopLine="974"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="415" Column="89" TopLine="393"/>
|
<Caret Line="463" Column="44" TopLine="438"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="417" Column="66" TopLine="395"/>
|
<Caret Line="346" Column="11" TopLine="6"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
|
@ -233,7 +233,7 @@ type
|
|||||||
procedure SaveConfig;
|
procedure SaveConfig;
|
||||||
procedure LoadConfig;
|
procedure LoadConfig;
|
||||||
procedure SetMinMaxTriggers;
|
procedure SetMinMaxTriggers;
|
||||||
procedure SetTrafficLightStats;
|
procedure SetTrafficLightStats(iSensorNum: integer; HIGHLOW: integer);
|
||||||
procedure DoHighTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
procedure DoHighTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
||||||
procedure DoLowTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
procedure DoLowTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
||||||
procedure RestoreNormalColour(const iSensorNum: integer);
|
procedure RestoreNormalColour(const iSensorNum: integer);
|
||||||
@ -301,7 +301,7 @@ end;
|
|||||||
procedure Tmainform.FormActivate(Sender: TObject);
|
procedure Tmainform.FormActivate(Sender: TObject);
|
||||||
var
|
var
|
||||||
sTempFoobotUserName, sTempSecretKey: string;
|
sTempFoobotUserName, sTempSecretKey: string;
|
||||||
|
iCount: integer;
|
||||||
begin
|
begin
|
||||||
ClientHeight := grp_sensorDisplay.Height + grp_highlow.Height +
|
ClientHeight := grp_sensorDisplay.Height + grp_highlow.Height +
|
||||||
grp_health.Height + grp_chart.Height;
|
grp_health.Height + grp_chart.Height;
|
||||||
@ -343,7 +343,8 @@ begin
|
|||||||
LoadTriggers; // This can only be done if we have a Foobot Identity
|
LoadTriggers; // This can only be done if we have a Foobot Identity
|
||||||
// as each Foobot has its own trigger values
|
// as each Foobot has its own trigger values
|
||||||
SetMinMaxTriggers; // Adjust if necesarry for Guage High/Low limits
|
SetMinMaxTriggers; // Adjust if necesarry for Guage High/Low limits
|
||||||
SetTrafficLightStats;
|
for iCount := C_PM to C_ALLPOLLU do
|
||||||
|
SetTrafficLightStats(iCount, C_HIGH);
|
||||||
Show;
|
Show;
|
||||||
{$IFNDEF DEBUGMODE}
|
{$IFNDEF DEBUGMODE}
|
||||||
mnu_optionsTakeReadingNow.Click;
|
mnu_optionsTakeReadingNow.Click;
|
||||||
@ -396,46 +397,87 @@ begin
|
|||||||
mnu_optionsTakeReadingNow.Click;
|
mnu_optionsTakeReadingNow.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.SetTrafficLightStats;
|
procedure Tmainform.SetTrafficLightStats(iSensorNum: integer; HIGHLOW: integer);
|
||||||
begin
|
begin
|
||||||
lbl_redlightpm.Caption := Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_PM]),
|
if iSensorNum = C_PM then
|
||||||
FoobotDataObject.Units[C_PM]]);
|
if (HIGHLOW = C_HIGH) then
|
||||||
lbl_yellowlightpm.Caption := Format('> %.1f %s', [double(REC_PM),
|
lbl_redlightpm.Caption :=
|
||||||
FoobotDataObject.Units[C_PM]]);
|
Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_PM]),
|
||||||
lbl_greenlightpm.Caption := Format('< %.1f %s', [double(REC_PM),
|
FoobotDataObject.Units[C_PM]])
|
||||||
FoobotDataObject.Units[C_PM]]);
|
else
|
||||||
|
lbl_redlightpm.Caption :=
|
||||||
|
Format('< %.1f %s', [double(FooBotTriggerArray[C_LOW, C_PM]),
|
||||||
|
FoobotDataObject.Units[C_PM]]);
|
||||||
|
lbl_yellowlightpm.Caption :=
|
||||||
|
Format('> %.1f %s', [double(REC_PM), FoobotDataObject.Units[C_PM]]);
|
||||||
|
lbl_greenlightpm.Caption :=
|
||||||
|
Format('< %.1f %s', [double(REC_PM), FoobotDataObject.Units[C_PM]]);
|
||||||
|
|
||||||
lbl_redlighttmp.Caption := Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_TMP]),
|
if iSensorNum = C_TMP then
|
||||||
FoobotDataObject.Units[C_TMP]]);
|
if (HIGHLOW = C_HIGH) then
|
||||||
|
lbl_redlighttmp.Caption :=
|
||||||
|
Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_TMP]),
|
||||||
|
FoobotDataObject.Units[C_TMP]])
|
||||||
|
else
|
||||||
|
lbl_redlighttmp.Caption :=
|
||||||
|
Format('< %.1f %s', [double(FooBotTriggerArray[C_LOW, C_TMP]),
|
||||||
|
FoobotDataObject.Units[C_TMP]]);
|
||||||
lbl_yellowlighttmp.Caption :=
|
lbl_yellowlighttmp.Caption :=
|
||||||
Format('> %.1f %s', [double(REC_TMP), FoobotDataObject.Units[C_TMP]]);
|
Format('> %.1f %s', [double(REC_TMP), FoobotDataObject.Units[C_TMP]]);
|
||||||
lbl_greenlighttmp.Caption := Format('< %.1f %s', [double(REC_TMP),
|
lbl_greenlighttmp.Caption :=
|
||||||
FoobotDataObject.Units[C_TMP]]);
|
Format('< %.1f %s', [double(REC_TMP), FoobotDataObject.Units[C_TMP]]);
|
||||||
|
|
||||||
lbl_redlighthum.Caption := Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_HUM]),
|
if iSensorNum = C_HUM then
|
||||||
FoobotDataObject.Units[C_HUM]]);
|
if (HIGHLOW = C_HIGH) then
|
||||||
|
lbl_redlighthum.Caption :=
|
||||||
|
Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_HUM]),
|
||||||
|
FoobotDataObject.Units[C_HUM]])
|
||||||
|
else
|
||||||
|
lbl_redlighthum.Caption :=
|
||||||
|
Format('< %.1f %s', [double(FooBotTriggerArray[C_LOW, C_HUM]),
|
||||||
|
FoobotDataObject.Units[C_HUM]]);
|
||||||
lbl_yellowlighthum.Caption :=
|
lbl_yellowlighthum.Caption :=
|
||||||
Format('> %.1f %s', [double(REC_HUM), FoobotDataObject.Units[C_HUM]]);
|
Format('> %.1f %s', [double(REC_HUM), FoobotDataObject.Units[C_HUM]]);
|
||||||
lbl_greenlighthum.Caption := Format('< %.1f %s', [double(REC_HUM),
|
lbl_greenlighthum.Caption :=
|
||||||
FoobotDataObject.Units[C_HUM]]);
|
Format('< %.1f %s', [double(REC_HUM), FoobotDataObject.Units[C_HUM]]);
|
||||||
|
|
||||||
lbl_redlightco2.Caption := Format('> %.0f %s', [double(FooBotTriggerArray[C_HIGH, C_CO2]),
|
if iSensorNum = C_CO2 then
|
||||||
FoobotDataObject.Units[C_CO2]]);
|
if (HIGHLOW = C_HIGH) then
|
||||||
|
lbl_redlightco2.Caption :=
|
||||||
|
Format('> %.0f %s', [double(FooBotTriggerArray[C_HIGH, C_CO2]),
|
||||||
|
FoobotDataObject.Units[C_CO2]])
|
||||||
|
else
|
||||||
|
lbl_redlightco2.Caption :=
|
||||||
|
Format('< %.0f %s', [double(FooBotTriggerArray[C_LOW, C_CO2]),
|
||||||
|
FoobotDataObject.Units[C_CO2]]);
|
||||||
lbl_yellowlightco2.Caption :=
|
lbl_yellowlightco2.Caption :=
|
||||||
Format('> %.0f %s', [double(REC_CO2), FoobotDataObject.Units[C_CO2]]);
|
Format('> %.0f %s', [double(REC_CO2), FoobotDataObject.Units[C_CO2]]);
|
||||||
lbl_greenlightco2.Caption := Format('< %.0f %s', [double(REC_CO2),
|
lbl_greenlightco2.Caption :=
|
||||||
FoobotDataObject.Units[C_CO2]]);
|
Format('< %.0f %s', [double(REC_CO2), FoobotDataObject.Units[C_CO2]]);
|
||||||
|
|
||||||
lbl_redlightvoc.Caption := Format('> %.0f %s', [double(FooBotTriggerArray[C_HIGH, C_VOC]),
|
if iSensorNum = C_VOC then
|
||||||
FoobotDataObject.Units[C_VOC]]);
|
if (HIGHLOW = C_HIGH) then
|
||||||
|
lbl_redlightvoc.Caption :=
|
||||||
|
Format('> %.0f %s', [double(FooBotTriggerArray[C_HIGH, C_VOC]),
|
||||||
|
FoobotDataObject.Units[C_VOC]])
|
||||||
|
else
|
||||||
|
lbl_redlightvoc.Caption :=
|
||||||
|
Format('< %.0f %s', [double(FooBotTriggerArray[C_LOW, C_VOC]),
|
||||||
|
FoobotDataObject.Units[C_VOC]]);
|
||||||
lbl_yellowlightvoc.Caption :=
|
lbl_yellowlightvoc.Caption :=
|
||||||
Format('> %.0f %s', [double(REC_VOC), FoobotDataObject.Units[C_VOC]]);
|
Format('> %.0f %s', [double(REC_VOC), FoobotDataObject.Units[C_VOC]]);
|
||||||
lbl_greenlightvoc.Caption := Format('< %.0f %s', [double(REC_VOC),
|
lbl_greenlightvoc.Caption :=
|
||||||
FoobotDataObject.Units[C_VOC]]);
|
Format('< %.0f %s', [double(REC_VOC), FoobotDataObject.Units[C_VOC]]);
|
||||||
|
|
||||||
lbl_redlightallpollu.Caption :=
|
if iSensorNum = C_ALLPOLLU then
|
||||||
Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_ALLPOLLU]),
|
if (HIGHLOW = C_HIGH) then
|
||||||
FoobotDataObject.Units[C_ALLPOLLU]]);
|
lbl_redlightallpollu.Caption :=
|
||||||
|
Format('> %.1f %s', [double(FooBotTriggerArray[C_HIGH, C_ALLPOLLU]),
|
||||||
|
FoobotDataObject.Units[C_ALLPOLLU]])
|
||||||
|
else
|
||||||
|
lbl_redlightallpollu.Caption :=
|
||||||
|
Format('< %.1f %s', [double(FooBotTriggerArray[C_LOW, C_ALLPOLLU]),
|
||||||
|
FoobotDataObject.Units[C_ALLPOLLU]]);
|
||||||
lbl_yellowlightallpollu.Caption :=
|
lbl_yellowlightallpollu.Caption :=
|
||||||
Format('> %.1f %s', [double(REC_ALLPOLLU), FoobotDataObject.Units[C_ALLPOLLU]]);
|
Format('> %.1f %s', [double(REC_ALLPOLLU), FoobotDataObject.Units[C_ALLPOLLU]]);
|
||||||
lbl_greenlightallpollu.Caption :=
|
lbl_greenlightallpollu.Caption :=
|
||||||
@ -470,8 +512,8 @@ end;
|
|||||||
procedure Tmainform.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure Tmainform.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
SaveConfig; // to .cfg file
|
SaveConfig; // to .cfg file
|
||||||
if (FoobotIdentityObject.FoobotIdentityList.Count > 0) then
|
if UseTriggers then
|
||||||
SaveTriggers;
|
SaveTriggers; // To .ini file
|
||||||
CloseAction := caFree;
|
CloseAction := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -586,9 +628,10 @@ begin
|
|||||||
as_allpollu.ValueMax := INI.ReadFloat('Config', 'allpolluMaxValue', MAX_ALLPOLLU);
|
as_allpollu.ValueMax := INI.ReadFloat('Config', 'allpolluMaxValue', MAX_ALLPOLLU);
|
||||||
// Triggers
|
// Triggers
|
||||||
UseTriggers := INI.ReadBool('Config', 'UseTriggers', False);
|
UseTriggers := INI.ReadBool('Config', 'UseTriggers', False);
|
||||||
HighTriggerColor := StringToColor(INI.ReadString('Config', 'HighTriggerColour',
|
HighTriggerColor := StringToColor(INI.ReadString('Config',
|
||||||
'clYellow'));
|
'HighTriggerColour', 'clYellow'));
|
||||||
LowTriggerColor := StringToColor(INI.ReadString('Config', 'LowTriggerColour', 'clAqua'));
|
LowTriggerColor := StringToColor(INI.ReadString('Config',
|
||||||
|
'LowTriggerColour', 'clAqua'));
|
||||||
INI.PlainTextMode := False;
|
INI.PlainTextMode := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -702,6 +745,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_options_triggersActivateTriggersClick(Sender: TObject);
|
procedure Tmainform.mnu_options_triggersActivateTriggersClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
icount: integer;
|
||||||
begin
|
begin
|
||||||
mnu_options_triggersActivateTriggers.Checked :=
|
mnu_options_triggersActivateTriggers.Checked :=
|
||||||
not mnu_options_triggersActivateTriggers.Checked;
|
not mnu_options_triggersActivateTriggers.Checked;
|
||||||
@ -711,9 +756,14 @@ begin
|
|||||||
mnu_options_triggersActivateTriggers.Caption := 'Set Triggers Off';
|
mnu_options_triggersActivateTriggers.Caption := 'Set Triggers Off';
|
||||||
LoadTriggers;
|
LoadTriggers;
|
||||||
SetMinMaxTriggers;
|
SetMinMaxTriggers;
|
||||||
|
DisplayReadings;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
mnu_options_triggersActivateTriggers.Caption := 'Set Triggers On';
|
mnu_options_triggersActivateTriggers.Caption := 'Set Triggers On';
|
||||||
|
for iCount := C_PM to C_ALLPOLLU do
|
||||||
|
RestoreNormalColour(iCount);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_options_triggersSetTriggersClick(Sender: TObject);
|
procedure Tmainform.mnu_options_triggersSetTriggersClick(Sender: TObject);
|
||||||
@ -969,6 +1019,7 @@ begin
|
|||||||
C_VOC: as_voc.Color := HighTriggerColor;
|
C_VOC: as_voc.Color := HighTriggerColor;
|
||||||
C_ALLPOLLU: as_allpollu.Color := HighTriggerColor;
|
C_ALLPOLLU: as_allpollu.Color := HighTriggerColor;
|
||||||
end;
|
end;
|
||||||
|
SetTrafficLightStats(iSensorNum, C_HIGH);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.DoLowTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
procedure Tmainform.DoLowTriggerAlert(const iSensorNum: integer; const aValue: variant);
|
||||||
@ -981,6 +1032,7 @@ begin
|
|||||||
C_VOC: as_voc.Color := LowTriggerColor;
|
C_VOC: as_voc.Color := LowTriggerColor;
|
||||||
C_ALLPOLLU: as_allpollu.Color := LowTriggerColor;
|
C_ALLPOLLU: as_allpollu.Color := LowTriggerColor;
|
||||||
end;
|
end;
|
||||||
|
SetTrafficLightStats(iSensorNum, C_LOW);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.RestoreNormalColour(const iSensorNum: integer);
|
procedure Tmainform.RestoreNormalColour(const iSensorNum: integer);
|
||||||
@ -997,32 +1049,32 @@ end;
|
|||||||
|
|
||||||
procedure Tmainform.UpdateHealth;
|
procedure Tmainform.UpdateHealth;
|
||||||
begin
|
begin
|
||||||
if (as_pm.Value > REC_PM) then
|
if (as_pm.Value >= REC_PM) then
|
||||||
sls_pm.State := slYELLOW
|
sls_pm.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_pm.State := slGREEN;
|
sls_pm.State := slGREEN;
|
||||||
|
|
||||||
if (as_tmp.Value > REC_TMP) then
|
if (as_tmp.Value >= REC_TMP) then
|
||||||
sls_tmp.State := slYELLOW
|
sls_tmp.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_tmp.State := slGREEN;
|
sls_tmp.State := slGREEN;
|
||||||
|
|
||||||
if (as_hum.Value > REC_HUM) then
|
if (as_hum.Value >= REC_HUM) then
|
||||||
sls_hum.State := slYELLOW
|
sls_hum.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_hum.State := slGREEN;
|
sls_hum.State := slGREEN;
|
||||||
|
|
||||||
if (as_co2.Value > REC_CO2) then
|
if (as_co2.Value >= REC_CO2) then
|
||||||
sls_co2.State := slYELLOW
|
sls_co2.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_co2.State := slGREEN;
|
sls_co2.State := slGREEN;
|
||||||
|
|
||||||
if (as_voc.Value > REC_VOC) then
|
if (as_voc.Value >= REC_VOC) then
|
||||||
sls_voc.State := slYELLOW
|
sls_voc.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_voc.State := slGREEN;
|
sls_voc.State := slGREEN;
|
||||||
|
|
||||||
if (as_allpollu.Value > REC_ALLPOLLU) then
|
if (as_allpollu.Value >= REC_ALLPOLLU) then
|
||||||
sls_allpollu.State := slYELLOW
|
sls_allpollu.State := slYELLOW
|
||||||
else
|
else
|
||||||
sls_allpollu.State := slGREEN;
|
sls_allpollu.State := slGREEN;
|
||||||
|
Reference in New Issue
Block a user