[tuxdroid-svn] r5387 - software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-inst
Status: Beta
Brought to you by:
ks156
|
From: jerome <c2m...@c2...> - 2009-09-15 08:54:17
|
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;
|