TelenkovDmitry há 9 meses atrás
pai
commit
3619f843b2

Diff do ficheiro suprimidas por serem muito extensas
+ 755 - 756
project/ewarm/iap/iap.dep


Diff do ficheiro suprimidas por serem muito extensas
+ 798 - 813
project/ewarm/module_universal_io.dep


BIN
tools/__pycache__/io_module.cpython-310.pyc


+ 2 - 2
tools/io_module.py

@@ -220,14 +220,14 @@ class IO_Module(Modbus):
     def get_archive_entryes(self, ent_num, ent_index):
         data = self.read_file_record(ARCHIVE_ENTRY, 1, 1)
         #print(struct.unpack('<Q', data[5:13]))
-        entry = struct.unpack('<Q', data[5:13])
+        entry = struct.unpack('<QBB', data[5:15])
         print(entry)
         return data
 
 def main():
     colorama.init(autoreset=True)
     dev = IO_Module('COM24', 115200, 15)
-    dev.MB_DEBUG = True
+    dev.MB_DEBUG = False
     
     # dev.update('fw.bin')
 

+ 37 - 0
tools/log_reader.py

@@ -0,0 +1,37 @@
+from io_module import IO_Module
+
+
+class LogReader(IO_Module):
+    def __init__(self) -> None:
+        pass
+
+    def get_archive(self):
+        print("LogReader")
+
+
+class DigitalLogReader(LogReader):
+    def __init__(self) -> None:
+        super().__init__()
+
+    def get_archive(self):
+        print("DigitalLogReader")
+
+
+class AnalogInputLogReader(LogReader):
+    def __init__(self) -> None:
+        super().__init__()
+
+    def get_archive(self):
+        print("AnalogInputLogReader")
+
+
+
+def main():
+    module = DigitalLogReader()
+    module.get_archive()
+
+
+
+if __name__ == '__main__':
+    main()
+

+ 19 - 0
tools/plot_test.py

@@ -0,0 +1,19 @@
+import matplotlib.pyplot as plt
+import matplotlib.animation as animation
+
+fig = plt.figure()
+ax = fig.add_subplot(1, 1, 1)
+
+
+
+"""
+x = []
+y = []
+
+for i in range(10):
+    x.append(i)
+    y.append(i**2)
+
+plt.plot(x, y)
+plt.show()
+"""

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff