Loading ...
Sorry, an error occurred while loading the content.

B119, Change to Davis VP2, Vue, Units handling in VantagePro.dl v2.42.

Expand Messages
  • wuhu_software
    All, Dan discovered that when he launched WUHU, the format of the data that he had customized on his Vue was being reset. Specifically, he set up the console
    Message 1 of 1 , Oct 1, 2010
    • 0 Attachment
      All,

      Dan discovered that when he launched WUHU, the format of the data that he had customized on his Vue was being reset. Specifically, he set up the console to display temperature in 1/10s of degrees. When WUHU was launched, this reset his console back to use whole degrees. 

      Suspecting that this had something to do with the new Davis DLL being deployed, I found that Davis had fundamentally changed the behavior of one of it's DLL functions, SetUnits_V(). In previous releases of this DLL, this function was used by weather applications to tell the DLL which units that it wanted the data to be received in.

      The current version (v2.42) of the VantagePro.dll has a very different behavior. It is actually re-configuring the console itself, changing the settings in the console firmware, when the weather application tells the DLL what units it would like to work with. When WUHU began communication with the console, it would request English units:

          wu.TempUnit=FAHRENHEIT;
          wu.RainUnit=INCHES;
          wu.BaromUnit=INCHES; (meaning InHG versus say mmHg)
          wu.WindUnit=MPH;
          wu.elevUnit=FEET;

      While this may be a minor deal to users here in the U.S., users outside of the U.S. that use Metric, would suddenly see their consoles reconfigured to use the above English units!! This is not cool!!

      To work around this major change in the DLL behavior, WUHU (B119 and later) now reads the units out of the console, accepts whatever the user has selected for units, and translates the data accordingly. This is how the  DLL behaved prior to this change. It was quite a bit of work to re-write the whole data collection and history retrieval code, but I believe I have all the kinks worked out.

      So if have a Davis unit, and would like to test his new code, please download the latest release.


      PS- Move likes this changing the legacy DLL functions is a really bad concept. I am really surprised Davis made this move as this action requires a re-write of any existing weather applications that were already successfully deployed. I really do hope they put more thought in to the impact their changes in the future!

      ---

      Davis DLL documentation related to this function in question:

      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

    Your message has been successfully submitted and would be delivered to recipients shortly.