git-svn-id: http://moon:8086/svn/projects/HendiControl@214 fda53097-d464-4ada-af97-ba876c37ca34
28 lines
520 B
Python
28 lines
520 B
Python
import numpy as np
|
|
import json
|
|
from aplant import APlant
|
|
from math import sqrt
|
|
from hendiCtrl import HendiCtrl
|
|
from max31865 import Max31865
|
|
|
|
class Plant(APlant):
|
|
def __init__(self):
|
|
self.heater = HendiCtrl('/dev/ttyUSB0', 115200)
|
|
self.tempsensor = Max31865()
|
|
self.P = 0
|
|
pass
|
|
|
|
def process(self):
|
|
pass
|
|
|
|
def setPower(self, power_w):
|
|
self.P = power_w
|
|
self.heater.setPowerWatts()
|
|
|
|
def getPower(self):
|
|
return self.heater.getPowerWatts()
|
|
|
|
def getTemperature(self):
|
|
return self.tempsensor.temperature()
|
|
|