lcd.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:PiAlarm 作者: KyleKing 项目源码 文件源码
def display_weather(self):
        if not self._scheduled:
            # Start a fresh thread for weather updates
            cg.send('Starting update_weather()')
            self.update_weather()
            self._checkSchedule = True
            self._scheduled = True
            schedule.every(5).minutes.do(self.update_weather)
            cg.thread(self.run_sched)  # Start a separate thread
        elif self._checkSchedule:
            cg.send('Error: update_weather() is already running')
        elif not self._checkSchedule:
            # Allow the weather updates to continue
            cg.send('Toggling weather updates back on')
            self._checkSchedule = True
            cg.thread(self.run_sched)  # Start a separate thread
        else:
            cg.send('No appropriate display_weather() action...')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号