From c9d52b47ba92ff4f533c4ca3d399f9b2f6c95b77 Mon Sep 17 00:00:00 2001
From: Isaac Connor <iconnor@tesla.com>
Date: Tue, 31 Oct 2017 13:29:49 -0700
Subject: [PATCH] add debug

---
 src/zm_monitorstream.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp
index 85b223f6a..d7b74b051 100644
--- a/src/zm_monitorstream.cpp
+++ b/src/zm_monitorstream.cpp
@@ -270,7 +270,7 @@ void MonitorStream::processCommand( const CmdMsg *msg ) {
       Debug( 1, "Got SCALE command, to %d", scale );
       break;
     }
-  case CMD_QUIT :
+    case CMD_QUIT :
     {
       Info ("User initiated exit - CMD_QUIT");
       break;
@@ -316,7 +316,7 @@ void MonitorStream::processCommand( const CmdMsg *msg ) {
   //status_data.enabled = monitor->shared_data->active;
   status_data.enabled = monitor->trigger_data->trigger_state!=Monitor::TRIGGER_OFF;
   status_data.forced = monitor->trigger_data->trigger_state==Monitor::TRIGGER_ON;
-  Debug( 2, "L:%d, D:%d, P:%d, R:%d, d:%.3f, Z:%d, E:%d F:%d", 
+  Debug( 2, "Buffer Level:%d, Delayed:%d, Paused:%d, Rate:%d, delay:%.3f, Zoom:%d, Enabled:%d Forced:%d", 
     status_data.buffer_level,
     status_data.delayed,
     status_data.paused,
@@ -338,11 +338,15 @@ void MonitorStream::processCommand( const CmdMsg *msg ) {
       //exit( -1 );
     }
   }
+Debug(2, "NUmber of bytes sent: (%d)", nbytes );
 
   // quit after sending a status, if this was a quit request
-  if ((MsgCommand)msg->msg_data[0]==CMD_QUIT)
-  exit(0);
+  if ( (MsgCommand)msg->msg_data[0]==CMD_QUIT ) {
+    Debug(2,"Quitting");
+    exit(0);
+  }
 
+  Debug(2,"Updating framrate");
   updateFrameRate( monitor->GetFPS() );
 } // end void MonitorStream::processCommand( const CmdMsg *msg )