Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Double calls of OpenADC()? (http://www.chiefdelphi.com/forums/showthread.php?t=34302)

Astronouth7303 09-02-2005 21:59

Double calls of OpenADC()?
 
Tonight, I found something interesting relating to the gyro code and Get_Analog_Value().

The initialization of the gyro code (Initialize_Gyro()) calls OpenADC(), but there is no call to CloseADC(), so that the ADC remains open. Get_Analog_Value() calls OpenADC() and CloseADC(). If you call Get_Analog_Value() after calling Initialize_Gyro(), it will call OpenADC() before the last call was closed. There are no handles to these, so I assume that if you close one, you close all.

Does anyone know if this causes a problem? Or is it ok? :confused:

Astronouth7303 11-02-2005 20:48

Re: Double calls of OpenADC()?
 
After rewriting the the gyro/analog input code to use SetChanADC(), the code error light went away. Check my post in Unknown Blinky-light type Errors for the code.


All times are GMT -5. The time now is 08:43.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi