- do_parameter_display (PanAzimuthAutomation, pos);
- } else {
- _surface->write (_vpot->set_all (pos, true, Pot::dot));
- do_parameter_display (PanAzimuthAutomation, pos);
+ queue_parameter_display (PanAzimuthAutomation, pos);
+ }
+ } else if (control == _vpot) {
+ _surface->write (_vpot->set (pos, true, Pot::dot));
+ queue_parameter_display (PanAzimuthAutomation, pos);
+ }
+
+ _last_pan_azi_position_written = pos;
+ }
+ }
+}
+
+void
+Strip::notify_panner_width_changed (bool force_update)
+{
+ if (_route) {
+
+ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("pan width change for strip %1\n", _index));
+
+ boost::shared_ptr<Pannable> pannable = _route->pannable();
+
+ if (!pannable || !_route->panner()) {
+ _surface->write (_vpot->zero());
+ return;
+ }
+
+ Control* control = 0;
+ ControlParameterMap::iterator i = control_by_parameter.find (PanWidthAutomation);
+
+ if (i == control_by_parameter.end()) {
+ return;
+ }
+
+ control = i->second;
+
+ double pos = pannable->pan_width_control->internal_to_interface (pannable->pan_width_control->get_value());
+
+ if (force_update || pos != _last_pan_azi_position_written) {
+
+ if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
+
+ if (control == _fader) {
+ if (!control->in_use()) {
+ _surface->write (_fader->set_position (pos));
+ queue_parameter_display (PanWidthAutomation, pos);
+ }