Hi to the Forum!
Please have a look at this post from a while back to get the history of the reason for this new post!
http://www.wxforum.net/index.php?topic=4074.0#lastPostI have just downloaded from Davis the latest DLL Version Tool kit as I have updated the frameware on my VP2 to the latest 1.90.
This has created a new problem for me with my little .exe file that I created with help from the forum with regards to the prevision old post.
Now my .exe file works with cmd line on windows xp/vista. For the returned values to be in metric I added the following in a C++ file:
WeatherUnits Units;
Units.TempUnit = CELSIUS;
Units.BaromUnit = HECTO_PASCAL;
Units.RainUnit = MM;
Units.WindUnit = KPH;
Units.elevUnit = METERS;
WeatherUnits SetUnits_V(WeatherUnits Units);
if (SetUnits_V(&Units)==0) {
// Success
}
This has worked fine and still does with the new DLL with one exception that when the .exe runs for the first time the read out on the VP2 console gets changed from Metric to Imperial!
How can I change the above so it still does the same without messing with the console?
Here is the quote from the Davis Tech file re SetUnits_V and GetUnits_V:
short void GetUnits_V( WeatherUnits *units)
Description
Fills the structure WeatherUnits with the units currently being used in the Dll. For DLL
version 2.42 and later, this value is actually obtained from the console firmware settings.
All weather data will be read and reported by the DLL in these units.
The default DLL units are:
Temperature FAHRENHEIT
Barometer INCHES
Rain INCHES
Wind MPH
Elevation FEET
short int SetUnits_V( WeatherUnits *units)
Description
The Dll sets the units used to read and report weather data to the values specified in the
WeatherUnits structure. For DLL version 2.42 and later, this actually set the console firmware settings.
Parameters
units - WeatherUnits structure to set the weather units.
Return Values
0 if successful
-1 if invalid data
I would be most grateful too anyone who could help me solve this problem as I have now run
out of ideas and need someone with a bit more knowledge than myself!!
Most Kindest Regards,
Andrew Hall.
Leipzig, Germany.