Skip to content
Snippets Groups Projects
Commit ebbdb693 authored by Josh Siegle's avatar Josh Siegle
Browse files

Change filter cutoff display

Display filter cutoffs rounded to the nearest 0.1 Hz, rather than 1 Hz
parent 368ea7a4
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@
#include "RHD2000Editor.h"
#include "../../UI/EditorViewport.h"
#include <cmath>
#include "ChannelSelector.h"
......@@ -271,7 +272,7 @@ void BandwidthInterface::labelTextChanged(Label* label)
std::cout << "Setting Upper Bandwidth to " << requestedValue << std::endl;
std::cout << "Actual Upper Bandwidth: " << actualUpperBandwidth << std::endl;
label->setText(String((roundFloatToInt)(actualUpperBandwidth)), dontSendNotification);
label->setText(String(round(actualUpperBandwidth*10.f)/10.f), dontSendNotification);
}
else
......@@ -291,9 +292,10 @@ void BandwidthInterface::labelTextChanged(Label* label)
actualLowerBandwidth = board->setLowerBandwidth(requestedValue);
std::cout << "Setting Upper Bandwidth to " << requestedValue << std::endl;
std::cout << "Actual Upper Bandwidth: " << actualLowerBandwidth << std::endl;
label->setText(String(roundFloatToInt(actualLowerBandwidth)), dontSendNotification);
std::cout << "Setting Lower Bandwidth to " << requestedValue << std::endl;
std::cout << "Actual Lower Bandwidth: " << actualLowerBandwidth << std::endl;
label->setText(String(round(actualLowerBandwidth*10.f)/10.f), dontSendNotification);
}
}
else if (editor->acquisitionIsActive)
......@@ -311,15 +313,16 @@ void BandwidthInterface::labelTextChanged(Label* label)
void BandwidthInterface::setLowerBandwidth(double value)
{
actualLowerBandwidth = board->setLowerBandwidth(value);
lowerBandwidthSelection->setText(String(roundFloatToInt(actualLowerBandwidth)), dontSendNotification);
lowerBandwidthSelection->setText(String(round(actualLowerBandwidth*10.f)/10.f), dontSendNotification);
}
void BandwidthInterface::setUpperBandwidth(double value)
{
actualUpperBandwidth = board->setUpperBandwidth(value);
upperBandwidthSelection->setText(String(roundFloatToInt(actualUpperBandwidth)), dontSendNotification);
upperBandwidthSelection->setText(String(round(actualUpperBandwidth*10.f)/10.f), dontSendNotification);
}
double BandwidthInterface::getLowerBandwidth()
{
return actualLowerBandwidth;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment