mirror of git://sigrok.org/pulseview
Typo fix: treshold -> threshold
This commit is contained in:
parent
c6b017fb7a
commit
b9cdbe03be
|
@ -169,7 +169,7 @@ shared_ptr<data::Logic> SignalBase::logic_data() const
|
|||
if (channel_type_ == LogicChannel)
|
||||
result = dynamic_pointer_cast<Logic>(data_);
|
||||
|
||||
if (((conversion_type_ == A2LConversionByTreshold) ||
|
||||
if (((conversion_type_ == A2LConversionByThreshold) ||
|
||||
(conversion_type_ == A2LConversionBySchmittTrigger)))
|
||||
result = dynamic_pointer_cast<Logic>(converted_data_);
|
||||
|
||||
|
@ -239,7 +239,7 @@ vector<double> SignalBase::get_conversion_thresholds(const ConversionType t,
|
|||
else
|
||||
preset = get_current_conversion_preset();
|
||||
|
||||
if (conv_type == A2LConversionByTreshold) {
|
||||
if (conv_type == A2LConversionByThreshold) {
|
||||
double thr = 0;
|
||||
|
||||
if (preset == -1) {
|
||||
|
@ -295,7 +295,7 @@ vector< pair<QString, int> > SignalBase::get_conversion_presets() const
|
|||
{
|
||||
vector< pair<QString, int> > presets;
|
||||
|
||||
if (conversion_type_ == A2LConversionByTreshold) {
|
||||
if (conversion_type_ == A2LConversionByThreshold) {
|
||||
// Source: http://www.interfacebus.com/voltage_threshold.html
|
||||
presets.emplace_back(tr("Signal average"), 0);
|
||||
presets.emplace_back(tr("0.9V (for 1.8V CMOS)"), 1);
|
||||
|
@ -373,7 +373,7 @@ void SignalBase::restore_settings(QSettings &settings)
|
|||
bool SignalBase::conversion_is_a2l() const
|
||||
{
|
||||
return ((channel_type_ == AnalogChannel) &&
|
||||
((conversion_type_ == A2LConversionByTreshold) ||
|
||||
((conversion_type_ == A2LConversionByThreshold) ||
|
||||
(conversion_type_ == A2LConversionBySchmittTrigger)));
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ void SignalBase::conversion_thread_proc(QObject* segment)
|
|||
// Convert
|
||||
uint64_t i = start_sample;
|
||||
|
||||
if (conversion_type_ == A2LConversionByTreshold) {
|
||||
if (conversion_type_ == A2LConversionByThreshold) {
|
||||
const double threshold = get_conversion_thresholds()[0];
|
||||
|
||||
// Convert as many sample blocks as we can
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
enum ConversionType {
|
||||
NoConversion = 0,
|
||||
A2LConversionByTreshold = 1,
|
||||
A2LConversionByThreshold = 1,
|
||||
A2LConversionBySchmittTrigger = 2
|
||||
};
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ void AnalogSignal::paint_mid(QPainter &p, ViewItemPaintParams &pp)
|
|||
if ((display_type_ == DisplayConverted) || (display_type_ == DisplayBoth)) {
|
||||
const SignalBase::ConversionType conv_type = base_->get_conversion_type();
|
||||
|
||||
if (((conv_type == SignalBase::A2LConversionByTreshold) ||
|
||||
if (((conv_type == SignalBase::A2LConversionByThreshold) ||
|
||||
(conv_type == SignalBase::A2LConversionBySchmittTrigger)))
|
||||
paint_logic_mid(p, pp);
|
||||
}
|
||||
|
@ -616,9 +616,9 @@ void AnalogSignal::update_conversion_widgets()
|
|||
|
||||
map < QString, QVariant > options = base_->get_conversion_options();
|
||||
|
||||
if (conv_type == SignalBase::A2LConversionByTreshold) {
|
||||
if (conv_type == SignalBase::A2LConversionByThreshold) {
|
||||
const vector<double> thresholds = base_->get_conversion_thresholds(
|
||||
SignalBase::A2LConversionByTreshold, true);
|
||||
SignalBase::A2LConversionByThreshold, true);
|
||||
conv_threshold_cb_->addItem(
|
||||
QString("%1V").arg(QString::number(thresholds[0], 'f', 1)), -1);
|
||||
}
|
||||
|
@ -775,7 +775,7 @@ void AnalogSignal::populate_popup_form(QWidget *parent, QFormLayout *form)
|
|||
conversion_cb_->addItem(tr("none"),
|
||||
SignalBase::NoConversion);
|
||||
conversion_cb_->addItem(tr("to logic via threshold"),
|
||||
SignalBase::A2LConversionByTreshold);
|
||||
SignalBase::A2LConversionByThreshold);
|
||||
conversion_cb_->addItem(tr("to logic via schmitt-trigger"),
|
||||
SignalBase::A2LConversionBySchmittTrigger);
|
||||
|
||||
|
@ -953,7 +953,7 @@ void AnalogSignal::on_conv_threshold_changed(int index)
|
|||
|
||||
const bool use_custom_thr = (index == -1) || (user_data == -1);
|
||||
|
||||
if (conv_type == SignalBase::A2LConversionByTreshold && use_custom_thr) {
|
||||
if (conv_type == SignalBase::A2LConversionByThreshold && use_custom_thr) {
|
||||
// Not one of the preset values, try to parse the combo box text
|
||||
// Note: Regex loosely based on
|
||||
// https://txt2re.com/index-c++.php3?s=0.1V&1&-13
|
||||
|
|
Loading…
Reference in New Issue