Remove led logic and naming
This commit is contained in:
parent
69810b8c7c
commit
b9a6194d56
8
main.py
8
main.py
|
@ -12,7 +12,7 @@ from sensors import MCP9808
|
||||||
from sensors import WaterSensor
|
from sensors import WaterSensor
|
||||||
|
|
||||||
|
|
||||||
class LedServer(Server):
|
class SensorServer(Server):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -26,10 +26,6 @@ class LedServer(Server):
|
||||||
|
|
||||||
ntp.sync()
|
ntp.sync()
|
||||||
|
|
||||||
def cleanup(self):
|
|
||||||
super().cleanup()
|
|
||||||
self.led.off()
|
|
||||||
|
|
||||||
def work(self):
|
def work(self):
|
||||||
super().work()
|
super().work()
|
||||||
ticks = time.ticks_ms()
|
ticks = time.ticks_ms()
|
||||||
|
@ -88,7 +84,7 @@ class LedServer(Server):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
logging.log_file = 'www/log.txt'
|
logging.log_file = 'www/log.txt'
|
||||||
LedServer().run()
|
SensorServer().run()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue