SyntaxError: can't assign to function call我在 genwave 函数的 self.rp.set 行中收到一个语法错误。我怎样才能摆脱这个错误?
import time
import rp
import numpy as np
import pyrpl
class PID:
"""PID Controller"""
def __init__(self, P=0.2, I=0.0, D=0.0, current_time=None):
self.Kp = P
self.Ki = I
self.Kd = D
self.sample_time = 0.00
self.current_time = current_time if current_time is not None else time.time()
self.last_time = self.current_time
self.targetT = targetT
self.clear()
def genwave(self, out_channel, waveform, voltage, offset):
'''generates analog waveform out of the redpitaya from OUT 1'''
self.rp.analog()
self.rp.set(self, 0, voltage) = out_voltage
self.rp.funct_gen()
self.rp.set_waveform(self, 1, waveform) = wave_output
self.rp.set_amplitude(self, 1, voltage) = wave_amplitude
self.rp.set_offset(self,1, offset) = voltage_offset
慕工程0101907
红糖糍粑
牛魔王的故事
相关分类