Author: jerome
Date: 2009-09-15 10:53:53 +0200 (Tue, 15 Sep 2009)
New Revision: 5387
Modified:
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
Log:
* Fixed a possible bug if user has not connected his Tux Droid before starting
Second Installer ( Waiting HID ready ).
Modified:
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
===================================================================
---
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
2009-09-15 08:25:36 UTC (rev 5386)
+++
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
2009-09-15 08:53:53 UTC (rev 5387)
@@ -316,6 +316,9 @@
{#### Next button clicked ####}
procedure TForm1.NextButtonClick();
+var
+ HIDTimeout : Integer;
+ HIDCheck : boolean;
begin
//Invalidate buttons
invalidateButtons();
@@ -350,6 +353,36 @@
Inc(hardwareTestCount, 1);
+ //Checking first HID state.
+ with TDongleHIDCheck.create(nil) do
+ begin
+ invalidateButtons();
+ HIDCheck := False;
+ HIDTimeout := 0;
+ while not HIDCheck do
+ begin
+ if not ( HIDTimeout >= 60000 ) then
+ begin
+ sleep(1000);
+ HIDCheck := Check();
+ Application.ProcessMessages();
+ Inc(HIDTimeout, 1);
+ end;
+ end;
+ //If detected, sleeping to let Windows finishing install drivers (
needed for low perf computers ).
+ sleep(3000);
+ //Finally, refreshing states.
+ try
+ if values <> nil then
+ values.Clear;
+ TuxUtils.getStates(values);
+ sleep(500);
+ except
+
+ end;
+ validateButtons();
+ end;
+
if not TuxUtils.isDongleConnected(values) then
begin
invalidateButtons();
@@ -855,9 +888,9 @@
sleep(1000);
Form4.PmGauge1.Progress := 95;
Application.ProcessMessages;
- sleep(1000);
+ sleep(2000);
Form4.PmGauge1.Progress := 100;
- Sleep(500);
+ Sleep(1000);
Form4.Visible := false;
end;
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn