Page 1 of 1

Latitude Longitude

Posted: Mon Jul 28, 2008 4:25 pm
by peter
Hi Scott,
is it possible to have read access to the location setting values from inside of a device dll? I've programmed a device to give me the sun coordinates for controlling my roller blinds.

Thanks peter

Re: Latitude Longitude

Posted: Mon Jul 28, 2008 5:09 pm
by ScottBot
I'm not sure exactly what you are asking. If you want the lat/long values, they are stored in the registry, so they can easily be accessed via plugin DLL. I can give you the exact location if you need.

If you just want to read the sunset/sunrise times in your device, you can just call CDevice::GetDeviceFromDescription("System Time") and then use the returned CDevice pointer to get the sunrise/sunset or any other property values from the system time device. If that's what you are looking to do, I can give you more details on it as well.

Re: Latitude Longitude

Posted: Tue Jul 29, 2008 1:00 am
by peter
Oh no, I ment the the long/lat values. Additionally to close the blinds at night, I want to close them at hot days when the sun comes around of my house. So I need to know where the sun is actually. That is my device calculating based on the long/lat naturally.

Probably I will find them in the registry, thanks.

peter

Re: Latitude Longitude

Posted: Tue Jul 29, 2008 10:19 am
by ScottBot
Check under the HKEY_LOCAL_MACHINE\SOFTWARE\CeBotics\HouseBot\Sunrise-Sunset key. Although newer versions pull from
HKEY_CURRENT_USER\SOFTWARE\CeBotics\HouseBot\Sunrise-Sunset if found.