Pocket Weather

Discussion in 'Open Source Projects' started by digitaldon37, Nov 12, 2008.

  1. digitaldon37

    digitaldon37 Active Member Licensed User

    Version 1.1 / D.41

    Latest version has been rolled up into a new public release (1.1) and has been uploaded to the main post.

    Latest version is public release 1.1


    To Do (Future Features)
    ====================================================================
    1. Plug-ins to support weatherpanel map (will be html/javascript)
    2. Finger scroll up: settings, down: minimize, side: switch locations
    3. Option for full screen (will enable when #2 is in place)
    4. Roll forecasts when date rolls over (current=display message only)


    History

    1.1 (12/14/08)
    ====================================================================
    - public release containing developer fixes d.39 to d.41

    .41 (12/11/08)
    ====================================================================
    - Added AppToDate support
    - Added check for outdated cache (displays message only)

    .40 (12/11/08) Klaus
    ====================================================================
    - adapted image sizes to
    condition 48*48
    details 40*40
    buttons 48*48
    add/delete 20*20 the png images are still 16*16 in the gfx folder
    - increased saved locations from 5 to 10
    - panel messages in the middle of the screen (eliminate double redraw)


    .39 (12/8/08)
    ====================================================================
    - fix Russian language file
    - fix fuzzy font (eliminated setTransparency)
     
  2. klaus

    klaus Expert Licensed User

    Hi Don,

    Here is version 1.11 with the modification to avoid 2 cities.

    Best regards.
     
  3. digitaldon37

    digitaldon37 Active Member Licensed User

    Developer's release .43

    Attached is the latest version, it incorporates base code for public release 1.1 and some bug fixes

    History

    .43 (12/17/08)
    ====================================================================
    - add S2U key update to "RefreshWeather" -was only updated on main refresh
    - fix bug where interval set to zero and deletes location cache
    - fix refreshweather bug (was setting timer off for ini=0)

    .42 (12/16/08)
    ====================================================================
    - add klaus's update for city/location id (sorted array)


    1.1 (12/14/08)
    ====================================================================
    - public release containing developer fixes d.39 to d.41
     
    Last edited: Jan 10, 2009
  4. klaus

    klaus Expert Licensed User

    Hi Don,

    Here you have version 0_44 with the finger swapping of locations.

    Best regards.
     
  5. digitaldon37

    digitaldon37 Active Member Licensed User

    Thanks Klaus. Is there any way to restrict the swiping to a rectangle? This code triggers a swipe whether it's top to bottom, left to right, etc. The result is that you may get an unintended swipe.

    I had been thinking that for scrolling locations, to limit the swipe to the "Tomorrow" section on the main page. That seems to be coordinates 10,140 to 180, 180
     
  6. klaus

    klaus Expert Licensed User

    Yes it could be restricted to a certain rectangle.

    The principle was the following.
    Swiping left to right or top down increased the location index by one if there is a location. If there is no location it increased one more till the end.
    Swiping right to left or bottom to top decreased the index. So there shouldn't have been an unintended swipe.
    The swip must be, at the moment, at least 50 pixels wide between MouseDown and MouseUp. This could of course also also be changed.
    The swipe works in all 3 screens, today, detail anf fourcast.

    In the attached file the swipe is limited to the rectangle you gave.
    The swipe is limited to right-left and left-right only and still 50 pixel min. (and now 100 pixel on a VGA sreen). I increased the version number t0 0.45.
    The values are in variables so it would be easy to change them in the Form1.MouseUp routine.

    Best regards.
     
  7. digitaldon37

    digitaldon37 Active Member Licensed User

    Thanks Klaus! This works great.
     
  8. klaus

    klaus Expert Licensed User

    A new version for test:
    - Increased the swiping area it covers now the Today and Tomorrow dispalys
    - Changed Today display with weather conditions, the Tomorrow display is still the previous one for comparison.

    Best regards.
     
  9. digitaldon37

    digitaldon37 Active Member Licensed User

    Hi Klaus. I like the concept but it seems to mess up in other languages (specifically French and German) - the words run together

    [update] - I'm uploading your code with a change in the GetRemoteRSS error routine. I had added a check for the location cache file which fixes wolfkmann's issue of not being able to switch between locations when there was no connection to the internet.
     
    Last edited: Jan 10, 2009
  10. klaus

    klaus Expert Licensed User

    Hi Don,
    What words are overlapping or running together, I tried mainly in English,French and German and have not yet found overlapping words.
    Is it the first line with Today and the date, the 2nd one with the day name and the temperatures or the 3rd one with the conditions? Is it on the device only or on both?
    Did you also have a look at the desktop version, what about having two arrows up and down before the temperatures instead of the two letters?

    Best regards.
     
  11. digitaldon37

    digitaldon37 Active Member Licensed User

    I got the overlaps on my PC (the temp was overwritten by the German day word) as well as on my PDA.

    I've been trying to create a routine to justify text, but I'm not having much success because I don't have much experience with font sizes and calculating spaces. Here is what I'm trying to print, I think this may get everything in the spaces needed:

    Today (left justified, font 12) - mm/dd/yy (right justified, font 11) - image
    Day of week (left justified, font 11) - high / low (right justified, font 11) - image
    Weather conditions (left justified, font 11)

    The text that is right justified (date, temps) will be consistent so they will always align properly, and most of the language text seems to fit left justified (we can truncate if necessary)

    [update] Attached is screenshot of what I have working, I'm going to clean up the code and upload that shortly
    [update2] Attached is 46.2
     

    Attached Files:

    Last edited: Jan 10, 2009
  12. klaus

    klaus Expert Licensed User

    What is your default Font on the desktop, I use Arial, yours look wider.

    The DrawText routine has text justification already included, cLeft, cRight, cCenter !
     
    Last edited: Dec 18, 2008
  13. digitaldon37

    digitaldon37 Active Member Licensed User

    I use Arial. If there is not a font name listed in the theme.ini it defaults to Arial on the desktop, and Tahoma on the PDA.

    By the way, your finger swiping to change locations is really cool!
     
  14. klaus

    klaus Expert Licensed User

    I use Arial too, and get the attached image.

    But anyway, yours is OK too !
     

    Attached Files:

  15. digitaldon37

    digitaldon37 Active Member Licensed User

    I added the condition description to the top "current" weather - I had to change how the city/region is displayed and check for string length & set font size for long city/region

    current version=.46.4

    [update] I changed the sorted lists for city from "index/city" to "city/index" with a check before inserting. The cities were not sorted in the drop down list.
    [update2] fixed bug where "today" was listed in "tomorrow" section
     
    Last edited: Dec 18, 2008
  16. digitaldon37

    digitaldon37 Active Member Licensed User

    Version .47

    Cross-posted at XDA

    I have uploaded version .47 to the main post. This version integrates with Levenum's Today Screen plug-in ([New release] Registry display plugin - xda-developers) to display either the current weather or forecast.

    If everything tests out ok I will be rolling all the latest development releases into a new public release build.

    .47 (12/19/08)
    ==================================================================
    - add Today Screen plug-in integration (Levenum project)

    .46 (12/18/08)
    ===================================================================
    - add condition descriptions on main page


    .45 (12/17/08)
    ====================================================================
    - left/right & right/left finger swipe to switch locations (klaus)

    .44 (12/17/08)
    ====================================================================
    - fix offline cache / location switching bug

    .43 (12/17/08)
    ====================================================================
    - add S2U key update to "RefreshWeather"
    - fix bug where interval set to zero and deletes location cache
    - fix refreshweather bug (sets timer off for ini=0)

    .42 (12/16/08)
    ====================================================================
    - add klaus's update for city/location id (sorted array)

    1.1 (12/14/08)
    ====================================================================
    - public release containing developer fixes d.39 to d.41
     
  17. Filippo

    Filippo Expert Licensed User

    Hi digitaldon37,

    I have a mistake in the procedure found ChangeToVGA.
    Please change the procedure this way:
    and so these lines:
    Ciao,
    Filippo
     
  18. digitaldon37

    digitaldon37 Active Member Licensed User

    Changes made - could you please test? Thanks!
     
  19. Filippo

    Filippo Expert Licensed User

    Hi digitaldon37,

    Test OK!
     
  20. digitaldon37

    digitaldon37 Active Member Licensed User

    Thanks for the code and for testing.

    [update] Version .49 is attached - changes made so that when you scroll through location is parses the cached location file (if it exists) instead of going out to the internet. The reasoning is that people may scroll through several locations to get to the one that they want and downloading for each location scrolled uses a lot of air-time.
     
    Last edited: Dec 21, 2008
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice