pos_vdivs_(1),
neg_vdivs_(1),
resolution_(0),
- autoranging_(1)
+ autoranging_(true)
{
pv::data::Analog* analog_data =
dynamic_cast<pv::data::Analog*>(data().get());
neg_vdivs_ = 0;
}
+ // Split up the divs if there are negative values but no negative divs
+ if ((min < 0) && (neg_vdivs_ == 0)) {
+ neg_vdivs_ = pos_vdivs_ / 2;
+ pos_vdivs_ -= neg_vdivs_;
+ }
+
double min_value_per_div;
if ((pos_vdivs_ > 0) && (neg_vdivs_ > 0))
min_value_per_div = std::max(max / pos_vdivs_, -min / neg_vdivs_);