-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus.py
31 lines (24 loc) · 979 Bytes
/
status.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# This file is a part of servocam.org package <servocam.org>
# Created By: Marcin Szczygliński <info@servocam.org>
# GitHub: https://github.com/servo-cam
# License: MIT
# Updated At: 2023.03.27 02:00
# =============================================================================
from datetime import datetime
class Status:
def __init__(self, worker=None):
self.worker = worker
def init(self):
"""Initialize device
This method is called when device is initialized and ready to work
"""
pass
def get_status(self):
"""Get device status
This method is called every X seconds to get device status and send it to the server
"""
# self.worker.serial_status <--- current status received from serial port
return "STATUS: " + datetime.now().strftime("%H:%M:%S")