Skip to content

Commit

Permalink
improved comms speed, updated imports, and made things update faster
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed May 7, 2024
1 parent 2563915 commit 7713c9e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion REVHubInterface/REVADC.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import REVcomm as REVComm, REVmessages as REVMsg
from . import REVmessages as REVMsg
ADC_INPUT_CHANNEL_0 = 0
ADC_INPUT_CHANNEL_1 = 1
ADC_INPUT_CHANNEL_2 = 2
Expand Down
2 changes: 1 addition & 1 deletion REVHubInterface/REVComPorts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import serial, time, binascii, os
import time
from serial.tools import list_ports
import re
defaultComPort = 0
Expand Down
5 changes: 2 additions & 3 deletions REVHubInterface/REVcomm.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import tkinter as tk
from tkinter import *
import tkinter.ttk
import threading, multiprocessing as mp, time, math, csv, os
from . import REVComPorts, REVmessages as REVMsg, REVModule
import multiprocessing as mp, time
from . import REVComPorts, REVmessages as REVMsg
from .REVModule import Module
import binascii, serial, time, queue

Expand Down Expand Up @@ -109,7 +109,6 @@ def sendAndReceive(self, PacketToWrite, destination):
break
if timeout:
continue
time.sleep(0.03)
if discoveryMode:
packet = []
if self.REVProcessor.inWaiting() > 0:
Expand Down
5 changes: 2 additions & 3 deletions REVHubInterface/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .REVcomm import *
from functools import partial
from sys import platform
import tkinter, tkinter.ttk, tkinter.filedialog, tkinter.messagebox, os, subprocess, time, platform
import tkinter as tk, tkinter.ttk, tkinter.filedialog, tkinter.messagebox, os, subprocess, time, platform

try:
import ft232
Expand Down Expand Up @@ -1299,8 +1299,7 @@ def on_quit_button_callback(self):
def every_second(self):
for func in self.repetitiveFunctions:
func()

self.root.after(500, self.every_second)
self.root.after(250, self.every_second)

def joinThreads(self):
self.repetitiveFunctions = []
Expand Down

0 comments on commit 7713c9e

Please sign in to comment.