Commit eb26095a authored by DreamSourceLab's avatar DreamSourceLab

add x1/x10/x100 probe control @ DSO mode

add mouse measure when capture stop @ DSO mode
improve the precision of freqency measure
add voltage display for trigger position
fix other display issues
parent 716c3fff
......@@ -90,6 +90,7 @@ DeviceOptions::DeviceOptions(struct sr_dev_inst *sdi) :
case SR_CONF_STREAM:
case SR_CONF_TEST:
case SR_CONF_STATUS:
case SR_CONF_FACTOR:
bind_enum(name, key, gvar_list);
break;
......
This diff is collapsed.
......@@ -35,6 +35,7 @@
#include <set>
#include <string>
#include <vector>
#include <stdint.h>
#include <QObject>
#include <QString>
......
......@@ -5,12 +5,12 @@
namespace pv {
namespace view {
dslDial::dslDial(const quint64 div, const quint64 step,
const QVector<quint64> value, const QVector<QString> unit)
dslDial::dslDial(const uint64_t div, const uint64_t step,
const QVector<uint64_t> value, const QVector<QString> unit)
{
assert(div > 0);
assert(step > 0);
assert((quint64)value.count() == div);
assert((uint64_t)value.count() == div);
assert(unit.count() > 0);
_div = div;
......@@ -18,6 +18,7 @@ dslDial::dslDial(const quint64 div, const quint64 step,
_value = value;
_unit = unit;
_sel = 0;
_factor = 1;
}
dslDial::~dslDial()
......@@ -39,11 +40,11 @@ void dslDial::paint(QPainter &p, QRectF dialRect, QColor dialColor)
p.save();
p.translate(dialRect.center());
p.rotate(45);
for (quint64 i = 0; i < _div; i++) {
for (uint64_t i = 0; i < _div; i++) {
// draw major ticks
p.drawLine(0, dialRect.width()/2+3, 0, dialRect.width()/2+8);
// draw minor ticks
for (quint64 j = 0; (j < 5) && (i < _div - 1); j++) {
for (uint64_t j = 0; (j < 5) && (i < _div - 1); j++) {
p.drawLine(0, dialRect.width()/2+3, 0, dialRect.width()/2+5);
p.rotate(54.0/(_div-1));
}
......@@ -55,8 +56,8 @@ void dslDial::paint(QPainter &p, QRectF dialRect, QColor dialColor)
p.drawLine(-3, 0, 0, dialRect.width()/2-3);
p.restore();
// draw value
quint64 displayValue = _value[_sel];
quint64 displayIndex = 0;
uint64_t displayValue = _value[_sel]*_factor;
uint64_t displayIndex = 0;
while(displayValue / _step >= 1) {
displayValue = displayValue / _step;
displayIndex++;
......@@ -67,14 +68,14 @@ void dslDial::paint(QPainter &p, QRectF dialRect, QColor dialColor)
}
void dslDial::set_sel(quint64 sel)
void dslDial::set_sel(uint64_t sel)
{
assert(sel < _div);
_sel = sel;
}
quint64 dslDial::get_sel()
uint64_t dslDial::get_sel()
{
return _sel;
}
......@@ -95,16 +96,28 @@ bool dslDial::isMax()
return false;
}
quint64 dslDial::get_value()
uint64_t dslDial::get_value()
{
return _value[_sel];
}
bool dslDial::set_value(quint64 value)
bool dslDial::set_value(uint64_t value)
{
assert(_value.contains(value));
_sel = _value.indexOf(value, 0);
}
void dslDial::set_factor(uint64_t factor)
{
if (_factor != factor) {
_factor = factor;
}
}
uint64_t dslDial::get_factor()
{
return _factor;
}
} // namespace view
} // namespace pv
......@@ -10,8 +10,8 @@ namespace view {
class dslDial
{
public:
dslDial(const quint64 div, const quint64 step,
const QVector<quint64> value, const QVector<QString> unit);
dslDial(const uint64_t div, const uint64_t step,
const QVector<uint64_t> value, const QVector<QString> unit);
virtual ~dslDial();
public:
......@@ -23,23 +23,28 @@ public:
void paint(QPainter &p, QRectF dialRect, QColor dialColor);
// set/get current select
void set_sel(quint64 sel);
quint64 get_sel();
void set_sel(uint64_t sel);
uint64_t get_sel();
// boundary detection
bool isMin();
bool isMax();
// get current value
quint64 get_value();
bool set_value(quint64 value);
uint64_t get_value();
bool set_value(uint64_t value);
// set/get factor
void set_factor(uint64_t factor);
uint64_t get_factor();
private:
quint64 _div;
quint64 _step;
QVector<quint64> _value;
uint64_t _div;
uint64_t _step;
QVector<uint64_t> _value;
QVector<QString> _unit;
quint64 _sel;
uint64_t _sel;
uint64_t _factor;
};
} // namespace view
......
This diff is collapsed.
......@@ -45,8 +45,8 @@ private:
static const float EnvelopeThreshold;
static const int HitCursorMargin = 3;
static const quint64 vDialValueCount = 8;
static const quint64 vDialValueStep = 1000;
static const uint64_t vDialValueCount = 8;
static const uint64_t vDialValueStep = 1000;
static const uint64_t vDialUnitCount = 2;
static const uint64_t hDialValueCount = 28;
static const uint64_t hDialValueStep = 1000;
......@@ -94,6 +94,13 @@ public:
void set_acCoupling(uint8_t coupling);
void set_trig_vpos(int pos);
int get_trig_vpos() const;
void set_factor(uint64_t factor);
/**
*
*/
bool measure(const QPointF &p);
bool get_hover(uint64_t &index, QPointF &p, double &value);
/**
* auto set the vertical and Horizontal scale
......@@ -171,12 +178,18 @@ private:
double _trig_vpos;
double _zeroPos;
float _zero_off;
uint8_t _max;
uint8_t _min;
double _period;
bool _autoV;
bool _autoH;
bool _hover_en;
uint64_t _hover_index;
QPointF _hover_point;
double _hover_value;
};
} // namespace view
......
......@@ -282,6 +282,21 @@ void Header::mousePressEvent(QMouseEvent *event)
else
dsoSig->set_acCoupling((dsoSig->get_acCoupling()+1)%3);
}
} else if (action == Trace::X1 && mTrace) {
boost::shared_ptr<view::DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(mTrace)) {
dsoSig->set_factor(1);
}
} else if (action == Trace::X10 && mTrace) {
boost::shared_ptr<view::DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(mTrace)) {
dsoSig->set_factor(10);
}
} else if (action == Trace::X100 && mTrace) {
boost::shared_ptr<view::DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(mTrace)) {
dsoSig->set_factor(100);
}
}
if (~QApplication::keyboardModifiers() & Qt::ControlModifier) {
......
......@@ -300,6 +300,9 @@ int Trace::pt_in_rect(int y, int right, const QPoint &point)
const QRectF edgeTrig = get_rect("edgeTrig", y, right);
const QRectF label = get_rect("label", get_zeroPos(), right);
const QRectF vDial = get_rect("vDial", y, right);
const QRectF x1 = get_rect("x1", y, right);
const QRectF x10 = get_rect("x10", y, right);
const QRectF x100 = get_rect("x100", y, right);
const QRectF hDial = get_rect("hDial", y, right);
const QRectF chEn = get_rect("chEn", y, right);
const QRectF acdc = get_rect("acdc", y, right);
......@@ -323,6 +326,12 @@ int Trace::pt_in_rect(int y, int right, const QPoint &point)
return LABEL;
else if (vDial.contains(point) && _type == DS_DSO && enabled())
return VDIAL;
else if (x1.contains(point) && _type == DS_DSO && enabled())
return X1;
else if (x10.contains(point) && _type == DS_DSO && enabled())
return X10;
else if (x100.contains(point) && _type == DS_DSO && enabled())
return X100;
else if (hDial.contains(point) && _type == DS_DSO && enabled())
return HDIAL;
else if (chEn.contains(point) && _type == DS_DSO)
......@@ -400,6 +409,21 @@ QRectF Trace::get_rect(const char *s, int y, int right)
get_leftWidth() + name_size.width() + SquareWidth*0.5 + Margin,
y - SquareWidth * SquareNum,
SquareWidth * (SquareNum-1), SquareWidth * (SquareNum-1));
else if (!strcmp(s, "x1"))
return QRectF(
get_leftWidth() + name_size.width() + SquareWidth*0.5 + Margin - 45,
y - SquareWidth - SquareWidth * (SquareNum-1) * 0.85,
SquareWidth * 1.75, SquareWidth);
else if (!strcmp(s, "x10"))
return QRectF(
get_leftWidth() + name_size.width() + SquareWidth*0.5 + Margin - 45,
y - SquareWidth - SquareWidth * (SquareNum-1) * 0.55,
SquareWidth * 1.75, SquareWidth);
else if (!strcmp(s, "x100"))
return QRectF(
get_leftWidth() + name_size.width() + SquareWidth*0.5 + Margin - 45,
y - SquareWidth - SquareWidth * (SquareNum-1) * 0.25,
SquareWidth * 1.75, SquareWidth);
else if (!strcmp(s, "hDial"))
return QRectF(
get_leftWidth() + name_size.width() + SquareWidth*0.5 + Margin,
......
......@@ -66,6 +66,9 @@ public:
static const int CHEN = 11;
static const int ACDC = 12;
static const int DSOTRIG = 13;
static const int X1 = 14;
static const int X10 = 15;
static const int X100 = 16;
static const QColor dsBlue;
static const QColor dsYellow;
......
......@@ -96,12 +96,10 @@ View::View(SigSession &session, pv::toolbars::SamplingBar *sampling_bar, QWidget
setViewportMargins(headerWidth(), RulerHeight, 0, 0);
setViewport(_viewport);
connect(&_session, SIGNAL(signals_changed()),
this, SLOT(signals_changed()));
connect(&_session, SIGNAL(data_updated()),
this, SLOT(data_updated()));
connect(&_session, SIGNAL(receive_data(quint64)),
this, SLOT(receive_data(quint64)));
connect(&_session, SIGNAL(signals_changed()),
this, SLOT(signals_changed()));
connect(&_session, SIGNAL(data_updated()),
this, SLOT(data_updated()));
connect(&_session, SIGNAL(receive_trigger(quint64)),
this, SLOT(set_trig_pos(quint64)));
......@@ -550,7 +548,7 @@ bool View::viewportEvent(QEvent *e)
int View::headerWidth()
{
int headerWidth;
int maxNameWidth = 0;
int maxNameWidth = 25;
int maxLeftWidth = 0;
int maxRightWidth = 0;
......@@ -580,7 +578,11 @@ void View::resizeEvent(QResizeEvent*)
if (_session.get_device()->dev_inst()->mode == DSO)
_scale = _session.get_device()->get_time_base() * std::pow(10.0, -9.0) * DS_CONF_DSO_HDIVS / get_view_width();
_maxscale = _session.get_device()->get_sample_time() / (get_view_width() * MaxViewRate);
if (_session.get_device()->dev_inst()->mode != DSO)
_maxscale = _session.get_device()->get_sample_time() / (get_view_width() * MaxViewRate);
else
_maxscale = 1e9;
_scale = min(_scale, _maxscale);
signals_changed();
......@@ -722,11 +724,6 @@ void View::set_cursor_middle(int index)
set_scale_offset(_scale, (*i)->index() * 1.0 / _session.get_device()->get_sample_rate() - _scale * get_view_width() / 2);
}
void View::receive_data(quint64 length)
{
_viewport->set_receive_len(length);
}
Viewport * View::get_viewport()
{
return _viewport;
......
......@@ -225,8 +225,6 @@ private slots:
void header_updated();
void receive_data(quint64 length);
void set_trig_pos(quint64 trig_pos);
private:
......
This diff is collapsed.
......@@ -56,8 +56,6 @@ public:
QPoint get_mouse_point() const;
void set_receive_len(quint64 length);
QString get_measure(QString option);
void set_measure_en(int enable);
......@@ -85,6 +83,7 @@ private:
private slots:
void on_traces_moved();
void on_trigger_timer();
void set_receive_len(quint64 length);
signals:
void mouse_measure();
......@@ -92,7 +91,7 @@ signals:
private:
View &_view;
quint64 _total_receive_len;
uint64_t _total_receive_len;
QPoint _mouse_point;
QPoint _mouse_down_point;
double _mouse_down_offset;
......@@ -107,6 +106,7 @@ private:
bool _measure_en;
bool _measure_shown;
int _measure_type;
uint64_t _cur_sample;
uint64_t _nxt_sample;
uint64_t _thd_sample;
......@@ -124,6 +124,9 @@ private:
int timer_cnt;
boost::shared_ptr<Signal> _drag_sig;
uint64_t _hover_index;
bool _hover_hit;
};
} // namespace view
......
No preview for this file type
......@@ -249,7 +249,7 @@ static int fpga_setting(const struct sr_dev_inst *sdi)
((sdi->mode == ANALOG) << 7) +
((devc->filter == SR_FILTER_1T) << 8) +
(devc->instant << 9) + (devc->zero << 10);
setting.divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
setting.divider = devc->zero ? 0x1 : (uint32_t)ceil(DSCOPE_MAX_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_en_cnt);
setting.count = (uint32_t)(devc->limit_samples / (channel_cnt / channel_en_cnt));
setting.trig_pos = (uint32_t)(trigger->trigger_pos / 100.0 * devc->limit_samples);
setting.trig_glb = trigger->trigger_stages;
......@@ -847,7 +847,7 @@ static uint64_t dso_cmd_gen(struct sr_dev_inst *sdi, struct sr_channel* ch, int
channel_cnt += probe->enabled;
}
cmd += 0x18;
uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(DSCOPE_MAX_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_cnt);
cmd += divider << 8;
break;
case SR_CONF_HORIZ_TRIGGERPOS:
......@@ -1174,6 +1174,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
return SR_ERR;
*data = g_variant_new_uint64(ch->vdiv);
break;
case SR_CONF_FACTOR:
if (!ch)
return SR_ERR;
*data = g_variant_new_uint64(ch->vfactor);
break;
case SR_CONF_VPOS:
if (!ch)
return SR_ERR;
......@@ -1422,6 +1427,8 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
else
sr_dbg("%s: setting VDIV of channel %d to %d mv failed",
__func__, ch->index, ch->vdiv);
} else if (id == SR_CONF_FACTOR) {
ch->vfactor = g_variant_get_uint64(data);
} else if (id == SR_CONF_VPOS) {
ch->vpos = g_variant_get_double(data);
if (sdi->mode == DSO) {
......@@ -1854,11 +1861,12 @@ static void receive_transfer(struct libusb_transfer *transfer)
mstatus.ch0_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 1*2);
mstatus.ch0_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 3);
mstatus.ch0_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 2/2);
mstatus.ch0_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 4/2);
mstatus.ch1_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 7*2);
mstatus.ch1_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 15);
mstatus.ch1_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 8/2);
mstatus.ch1_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 10/2);
mstatus.ch0_period += ((uint64_t)*((const uint32_t*)cur_buf + mstatus_offset/2 + 4/2)) << 32;
mstatus.ch0_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 6/2);
mstatus.ch1_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 9*2);
mstatus.ch1_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 19);
mstatus.ch1_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 10/2);
mstatus.ch1_period += ((uint64_t)*((const uint32_t*)cur_buf + mstatus_offset/2 + 12/2)) << 32;
mstatus.vlen = *((const uint32_t*)cur_buf + mstatus_offset/2 + 16/2) & 0x7fffffff;
mstatus.stream_mode = *((const uint32_t*)cur_buf + mstatus_offset/2 + 16/2) & 0x80000000;
mstatus.sample_divider = *((const uint32_t*)cur_buf + mstatus_offset/2 + 18/2);
......@@ -1880,7 +1888,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
mstatus.vlen = instant_buffer_size;
}
const uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
const uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(DSCOPE_MAX_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_en_cnt);
if ((mstatus.sample_divider == divider &&
mstatus.vlen != 0 &&
mstatus.vlen <= (transfer->actual_length - 512) / sample_width) ||
......
......@@ -287,7 +287,10 @@ static int fpga_setting(const struct sr_dev_inst *sdi)
((sdi->mode == ANALOG) << 7) +
((devc->filter == SR_FILTER_1T) << 8) +
(devc->instant << 9) + (devc->zero << 10);
setting.divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
if (sdi->mode == DSO)
setting.divider = devc->zero ? 0x1 : (uint32_t)ceil(DSLOGIC_MAX_DSO_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_en_cnt);
else
setting.divider = devc->zero ? 0x1 : (uint32_t)ceil(DSLOGIC_MAX_LOGIC_SAMPLERATE * 1.0 / devc->cur_samplerate);
setting.count = (sdi->mode == DSO) ? (uint32_t)(devc->limit_samples / (channel_cnt / channel_en_cnt)) : (uint32_t)(devc->limit_samples);
setting.trig_pos = (uint32_t)(trigger->trigger_pos / 100.0 * devc->limit_samples);
setting.trig_glb = trigger->trigger_stages;
......@@ -882,7 +885,7 @@ static uint64_t dso_cmd_gen(struct sr_dev_inst *sdi, struct sr_channel* ch, int
channel_cnt += probe->enabled;
}
cmd += 0x18;
uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(DSLOGIC_MAX_DSO_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_cnt);
cmd += divider << 8;
break;
case SR_CONF_HORIZ_TRIGGERPOS:
......@@ -1157,6 +1160,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
return SR_ERR;
*data = g_variant_new_uint64(ch->vdiv);
break;
case SR_CONF_FACTOR:
if (!ch)
return SR_ERR;
*data = g_variant_new_uint64(ch->vfactor);
break;
case SR_CONF_TIMEBASE:
if (!sdi)
return SR_ERR;
......@@ -1519,6 +1527,8 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
else
sr_dbg("%s: setting VDIV of channel %d to %d mv failed",
__func__, ch->index, ch->vdiv);
} else if (id == SR_CONF_FACTOR) {
ch->vfactor = g_variant_get_uint64(data);
} else if (id == SR_CONF_TIMEBASE) {
devc->timebase = g_variant_get_uint64(data);
} else if (id == SR_CONF_COUPLING) {
......@@ -1936,11 +1946,13 @@ static void receive_transfer(struct libusb_transfer *transfer)
mstatus.ch0_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 1*2);
mstatus.ch0_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 3);
mstatus.ch0_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 2/2);
mstatus.ch0_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 4/2);
mstatus.ch1_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 7*2);
mstatus.ch1_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 15);
mstatus.ch1_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 8/2);
mstatus.ch1_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 10/2);
mstatus.ch0_period += *((const uint32_t*)cur_buf + mstatus_offset/2 + 4/2) << 32;
mstatus.ch0_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 6/2);
mstatus.ch1_max = *((const uint8_t*)cur_buf + mstatus_offset*2 + 9*2);
mstatus.ch1_min = *((const uint8_t*)cur_buf + mstatus_offset*2 + 19);
mstatus.ch1_period = *((const uint32_t*)cur_buf + mstatus_offset/2 + 10/2);
mstatus.ch1_period += *((const uint32_t*)cur_buf + mstatus_offset/2 + 12/2) << 32;
mstatus.ch1_pcnt = *((const uint32_t*)cur_buf + mstatus_offset/2 + 14/2);
mstatus.vlen = *((const uint32_t*)cur_buf + mstatus_offset/2 + 16/2) & 0x7fffffff;
mstatus.stream_mode = *((const uint32_t*)cur_buf + mstatus_offset/2 + 16/2) & 0x80000000;
mstatus.sample_divider = *((const uint32_t*)cur_buf + mstatus_offset/2 + 18/2);
......@@ -1955,7 +1967,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
} else {
mstatus.vlen = instant_buffer_size;
}
const uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(SR_MHZ(100) * 1.0 / devc->cur_samplerate);
const uint32_t divider = devc->zero ? 0x1 : (uint32_t)ceil(DSLOGIC_MAX_DSO_SAMPLERATE * 1.0 / devc->cur_samplerate / channel_en_cnt);
if ((mstatus.sample_divider == divider &&
mstatus.vlen != 0 &&
mstatus.vlen <= (transfer->actual_length - 512) / sample_width) ||
......
......@@ -344,6 +344,9 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
case SR_CONF_VDIV:
*data = g_variant_new_uint64(ch->vdiv);
break;
case SR_CONF_FACTOR:
*data = g_variant_new_uint64(ch->vfactor);
break;
case SR_CONF_TIMEBASE:
*data = g_variant_new_uint64(devc->timebase);
break;
......@@ -424,6 +427,7 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
ret = SR_ERR;
else {
probe->vdiv = 1000;
probe->vfactor = 1;
probe->coupling = SR_DC_COUPLING;
probe->trig_value = 0x80;
sdi->channels = g_slist_append(sdi->channels, probe);
......@@ -472,6 +476,11 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
sr_dbg("%s: setting VDIV of channel %d to %" PRIu64, __func__,
ch->index, ch->vdiv);
ret = SR_OK;
} else if (id == SR_CONF_FACTOR) {
ch->vfactor = g_variant_get_uint64(data);
sr_dbg("%s: setting FACTOR of channel %d to %" PRIu64, __func__,
ch->index, ch->vfactor);
ret = SR_OK;
} else if (id == SR_CONF_TIMEBASE) {
devc->timebase = g_variant_get_uint64(data);
sr_dbg("%s: setting TIMEBASE to %" PRIu64, __func__,
......
......@@ -83,6 +83,8 @@ static struct sr_config_info sr_config_info_data[] = {
"Filter Targets", NULL},
{SR_CONF_VDIV, SR_T_RATIONAL_VOLT, "vdiv",
"Volts/div", NULL},
{SR_CONF_VDIV, SR_T_RATIONAL_VOLT, "factor",
"Probe Factor", NULL},
{SR_CONF_COUPLING, SR_T_CHAR, "coupling",
"Coupling", NULL},
{SR_CONF_DATALOG, SR_T_BOOL, "datalog",
......
......@@ -32,7 +32,7 @@
#define WINVER 0x0501
#define _WIN32_WINNT WINVER
#include <Winsock2.h>
#include <ddk/usbiodef.h>
#include <usbiodef.h>
#endif
#ifdef __cplusplus
......@@ -389,7 +389,7 @@ struct sr_input_format {
/**
* Load a file, parsing the input according to the file's format.
*
*
* This function will send datafeed packets to the session bus, so
* the calling frontend must have registered its session callbacks
* beforehand.
......@@ -404,7 +404,7 @@ struct sr_input_format {
* the responsibility of the caller to free it later.
* @param filename The name (and path) of the file to use.
*
* @return SR_OK upon success, a negative error code upon failure.
* @return SR_OK upon succcess, a negative error code upon failure.
*/
int (*loadfile) (struct sr_input *in, const char *filename);
};
......@@ -610,11 +610,11 @@ struct sr_status {
uint8_t ch0_max;
uint8_t ch0_min;
uint32_t ch0_period;
uint64_t ch0_period;
uint32_t ch0_pcnt;
uint8_t ch1_max;
uint8_t ch1_min;
uint32_t ch1_period;
uint64_t ch1_period;
uint32_t ch1_pcnt;
uint32_t vlen;
......@@ -767,6 +767,9 @@ enum {
/** Channel enable for dso channel. */
SR_CONF_EN_CH,
/** probe factor for dso channel. */
SR_CONF_FACTOR,
/** Trigger types. */
SR_CONF_TRIGGER_TYPE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment