US2400: Use Bank- and Bank+ to page over sends on pots
This commit is contained in:
parent
0d05cd231b
commit
20fff72370
@ -98,6 +98,10 @@ LedState
|
||||
US2400Protocol::left_press (Button &)
|
||||
{
|
||||
if (_subview_mode != None) {
|
||||
if (_sends_bank > 0) {
|
||||
_sends_bank--;
|
||||
redisplay_subview_mode();
|
||||
}
|
||||
return none;
|
||||
}
|
||||
|
||||
@ -126,6 +130,19 @@ LedState
|
||||
US2400Protocol::right_press (Button &)
|
||||
{
|
||||
if (_subview_mode != None) {
|
||||
bool hasNextSend = true;
|
||||
int numSends = 0;
|
||||
while (hasNextSend) {
|
||||
if (first_selected_stripable()->send_name(numSends).length() < 1) {
|
||||
hasNextSend = false;
|
||||
} else {
|
||||
numSends++;
|
||||
}
|
||||
}
|
||||
if (numSends > (_sends_bank + 1) * 16) {
|
||||
_sends_bank++;
|
||||
redisplay_subview_mode();
|
||||
}
|
||||
return none;
|
||||
}
|
||||
|
||||
|
@ -964,7 +964,7 @@ Strip::setup_trackview_vpot (boost::shared_ptr<Stripable> r)
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
pc = r->send_level_controllable (global_pos - 8);
|
||||
pc = r->send_level_controllable (global_pos - 8 + (_surface->mcp().get_sends_bank() * 16));
|
||||
break;
|
||||
}
|
||||
#endif //ifdef MIXBUS
|
||||
|
@ -122,6 +122,7 @@ US2400Protocol::US2400Protocol (Session& session)
|
||||
, state_version (0)
|
||||
, marker_modifier_consumed_by_button (false)
|
||||
, nudge_modifier_consumed_by_button (false)
|
||||
, _sends_bank (0)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::US2400, "US2400Protocol::US2400Protocol\n");
|
||||
|
||||
@ -1875,6 +1876,7 @@ US2400Protocol::is_mapped (boost::shared_ptr<Stripable> r) const
|
||||
void
|
||||
US2400Protocol::stripable_selection_changed ()
|
||||
{
|
||||
_sends_bank = 0;
|
||||
//this function is called after the stripable selection is "stable", so this is the place to check surface selection state
|
||||
for (Surfaces::iterator si = surfaces.begin(); si != surfaces.end(); ++si) {
|
||||
(*si)->update_strip_selection ();
|
||||
@ -1988,3 +1990,9 @@ US2400Protocol::set_automation_state (AutoState as)
|
||||
|
||||
ac->set_automation_state (as);
|
||||
}
|
||||
|
||||
int
|
||||
US2400Protocol::get_sends_bank ()
|
||||
{
|
||||
return _sends_bank;
|
||||
}
|
@ -214,6 +214,8 @@ class US2400Protocol
|
||||
void remove_down_select_button (int surface, int strip);
|
||||
void select_range (uint32_t pressed);
|
||||
|
||||
int get_sends_bank ();
|
||||
|
||||
protected:
|
||||
// shut down the surface
|
||||
void close();
|
||||
@ -302,6 +304,7 @@ class US2400Protocol
|
||||
int _last_bank[9];
|
||||
bool marker_modifier_consumed_by_button;
|
||||
bool nudge_modifier_consumed_by_button;
|
||||
int _sends_bank;
|
||||
|
||||
boost::shared_ptr<ArdourSurface::US2400::Surface> _master_surface;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user