Skip to content
Snippets Groups Projects
Commit 4445c463 authored by Taya Snijder's avatar Taya Snijder
Browse files

restored data handling fucntion

parent d2ccfea7
Branches
No related tags found
1 merge request!24Resolve #2021 "04 16 branched from master ini file device"
...@@ -32,9 +32,8 @@ import os ...@@ -32,9 +32,8 @@ import os
class ini_client(CommClient): class ini_client(CommClient):
""" """
This class provides an example implementation of a comms_client. this class provides an example implementation of a comms_client.
Durirng initialisation it creates a correctly shaped zero filled value. on read that value is returned and on write its modified.
During initialisation, it creates a correctly shaped zero-filled value. On read, that value is returned, and on write it is modified.
""" """
def start(self): def start(self):
...@@ -174,8 +173,8 @@ def data_handler(string, dtype): ...@@ -174,8 +173,8 @@ def data_handler(string, dtype):
elif dtype is numpy.str_: elif dtype is numpy.str_:
for i in string.split(","): for i in string.split(","):
value = numpy.str_(i) val = numpy.str_(i)
value.append(value) value.append(val)
value = numpy.array(value) value = numpy.array(value)
...@@ -183,8 +182,9 @@ def data_handler(string, dtype): ...@@ -183,8 +182,9 @@ def data_handler(string, dtype):
# regular case, go through the separator # regular case, go through the separator
for i in string.split(","): for i in string.split(","):
i = i.replace(" ", "") i = i.replace(" ", "")
value = dtype(i) val = dtype(i)
value.append(value) value.append(val)
# convert values from buildin type to numpy type # convert values from buildin type to numpy type
value = dtype(value) value = dtype(value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment