From 58135fe9819ce17a165921b91f0e75e34c2f6f2b Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 8 Mar 2024 15:01:54 +0800 Subject: [PATCH] Fix LED Display, Modifiy Text of Voltage Selector --- Engine/API/Hardware/rhxcontroller.cpp | 10 ++++++++-- GUI/Widgets/controlpanelKONTEXtab.cpp | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Engine/API/Hardware/rhxcontroller.cpp b/Engine/API/Hardware/rhxcontroller.cpp index 7cc78c1..875608e 100644 --- a/Engine/API/Hardware/rhxcontroller.cpp +++ b/Engine/API/Hardware/rhxcontroller.cpp @@ -540,10 +540,16 @@ void RHXController::setSpiLedDisplay(const int* ledArray) ledOut += 1 << i; } - if (type == ControllerStimRecordUSB2) { + if (type == ControllerStimRecordUSB2) { dev->SetWireInValue(WireInLedDisplay_S_USB2, (ledOut << 8), 0xff00); } else if (type == ControllerRecordUSB3) { - dev->SetWireInValue(WireInMultiUse, ledOut); + // every 2 channel mapping to 1 led + int ledOutModified = 0; + for (int i = 0; i < 4; ++i) { + if (ledArray[2*i] > 0 || ledArray[2*i+1] > 0) + ledOutModified += 1 << i; + } + dev->SetWireInValue(WireInMultiUse, ledOutModified); } dev->UpdateWireIns(); diff --git a/GUI/Widgets/controlpanelKONTEXtab.cpp b/GUI/Widgets/controlpanelKONTEXtab.cpp index 0bf7509..9b10399 100755 --- a/GUI/Widgets/controlpanelKONTEXtab.cpp +++ b/GUI/Widgets/controlpanelKONTEXtab.cpp @@ -65,9 +65,9 @@ ControlPanelKONTEXTab::ControlPanelKONTEXTab(ControllerInterface *controllerInte SPIGroupBox->setLayout(SPIBusLayout1); - auto V14Button = new QRadioButton("+14/-4V"); - auto V9Button = new QRadioButton("+/-9V"); - auto V4Button = new QRadioButton("+4/-14V"); + auto V14Button = new QRadioButton("+10/-4V"); + auto V9Button = new QRadioButton("+/-7V"); + auto V4Button = new QRadioButton("+4/-10V"); if (state->enableVStim) { V9Button->setChecked(true); } else {