Skip to content

Commit

Permalink
Fixed crash when applying vesc settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultrawipf committed May 31, 2022
1 parent 0117bc6 commit e2ef8b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
- BISS-C encoder support
- TMC graph follows system style
- Windows darkmode support
- Digital and analog readout
- Digital and analog readout

v1.8.7:
- Fixed crash when applying vesc settings
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from dark_palette import PALETTE_DARK

# This GUIs version
version = "1.8.6"
version = "1.8.7"

# Minimal supported firmware version.
# Major version of firmware must match firmware. Minor versions must be higher or equal
Expand Down
3 changes: 0 additions & 3 deletions vesc_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def __init__(self, main=None, unique=None):
#self.checkBox_useEncoder.stateChanged.connect(lambda val : self.sendValue("vesc","useencoder",(0 if val == 0 else 1),instance=self.prefix))
self.registerCallback("vesc","offbcanid",self.spinBox_OFFB_can_id.setValue,self.prefix,int)
self.registerCallback("vesc","vesccanid",self.spinBox_VESC_can_Id.setValue,self.prefix,int)
#self.registerCallback("vesc","canspd",self.updateCanSpd,self.prefix,int)
self.registerCallback("vesc","useencoder",self.updateEncoderUI,self.prefix,int)
self.registerCallback("vesc","offset",self.updateOffset,self.prefix,int)

Expand Down Expand Up @@ -130,10 +129,8 @@ def updateTimer(self):
self.sendCommands("vesc",["vescstate","errorflags","voltage","pos","encrate","torque"],self.prefix)

def apply(self):
spdPreset = str(self.comboBox_baud.currentIndex()+3) # 3 is lowest preset!
OpenFFBoardCANId = str(self.spinBox_OFFB_can_id.value())
VESCCANId = str(self.spinBox_VESC_can_Id.value())
#self.sendValue("vesc","canspd",spdPreset,instance=self.prefix)
self.sendValue("vesc","offbcanid",OpenFFBoardCANId,instance=self.prefix)
self.sendValue("vesc","vesccanid",VESCCANId,instance=self.prefix)
self.sendValue("vesc","useencoder",(1 if self.checkBox_useEncoder.isChecked() else 0),instance=self.prefix)
Expand Down

0 comments on commit e2ef8b3

Please sign in to comment.