From 289ac2d77fde9c565f5e72421d1eefe911ef8a60 Mon Sep 17 00:00:00 2001 From: Yen-Chun Huang Date: Wed, 20 Dec 2023 14:35:21 -0500 Subject: [PATCH] Remove float value condition --- pyB12MPS/mps.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyB12MPS/mps.py b/pyB12MPS/mps.py index 671ae25..c1d5155 100644 --- a/pyB12MPS/mps.py +++ b/pyB12MPS/mps.py @@ -965,10 +965,7 @@ def writeeeprom(self, address, data_type, data): self.send_command("write %i %s %i" % (address, data_type, data), recv=True) elif data_type in ["float"]: - data = int( - np.float32(data).view(np.uint32) - ) # convert to 4 bytes then to uint32_t to store data in EEPROM - self.send_command("write %i 'uint32_t' %i" % (address, data), recv=True) + self.send_command("write %i float %f" % (address, data), recv=True) else: raise ValueError("Input argument is invalid.")