You've already forked lazarus-ccr
To V0.1.2.0
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5592 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -272,9 +272,11 @@ procedure TSensorPanel.SetValueRed(AValue: Double);
|
|||||||
begin
|
begin
|
||||||
if (AValue <> FValueRed) then
|
if (AValue <> FValueRed) then
|
||||||
begin
|
begin
|
||||||
if (AValue < FValueMin) or (AValue > FValueMax) then
|
{
|
||||||
|
if (AValue < 0) or (AValue > FValueMax) then
|
||||||
if not (csLoading in ComponentState) then
|
if not (csLoading in ComponentState) then
|
||||||
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueMin), Round(FValueMax)]);
|
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueMin), Round(FValueMax)]);
|
||||||
|
}
|
||||||
FValueRed := AValue;
|
FValueRed := AValue;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
@ -284,9 +286,11 @@ procedure TSensorPanel.SetValueYellow(AValue: Double);
|
|||||||
begin
|
begin
|
||||||
if (AValue <> FValueYellow) then
|
if (AValue <> FValueYellow) then
|
||||||
begin
|
begin
|
||||||
if (AValue < 1) or (AValue > FValueMax) then
|
{
|
||||||
|
if (AValue < 0) or (AValue > FValueMax) then
|
||||||
if not (csLoading in ComponentState) then
|
if not (csLoading in ComponentState) then
|
||||||
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueRed), Round(FValueMax)]);
|
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueRed), Round(FValueMax)]);
|
||||||
|
}
|
||||||
FValueYellow := AValue;
|
FValueYellow := AValue;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<UseVersionInfo Value="True"/>
|
<UseVersionInfo Value="True"/>
|
||||||
<MinorVersionNr Value="1"/>
|
<MinorVersionNr Value="1"/>
|
||||||
<RevisionNr Value="1"/>
|
<RevisionNr Value="2"/>
|
||||||
<StringTable Comments="Uses Foobot public API to query Foobot #1" FileDescription="Monitor for Foobot" InternalName="foobotmonitor" LegalCopyright="(c)2016 minesadorada@charcodelvalle.com" LegalTrademarks="Foobot" ProductName="Foobot" ProductVersion="0.0.0.0"/>
|
<StringTable Comments="Uses Foobot public API to query Foobot #1" FileDescription="Monitor for Foobot" InternalName="foobotmonitor" LegalCopyright="(c)2016 minesadorada@charcodelvalle.com" LegalTrademarks="Foobot" ProductName="Foobot" ProductVersion="0.0.0.0"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="6">
|
<BuildModes Count="6">
|
||||||
@ -209,7 +209,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="7">
|
<Units Count="8">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="foobotmonitor.lpr"/>
|
<Filename Value="foobotmonitor.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -244,6 +244,10 @@
|
|||||||
<Filename Value="..\ugenericcollection.pas"/>
|
<Filename Value="..\ugenericcollection.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
|
<Unit7>
|
||||||
|
<Filename Value="foobot_sensors.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit7>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -15,7 +15,7 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, tachartlazaruspkg, umainform, uconfigform
|
Forms, tachartlazaruspkg, umainform, uconfigform, foobot_sensors
|
||||||
{ you can add units after this };
|
{ you can add units after this };
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="linux64"/>
|
<BuildModes Active="linux64"/>
|
||||||
<Units Count="27">
|
<Units Count="29">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="foobotmonitor.lpr"/>
|
<Filename Value="foobotmonitor.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="11"/>
|
||||||
<CursorPos X="33" Y="25"/>
|
<CursorPos X="33" Y="25"/>
|
||||||
<UsageCount Value="84"/>
|
<UsageCount Value="86"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -19,9 +19,9 @@
|
|||||||
<ComponentName Value="mainform"/>
|
<ComponentName Value="mainform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<TopLine Value="59"/>
|
<TopLine Value="417"/>
|
||||||
<CursorPos X="15" Y="79"/>
|
<CursorPos X="29" Y="424"/>
|
||||||
<UsageCount Value="84"/>
|
<UsageCount Value="86"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -31,9 +31,9 @@
|
|||||||
<ComponentName Value="configform"/>
|
<ComponentName Value="configform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="5"/>
|
||||||
<CursorPos X="2" Y="20"/>
|
<CursorPos X="2" Y="20"/>
|
||||||
<UsageCount Value="74"/>
|
<UsageCount Value="76"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
@ -43,7 +43,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="66"/>
|
<UsageCount Value="68"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\foobot_objects.pas"/>
|
<Filename Value="..\foobot_objects.pas"/>
|
||||||
@ -52,15 +52,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="66"/>
|
<UsageCount Value="68"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="..\foobot_utility.pas"/>
|
<Filename Value="..\foobot_utility.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="8"/>
|
||||||
<TopLine Value="34"/>
|
<TopLine Value="34"/>
|
||||||
<CursorPos X="18" Y="83"/>
|
<CursorPos X="18" Y="83"/>
|
||||||
<UsageCount Value="84"/>
|
<UsageCount Value="86"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
@ -70,21 +70,21 @@
|
|||||||
<WindowIndex Value="-1"/>
|
<WindowIndex Value="-1"/>
|
||||||
<TopLine Value="-1"/>
|
<TopLine Value="-1"/>
|
||||||
<CursorPos X="-1" Y="-1"/>
|
<CursorPos X="-1" Y="-1"/>
|
||||||
<UsageCount Value="66"/>
|
<UsageCount Value="68"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="..\latest_stable\foobot_httpclient.pas"/>
|
<Filename Value="..\latest_stable\foobot_httpclient.pas"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="43"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="47" Y="13"/>
|
<CursorPos X="47" Y="13"/>
|
||||||
<UsageCount Value="58"/>
|
<UsageCount Value="59"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="..\latest_stable\foobot_objects.pas"/>
|
<Filename Value="..\latest_stable\foobot_objects.pas"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="10"/>
|
||||||
<CursorPos X="32" Y="61"/>
|
<CursorPos X="32" Y="61"/>
|
||||||
<UsageCount Value="58"/>
|
<UsageCount Value="59"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
@ -117,10 +117,10 @@
|
|||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="..\umainform.pas"/>
|
<Filename Value="..\umainform.pas"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="7"/>
|
||||||
<TopLine Value="284"/>
|
<TopLine Value="284"/>
|
||||||
<CursorPos X="38" Y="313"/>
|
<CursorPos X="38" Y="313"/>
|
||||||
<UsageCount Value="38"/>
|
<UsageCount Value="39"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
@ -152,20 +152,19 @@
|
|||||||
</Unit17>
|
</Unit17>
|
||||||
<Unit18>
|
<Unit18>
|
||||||
<Filename Value="foobot_sensors.pas"/>
|
<Filename Value="foobot_sensors.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="-1"/>
|
||||||
<EditorIndex Value="1"/>
|
<TopLine Value="251"/>
|
||||||
<TopLine Value="258"/>
|
<CursorPos X="13" Y="16"/>
|
||||||
<CursorPos X="44" Y="274"/>
|
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit18>
|
</Unit18>
|
||||||
<Unit19>
|
<Unit19>
|
||||||
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
|
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
|
||||||
<UnitName Value="Lazarus"/>
|
<UnitName Value="Lazarus"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="3"/>
|
||||||
<TopLine Value="111"/>
|
<TopLine Value="101"/>
|
||||||
<CursorPos X="18" Y="144"/>
|
<CursorPos Y="154"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit19>
|
</Unit19>
|
||||||
<Unit20>
|
<Unit20>
|
||||||
<Filename Value="C:\trunklatest\fpc\rtl\objpas\objpas.pp"/>
|
<Filename Value="C:\trunklatest\fpc\rtl\objpas\objpas.pp"/>
|
||||||
@ -190,25 +189,25 @@
|
|||||||
</Unit22>
|
</Unit22>
|
||||||
<Unit23>
|
<Unit23>
|
||||||
<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="8"/>
|
<EditorIndex Value="9"/>
|
||||||
<TopLine Value="381"/>
|
<TopLine Value="381"/>
|
||||||
<CursorPos X="24" Y="409"/>
|
<CursorPos X="24" Y="409"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="28"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit23>
|
</Unit23>
|
||||||
<Unit24>
|
<Unit24>
|
||||||
<Filename Value="..\latest_stable\udataform.pas"/>
|
<Filename Value="..\latest_stable\udataform.pas"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="4"/>
|
||||||
<TopLine Value="70"/>
|
<TopLine Value="70"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="28"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit24>
|
</Unit24>
|
||||||
<Unit25>
|
<Unit25>
|
||||||
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
|
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="781"/>
|
<TopLine Value="781"/>
|
||||||
<CursorPos X="28" Y="795"/>
|
<CursorPos X="28" Y="795"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="13"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
<Unit26>
|
<Unit26>
|
||||||
@ -218,131 +217,139 @@
|
|||||||
<CursorPos X="19" Y="51"/>
|
<CursorPos X="19" Y="51"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
</Unit26>
|
</Unit26>
|
||||||
|
<Unit27>
|
||||||
|
<Filename Value="C:\trunklatest\lazarus\components\IndustrialStuff\industrial.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<CursorPos X="18" Y="11"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit27>
|
||||||
|
<Unit28>
|
||||||
|
<Filename Value="foobot_sensors.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="310"/>
|
||||||
|
<CursorPos X="6" Y="292"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit28>
|
||||||
</Units>
|
</Units>
|
||||||
<OtherDefines Count="1">
|
<OtherDefines Count="1">
|
||||||
<Define0 Value="DEBUGMODE"/>
|
<Define0 Value="DEBUGMODE"/>
|
||||||
</OtherDefines>
|
</OtherDefines>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="28" HistoryIndex="27">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="529" Column="32" TopLine="487"/>
|
<Caret Line="374" Column="71" TopLine="344"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="532" Column="27" TopLine="489"/>
|
<Caret Line="373" Column="11" TopLine="351"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="535" Column="25" TopLine="494"/>
|
<Caret Line="292" Column="24" TopLine="248"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="531" Column="26" TopLine="494"/>
|
<Caret Line="286" Column="21" TopLine="283"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="530" Column="5" TopLine="495"/>
|
<Caret Line="58" Column="29" TopLine="35"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="529" Column="5" TopLine="494"/>
|
<Caret Line="347" Column="40" TopLine="311"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
|
||||||
<Caret Line="509" Column="22" TopLine="488"/>
|
<Caret Line="795" Column="28" TopLine="781"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="530" Column="25" TopLine="490"/>
|
<Caret Line="646" Column="114" TopLine="641"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\foobot_utility.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="243" Column="47" TopLine="218"/>
|
<Caret Line="434" Column="3" TopLine="434"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="527" Column="68" TopLine="486"/>
|
<Caret Line="48" Column="11" TopLine="34"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="523" Column="17" TopLine="488"/>
|
<Caret Line="79" Column="15" TopLine="59"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="245" TopLine="243"/>
|
<Caret Line="434" Column="3" TopLine="432"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="244" TopLine="242"/>
|
<Caret Line="435" Column="3" TopLine="433"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="264" Column="31" TopLine="242"/>
|
<Caret Line="436" Column="3" TopLine="434"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="532" Column="43" TopLine="497"/>
|
<Caret Line="443" TopLine="441"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="188" Column="16" TopLine="176"/>
|
<Caret Line="179" Column="43" TopLine="156"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="572" Column="44" TopLine="551"/>
|
<Caret Line="180" Column="60" TopLine="167"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="613" Column="58" TopLine="591"/>
|
<Caret Line="648" TopLine="627"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="620" Column="58" TopLine="598"/>
|
<Caret Line="669" Column="41" TopLine="664"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="374" Column="71" TopLine="344"/>
|
<Caret Line="188" Column="29" TopLine="166"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="373" Column="11" TopLine="351"/>
|
<Caret Line="425" Column="3" TopLine="423"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="292" Column="24" TopLine="248"/>
|
<Caret Line="415" Column="5" TopLine="413"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="286" Column="21" TopLine="283"/>
|
<Caret Line="439" Column="3" TopLine="437"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="58" Column="29" TopLine="35"/>
|
<Caret Line="548" Column="26" TopLine="546"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="347" Column="40" TopLine="311"/>
|
<Caret Line="563" TopLine="534"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
|
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
|
||||||
<Caret Line="795" Column="28" TopLine="781"/>
|
<Caret Line="795" Column="28" TopLine="781"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
|
||||||
<Caret Line="646" Column="114" TopLine="641"/>
|
<Caret Line="154" TopLine="111"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="433" Column="3" TopLine="583"/>
|
<Caret Line="563" Column="28" TopLine="561"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
|
||||||
<Filename Value="umainform.pas"/>
|
|
||||||
<Caret Line="434" Column="3" TopLine="434"/>
|
|
||||||
</Position29>
|
|
||||||
<Position30>
|
|
||||||
<Filename Value="umainform.pas"/>
|
|
||||||
<Caret Line="48" Column="11" TopLine="34"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
Binary file not shown.
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName=Foobot Monitor
|
AppName=Foobot Monitor
|
||||||
AppVersion=0.1.1.0
|
AppVersion=0.1.2.0
|
||||||
DefaultDirName={pf}\foobotmonitor
|
DefaultDirName={pf}\foobotmonitor
|
||||||
DefaultGroupName=Foobot
|
DefaultGroupName=Foobot
|
||||||
UninstallDisplayIcon={app}\foobotmonitor.exe
|
UninstallDisplayIcon={app}\foobotmonitor.exe
|
||||||
|
Binary file not shown.
Binary file not shown.
7
applications/foobot/monitor/readme.txt
Normal file
7
applications/foobot/monitor/readme.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Foobot Monitor
|
||||||
|
==============
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
Requirements are CryptINI, Industrial, TAChart
|
||||||
|
|
||||||
|
Note unit in Industrial package 'sensors.pas' has been modified to 'foobot_sensors.pas'
|
BIN
applications/foobot/monitor/sensors.res
Normal file
BIN
applications/foobot/monitor/sensors.res
Normal file
Binary file not shown.
@ -63,7 +63,7 @@ object mainform: Tmainform
|
|||||||
ValueMin = 0
|
ValueMin = 0
|
||||||
ValueMax = 40
|
ValueMax = 40
|
||||||
ValueRed = 0
|
ValueRed = 0
|
||||||
ValueYellow = 30
|
ValueYellow = 1
|
||||||
AnalogKind = akAnalog
|
AnalogKind = akAnalog
|
||||||
end
|
end
|
||||||
object as_hum: TAnalogSensor
|
object as_hum: TAnalogSensor
|
||||||
@ -452,10 +452,24 @@ object mainform: Tmainform
|
|||||||
object mnu_optionsSeperator1: TMenuItem
|
object mnu_optionsSeperator1: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
object mnu_optionsShowMinimalDisplay: TMenuItem
|
object mnu_optionsDisplay: TMenuItem
|
||||||
|
Caption = 'Display...'
|
||||||
|
OnClick = mnu_optionsDisplayClick
|
||||||
|
object mnu_optionsDisplayGuagesOnly: TMenuItem
|
||||||
AutoCheck = True
|
AutoCheck = True
|
||||||
Caption = 'Only show guages'
|
Caption = 'Guages only'
|
||||||
OnClick = mnu_optionsShowMinimalDisplayClick
|
OnClick = mnu_optionsDisplayGuagesOnlyClick
|
||||||
|
end
|
||||||
|
object mnu_optionsDisplayYellowLines: TMenuItem
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'Recommended values'
|
||||||
|
OnClick = mnu_optionsDisplayYellowLinesClick
|
||||||
|
end
|
||||||
|
object mnu_optionsDisplayRedLines: TMenuItem
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'Session maximums'
|
||||||
|
OnClick = mnu_optionsDisplayRedLinesClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object mnu_optionsSaveHighLows: TMenuItem
|
object mnu_optionsSaveHighLows: TMenuItem
|
||||||
AutoCheck = True
|
AutoCheck = True
|
||||||
|
@ -39,7 +39,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, TAGraph, TAIntervalSources, TASeries,
|
SysUtils, TAGraph, TAIntervalSources, TASeries,
|
||||||
Sensors, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Menus,
|
foobot_sensors, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Menus,
|
||||||
lclIntf, foobot_utility, uCryptIni, dateutils, uconfigform, Classes;
|
lclIntf, foobot_utility, uCryptIni, dateutils, uconfigform, Classes;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -123,6 +123,9 @@ type
|
|||||||
lbl_voclow: TLabel;
|
lbl_voclow: TLabel;
|
||||||
lbl_allpollulow: TLabel;
|
lbl_allpollulow: TLabel;
|
||||||
MainMenu1: TMainMenu;
|
MainMenu1: TMainMenu;
|
||||||
|
mnu_optionsDisplayRedLines: TMenuItem;
|
||||||
|
mnu_optionsDisplayYellowLines: TMenuItem;
|
||||||
|
mnu_optionsDisplayGuagesOnly: TMenuItem;
|
||||||
mnu_SampleEveryHalfHour: TMenuItem;
|
mnu_SampleEveryHalfHour: TMenuItem;
|
||||||
mnu_optionsResetHighsLows: TMenuItem;
|
mnu_optionsResetHighsLows: TMenuItem;
|
||||||
mnu_optionsOnlineHelp: TMenuItem;
|
mnu_optionsOnlineHelp: TMenuItem;
|
||||||
@ -140,7 +143,7 @@ type
|
|||||||
mnu_SampleEvery1Hour: TMenuItem;
|
mnu_SampleEvery1Hour: TMenuItem;
|
||||||
mnu_optionsSampleEvery: TMenuItem;
|
mnu_optionsSampleEvery: TMenuItem;
|
||||||
mnu_optionsTakeReadingNow: TMenuItem;
|
mnu_optionsTakeReadingNow: TMenuItem;
|
||||||
mnu_optionsShowMinimalDisplay: TMenuItem;
|
mnu_optionsDisplay: TMenuItem;
|
||||||
mnu_options: TMenuItem;
|
mnu_options: TMenuItem;
|
||||||
mnu_fileExit: TMenuItem;
|
mnu_fileExit: TMenuItem;
|
||||||
mnu_file: TMenuItem;
|
mnu_file: TMenuItem;
|
||||||
@ -155,11 +158,14 @@ type
|
|||||||
procedure mnupopup_fileRestoreClick(Sender: TObject);
|
procedure mnupopup_fileRestoreClick(Sender: TObject);
|
||||||
procedure mnu_fileExitClick(Sender: TObject);
|
procedure mnu_fileExitClick(Sender: TObject);
|
||||||
procedure mnu_helpAboutClick(Sender: TObject);
|
procedure mnu_helpAboutClick(Sender: TObject);
|
||||||
|
procedure mnu_optionsDisplayGuagesOnlyClick(Sender: TObject);
|
||||||
|
procedure mnu_optionsDisplayRedLinesClick(Sender: TObject);
|
||||||
|
procedure mnu_optionsDisplayYellowLinesClick(Sender: TObject);
|
||||||
procedure mnu_optionsMinimiseToTrayClick(Sender: TObject);
|
procedure mnu_optionsMinimiseToTrayClick(Sender: TObject);
|
||||||
procedure mnu_optionsOnlineHelpClick(Sender: TObject);
|
procedure mnu_optionsOnlineHelpClick(Sender: TObject);
|
||||||
procedure mnu_optionsResetHighsLowsClick(Sender: TObject);
|
procedure mnu_optionsResetHighsLowsClick(Sender: TObject);
|
||||||
procedure mnu_optionsSaveHighLowsClick(Sender: TObject);
|
procedure mnu_optionsSaveHighLowsClick(Sender: TObject);
|
||||||
procedure mnu_optionsShowMinimalDisplayClick(Sender: TObject);
|
procedure mnu_optionsDisplayClick(Sender: TObject);
|
||||||
procedure mnu_optionsTakeReadingNowClick(Sender: TObject);
|
procedure mnu_optionsTakeReadingNowClick(Sender: TObject);
|
||||||
procedure mnu_SampleEvery1HourClick(Sender: TObject);
|
procedure mnu_SampleEvery1HourClick(Sender: TObject);
|
||||||
procedure mnu_SampleEvery24HoursClick(Sender: TObject);
|
procedure mnu_SampleEvery24HoursClick(Sender: TObject);
|
||||||
@ -171,14 +177,15 @@ type
|
|||||||
procedure TrayIcon1Click(Sender: TObject);
|
procedure TrayIcon1Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
sSecretKey, sFoobotUserName, sUUID: string;
|
sSecretKey, sFoobotUserName, sUUID: string;
|
||||||
bShowMinimalDisplay: boolean;
|
bDisplayGuagesOnly, bDisplayYellowLines, bDisplayRedLines: boolean;
|
||||||
iFudgeFactor: integer;
|
iFudgeFactor: integer;
|
||||||
procedure DisplayReadings;
|
procedure DisplayReadings;
|
||||||
procedure UpdateGuage(Sender: TAnalogSensor; SensorNumber: integer);
|
procedure UpdateGuage(Sender: TAnalogSensor; SensorNumber: integer);
|
||||||
procedure UpdateHighLow(SensorNumber: integer);
|
procedure UpdateHighLow(SensorNumber: integer);
|
||||||
procedure GraphHistory;
|
procedure GraphHistory;
|
||||||
procedure GraphCurrentReading;
|
procedure GraphCurrentReading;
|
||||||
Procedure SetRecommendedLevels;
|
procedure SetYellowRecommendedLevels;
|
||||||
|
procedure SetRedSessionMax;
|
||||||
procedure SaveConfig;
|
procedure SaveConfig;
|
||||||
procedure LoadConfig;
|
procedure LoadConfig;
|
||||||
public
|
public
|
||||||
@ -214,7 +221,11 @@ begin
|
|||||||
INI.SectionHashing := False;
|
INI.SectionHashing := False;
|
||||||
ResetHighLows;
|
ResetHighLows;
|
||||||
iFudgeFactor := 20; // only needed if height set here
|
iFudgeFactor := 20; // only needed if height set here
|
||||||
bShowMinimalDisplay := False;
|
bDisplayGuagesOnly := False;
|
||||||
|
bDisplayYellowLines := False;
|
||||||
|
SetYellowRecommendedLevels;
|
||||||
|
bDisplayRedLines := False;
|
||||||
|
SetRedSessionMax;
|
||||||
TrayIcon1.Icon := Application.Icon;
|
TrayIcon1.Icon := Application.Icon;
|
||||||
TrayIcon1.Hint := Application.Title;
|
TrayIcon1.Hint := Application.Title;
|
||||||
DateTimeIntervalChartSource1.DateTimeFormat := 'hh:nn';
|
DateTimeIntervalChartSource1.DateTimeFormat := 'hh:nn';
|
||||||
@ -300,9 +311,10 @@ procedure Tmainform.FormDestroy(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
FreeAndNil(INI);
|
FreeAndNil(INI);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.SaveConfig;
|
procedure Tmainform.SaveConfig;
|
||||||
begin
|
begin
|
||||||
INI.PlainTextMode:=TRUE;
|
INI.PlainTextMode := True;
|
||||||
// Colours
|
// Colours
|
||||||
INI.WriteString('Config', 'pmColour', ColorToString(as_pm.ColorFore));
|
INI.WriteString('Config', 'pmColour', ColorToString(as_pm.ColorFore));
|
||||||
INI.WriteString('Config', 'tmpColour', ColorToString(as_tmp.ColorFore));
|
INI.WriteString('Config', 'tmpColour', ColorToString(as_tmp.ColorFore));
|
||||||
@ -324,19 +336,20 @@ begin
|
|||||||
INI.WriteFloat('Config', 'vocMaxValue', as_voc.ValueMax);
|
INI.WriteFloat('Config', 'vocMaxValue', as_voc.ValueMax);
|
||||||
INI.WriteFloat('Config', 'allpolluMinValue', as_allpollu.ValueMin);
|
INI.WriteFloat('Config', 'allpolluMinValue', as_allpollu.ValueMin);
|
||||||
INI.WriteFloat('Config', 'allpolluMaxValue', as_allpollu.ValueMax);
|
INI.WriteFloat('Config', 'allpolluMaxValue', as_allpollu.ValueMax);
|
||||||
INI.PlainTextMode:=FALSE;
|
INI.PlainTextMode := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.LoadConfig;
|
procedure Tmainform.LoadConfig;
|
||||||
begin
|
begin
|
||||||
INI.PlainTextMode:=TRUE;
|
INI.PlainTextMode := True;
|
||||||
// Colours
|
// Colours
|
||||||
as_pm.ColorFore := StringToColor(INI.ReadString('Config', 'pmColour', COL_PM));
|
as_pm.ColorFore := StringToColor(INI.ReadString('Config', 'pmColour', COL_PM));
|
||||||
as_tmp.ColorFore := StringToColor(INI.ReadString('Config', 'tmpColour', COL_TMP));
|
as_tmp.ColorFore := StringToColor(INI.ReadString('Config', 'tmpColour', COL_TMP));
|
||||||
as_hum.ColorFore := StringToColor(INI.ReadString('Config', 'humColour', COL_HUM));
|
as_hum.ColorFore := StringToColor(INI.ReadString('Config', 'humColour', COL_HUM));
|
||||||
as_co2.ColorFore := StringToColor(INI.ReadString('Config', 'co2Colour', COL_CO2));
|
as_co2.ColorFore := StringToColor(INI.ReadString('Config', 'co2Colour', COL_CO2));
|
||||||
as_voc.ColorFore := StringToColor(INI.ReadString('Config', 'vocColour', COL_VOC));
|
as_voc.ColorFore := StringToColor(INI.ReadString('Config', 'vocColour', COL_VOC));
|
||||||
as_allpollu.ColorFore:=StringToColor(INI.ReadString('Config','allpolluColour',COL_ALLPOLLU));
|
as_allpollu.ColorFore := StringToColor(
|
||||||
|
INI.ReadString('Config', 'allpolluColour', COL_ALLPOLLU));
|
||||||
lineSeries_pm.SeriesColor := as_pm.ColorFore;
|
lineSeries_pm.SeriesColor := as_pm.ColorFore;
|
||||||
lineSeries_tmp.SeriesColor := as_tmp.ColorFore;
|
lineSeries_tmp.SeriesColor := as_tmp.ColorFore;
|
||||||
lineSeries_hum.SeriesColor := as_hum.ColorFore;
|
lineSeries_hum.SeriesColor := as_hum.ColorFore;
|
||||||
@ -356,7 +369,7 @@ begin
|
|||||||
as_voc.ValueMax := INI.ReadFloat('Config', 'vocMaxValue', MAX_VOC);
|
as_voc.ValueMax := INI.ReadFloat('Config', 'vocMaxValue', MAX_VOC);
|
||||||
as_allpollu.ValueMin := INI.ReadFloat('Config', 'allpolluMinValue', MIN_ALLPOLLU);
|
as_allpollu.ValueMin := INI.ReadFloat('Config', 'allpolluMinValue', MIN_ALLPOLLU);
|
||||||
as_allpollu.ValueMax := INI.ReadFloat('Config', 'allpolluMaxValue', MAX_ALLPOLLU);
|
as_allpollu.ValueMax := INI.ReadFloat('Config', 'allpolluMaxValue', MAX_ALLPOLLU);
|
||||||
INI.PlainTextMode:=FALSE;
|
INI.PlainTextMode := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.FormWindowStateChange(Sender: TObject);
|
procedure Tmainform.FormWindowStateChange(Sender: TObject);
|
||||||
@ -401,6 +414,28 @@ begin
|
|||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.mnu_optionsDisplayGuagesOnlyClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
bDisplayGuagesOnly := mnu_optionsDisplayGuagesOnly.Checked;
|
||||||
|
if bDisplayGuagesOnly then
|
||||||
|
mainform.ClientHeight := grp_sensorDisplay.Height// + iFudgeFactor
|
||||||
|
else
|
||||||
|
mainform.ClientHeight := grp_sensorDisplay.Height + grp_chart.Height +
|
||||||
|
grp_highlow.Height;// + iFudgeFactor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.mnu_optionsDisplayRedLinesClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
bDisplayRedLines := mnu_optionsDisplayRedLines.Checked;
|
||||||
|
SetRedSessionMax;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.mnu_optionsDisplayYellowLinesClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
bDisplayYellowLines := mnu_optionsDisplayYellowLines.Checked;
|
||||||
|
SetYellowRecommendedLevels;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_optionsMinimiseToTrayClick(Sender: TObject);
|
procedure Tmainform.mnu_optionsMinimiseToTrayClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
mainform.WindowState := wsMinimized;
|
mainform.WindowState := wsMinimized;
|
||||||
@ -413,13 +448,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_optionsResetHighsLowsClick(Sender: TObject);
|
procedure Tmainform.mnu_optionsResetHighsLowsClick(Sender: TObject);
|
||||||
Var iCount:Integer;
|
var
|
||||||
|
iCount: integer;
|
||||||
begin
|
begin
|
||||||
If MessageDlg('This will erase the all-time high/low data permanently. Are you sure?',
|
if MessageDlg('This will erase the all-time high/low data permanently. Are you sure?',
|
||||||
mtConfirmation,[MBYES,MBCANCEL],0,MBCANCEL) = mrCancel then exit;
|
mtConfirmation, [mbYes, mbCancel], 0, mbCancel) = mrCancel then
|
||||||
|
exit;
|
||||||
ResetHighLows;
|
ResetHighLows;
|
||||||
SaveHighLows;
|
SaveHighLows;
|
||||||
For iCount:=1 to 6 do
|
for iCount := 1 to 6 do
|
||||||
UpdateHighLow(iCount);
|
UpdateHighLow(iCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -429,14 +466,8 @@ begin
|
|||||||
INI.WriteBool('Foobot', 'SaveLoadHighLows', SaveLoadHighLows);
|
INI.WriteBool('Foobot', 'SaveLoadHighLows', SaveLoadHighLows);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_optionsShowMinimalDisplayClick(Sender: TObject);
|
procedure Tmainform.mnu_optionsDisplayClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if mnu_optionsShowMinimalDisplay.Checked then
|
|
||||||
mainform.ClientHeight := grp_sensorDisplay.Height// + iFudgeFactor
|
|
||||||
else
|
|
||||||
mainform.ClientHeight := grp_sensorDisplay.Height + grp_chart.Height +
|
|
||||||
grp_highlow.Height;// + iFudgeFactor;
|
|
||||||
bShowMinimalDisplay := mnu_optionsShowMinimalDisplay.Checked;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_optionsTakeReadingNowClick(Sender: TObject);
|
procedure Tmainform.mnu_optionsTakeReadingNowClick(Sender: TObject);
|
||||||
@ -449,6 +480,7 @@ begin
|
|||||||
ShowMessage('Sorry - no readings available');
|
ShowMessage('Sorry - no readings available');
|
||||||
mainform.Cursor := crDefault;
|
mainform.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_SampleEveryHalfHourClick(Sender: TObject);
|
procedure Tmainform.mnu_SampleEveryHalfHourClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
tmr_foobot.Enabled := False;
|
tmr_foobot.Enabled := False;
|
||||||
@ -503,7 +535,43 @@ begin
|
|||||||
mainform.Show;
|
mainform.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure Tmainform.SetRecommendedLevels;
|
procedure Tmainform.SetRedSessionMax;
|
||||||
|
begin
|
||||||
|
if bDisplayRedLines = True then
|
||||||
|
begin
|
||||||
|
with as_pm do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
with as_tmp do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
with as_hum do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
with as_co2 do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
with as_voc do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
with as_allpollu do
|
||||||
|
if Value > ValueRed then
|
||||||
|
ValueRed := Value;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
as_pm.ValueRed := as_pm.ValueMin;
|
||||||
|
as_tmp.ValueRed := as_tmp.ValueMin;
|
||||||
|
as_hum.ValueRed := as_hum.ValueMin;
|
||||||
|
as_co2.ValueRed := as_co2.ValueMin;
|
||||||
|
as_voc.ValueRed := as_voc.ValueMin;
|
||||||
|
as_allpollu.ValueRed := as_allpollu.ValueMin;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.SetYellowRecommendedLevels;
|
||||||
|
begin
|
||||||
|
if bDisplayYellowLines = True then
|
||||||
begin
|
begin
|
||||||
as_pm.ValueYellow := REC_PM;
|
as_pm.ValueYellow := REC_PM;
|
||||||
as_tmp.ValueYellow := REC_TMP;
|
as_tmp.ValueYellow := REC_TMP;
|
||||||
@ -511,6 +579,16 @@ begin
|
|||||||
as_co2.ValueYellow := REC_CO2;
|
as_co2.ValueYellow := REC_CO2;
|
||||||
as_voc.ValueYellow := REC_VOC;
|
as_voc.ValueYellow := REC_VOC;
|
||||||
as_allpollu.ValueYellow := REC_ALLPOLLU;
|
as_allpollu.ValueYellow := REC_ALLPOLLU;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
as_pm.ValueYellow := as_pm.ValueMin;
|
||||||
|
as_tmp.ValueYellow := as_tmp.ValueMin;
|
||||||
|
as_hum.ValueYellow := as_hum.ValueMin;
|
||||||
|
as_co2.ValueYellow := as_co2.ValueMin;
|
||||||
|
as_voc.ValueYellow := as_voc.ValueMin;
|
||||||
|
as_allpollu.ValueYellow := as_allpollu.ValueMin;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.UpdateHighLow(SensorNumber: integer);
|
procedure Tmainform.UpdateHighLow(SensorNumber: integer);
|
||||||
@ -623,10 +701,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
if Value > ValueMax then
|
if Value > ValueMax then
|
||||||
ValueMax := Value;
|
ValueMax := Value;
|
||||||
ValueYellow := ValueMax;
|
if bDisplayRedLines then
|
||||||
if Value > ValueRed then
|
if Value > ValueRed then
|
||||||
ValueRed := Value;
|
ValueRed := Value;
|
||||||
SetRecommendedLevels;
|
if bDisplayYellowLines then
|
||||||
|
SetYellowRecommendedLevels;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -645,7 +724,7 @@ begin
|
|||||||
UpdateGuage(as_co2, 4);
|
UpdateGuage(as_co2, 4);
|
||||||
UpdateGuage(as_voc, 5);
|
UpdateGuage(as_voc, 5);
|
||||||
UpdateGuage(as_allpollu, 6);
|
UpdateGuage(as_allpollu, 6);
|
||||||
if not bShowMinimalDisplay then
|
if not bDisplayGuagesOnly then
|
||||||
begin
|
begin
|
||||||
for iCount := 1 to 6 do
|
for iCount := 1 to 6 do
|
||||||
UpdateHighLow(iCount);
|
UpdateHighLow(iCount);
|
||||||
@ -687,7 +766,8 @@ var
|
|||||||
begin
|
begin
|
||||||
iEndSeconds := DateTimeToUnix(Now) - 3600;
|
iEndSeconds := DateTimeToUnix(Now) - 3600;
|
||||||
iStartSeconds := iEndSeconds - (2 * (24 * 3600)); // 49 hours before Now
|
iStartSeconds := iEndSeconds - (2 * (24 * 3600)); // 49 hours before Now
|
||||||
grp_chart.Caption:=Format('History from %s',[FormatDateTime('dd/mm/yyyy hh:nn',UnixToDateTime(iStartSeconds))]);
|
grp_chart.Caption := Format('History from %s',
|
||||||
|
[FormatDateTime('dd/mm/yyyy hh:nn', UnixToDateTime(iStartSeconds))]);
|
||||||
if FetchFoobotData(dfStartEnd, 0, 0, 3600, iStartSeconds, iEndSeconds, sSecretKey) =
|
if FetchFoobotData(dfStartEnd, 0, 0, 3600, iStartSeconds, iEndSeconds, sSecretKey) =
|
||||||
False then
|
False then
|
||||||
exit;
|
exit;
|
||||||
|
Reference in New Issue
Block a user