fix mute automation for busses & consolidate code.
[ardour.git] / libs / surfaces / tranzport / screen.cc
index 51062de3add712f313e52fd58104a3c1295464df..aa888173005957cf05fdda0d8a762dc344c06522 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *   Copyright (C) 2006 Paul Davis 
+ *   Copyright (C) 2006 Paul Davis
  *   Copyright (C) 2007 Michael Taht
  *
  *   This program is free software; you can redistribute it and/or modify
  *   You should have received a copy of the GNU General Public License
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *  
+ *
  *   */
 
+#include <cstring>
 #include <tranzport_control_protocol.h>
+#include <cstring>
 
 void
 TranzportControlProtocol::screen_clear ()
 {
        const char *blank = "                    ";
-       print(0,0,blank); 
+       print(0,0,blank);
        print(1,0,blank);
 }
 
@@ -49,7 +51,7 @@ void TranzportControlProtocol::screen_init ()
        screen_invalidate();
 }
 
-// FIXME: Switch to a column oriented flush to make the redraw of the 
+// FIXME: Switch to a column oriented flush to make the redraw of the
 // meters look better
 
 int
@@ -70,20 +72,20 @@ TranzportControlProtocol::screen_flush ()
 #endif
                        if(cell > 4) { row = 1; } else { row = 0; }
                        col_base = (cell*4)%COLUMNS;
-        
-                       uint8_t cmd[8]; 
-                       cmd[0] = 0x00; 
-                       cmd[1] = 0x01; 
-                       cmd[2] = cell; 
-                       cmd[3] = screen_pending[row][col_base]; 
+
+                       uint8_t cmd[8];
+                       cmd[0] = 0x00;
+                       cmd[1] = 0x01;
+                       cmd[2] = cell;
+                       cmd[3] = screen_pending[row][col_base];
                        cmd[4] = screen_pending[row][col_base+1];
-                       cmd[5] = screen_pending[row][col_base+2]; 
+                       cmd[5] = screen_pending[row][col_base+2];
                        cmd[6] = screen_pending[row][col_base+3];
                        cmd[7] = 0x00;
 
                        if((pending = lcd_write(cmd)) == 0) {
                                /* successful write: copy to current cached display */
-                               screen_invalid &= mask.flip(); 
+                               screen_invalid &= mask.flip();
                                memcpy (&screen_current[row][col_base], &screen_pending[row][col_base], 4);
                        }
                }