git-svn-id: http://moon:8086/svn/projects/HendiControl@198 fda53097-d464-4ada-af97-ba876c37ca34
15 lines
317 B
Python
15 lines
317 B
Python
from atemperatureSensor import ATemperatureSensor
|
|
import math
|
|
|
|
|
|
class TempSensorSim(ATemperatureSensor):
|
|
def __init__(self, name):
|
|
super(TempSensorSim, self).__init__(name)
|
|
self.count = 0
|
|
self.freq = 0.2
|
|
|
|
def temperature(self):
|
|
self.count += 1
|
|
return 22.37 + 0.1*math.sin(2*math.pi*self.count*self.freq)
|
|
|