11 lines
553 B
Python
11 lines
553 B
Python
import pickle
|
|
with open("ipp_channels.p", 'rb') as picklefile:
|
|
channels = pickle.load(picklefile)
|
|
|
|
for chname in sorted(channels):
|
|
ch = channels[chname]
|
|
if ch['data_type'] == "BOOL":
|
|
print("'{0}': Channel('{0}', '{1}', {2}, self.sendtodbJSON, writeable=True, e300_param=False),".format(chname, ch['tag'], ch['max_time_between_uploads']))
|
|
else:
|
|
print("'{0}': Channel('{0}', '{1}', {2}, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False),".format(chname, ch['tag'], ch['max_time_between_uploads']))
|