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:
gbamber
2017-01-05 09:17:25 +00:00
parent e7dce54cf8
commit 0f07b81e94
12 changed files with 274 additions and 158 deletions

View File

@@ -272,9 +272,11 @@ procedure TSensorPanel.SetValueRed(AValue: Double);
begin
if (AValue <> FValueRed) then
begin
if (AValue < FValueMin) or (AValue > FValueMax) then
{
if (AValue < 0) or (AValue > FValueMax) then
if not (csLoading in ComponentState) then
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueMin), Round(FValueMax)]);
}
FValueRed := AValue;
Invalidate;
end;
@@ -284,9 +286,11 @@ procedure TSensorPanel.SetValueYellow(AValue: Double);
begin
if (AValue <> FValueYellow) then
begin
if (AValue < 1) or (AValue > FValueMax) then
{
if (AValue < 0) or (AValue > FValueMax) then
if not (csLoading in ComponentState) then
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueRed), Round(FValueMax)]);
}
FValueYellow := AValue;
Invalidate;
end;