Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hyakuhei committed Apr 24, 2015
1 parent 739d323 commit 31ccd7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TideForecastScraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ def getTides(self,wholedataset,datestr):
if dataset[i]['height'] > dataset[i-1]['height']:
#logger.debug("{} {:.1f}m - Low tide".format(dataset[i-1]['time'],dataset[i-1]['height']))
heightPretty = "{:.1f}m".format(dataset[i-1]['height'])
tides.append({'time':dataset[i-1]['time'], 'height':dataset[i-1]['height'], 'type':'Low tide', 'heightPretty':heightPretty})
tides.append({'time':dataset[i-1]['time'], 'height':dataset[i-1]['height'], 'type':'Low', 'heightPretty':heightPretty})
state = 'rising'

if state == 'rising':
if dataset[i]['height'] < dataset[i-1]['height']:
#logger.debug("{} {:.1f}m - High tide".format(dataset[i-1]['time'],dataset[i-1]['height']))
heightPretty = "{:.1f}m".format(dataset[i-1]['height'])
tides.append({'time':dataset[i-1]['time'], 'height':dataset[i-1]['height'], 'type':'High tide', 'heightPretty':heightPretty})
tides.append({'time':dataset[i-1]['time'], 'height':dataset[i-1]['height'], 'type':'High', 'heightPretty':heightPretty})
state = 'dropping'

if dataset[i]['height'] == dataset[i-1]['height']:
Expand Down

0 comments on commit 31ccd7f

Please sign in to comment.