Page 1 of 1

zmMemRead()

Posted: Tue Sep 07, 2010 8:53 pm
by 382527398571
How do I check whether a signal is valid? ZoneMinder::Memory::zmMemRead($monitor, ['shared_data:signal']) always returns 1.

Signal Check Colour : #0000c0

Thanks.

Posted: Thu Sep 09, 2010 9:26 pm
by 382527398571
When TIMESTAMP_ON_CAPTURE is disabled it works.

It might be something with Monitor::CheckSignal() in src/zm_monitor.cpp.

Code: Select all

                // Avoid sampling the rows with timestamp in
                int y = index / (width * colours);
                if ( y < label_coord.Y() || y > label_coord.Y()+Image::LINE_HEIGHT )
                    break;


Posted: Mon Sep 13, 2010 3:17 pm
by 382527398571

Code: Select all

Index: src/zm_monitor.cpp
===================================================================
--- src/zm_monitor.cpp  (revision 3120)
+++ src/zm_monitor.cpp  (working copy)
@@ -1024,7 +1024,7 @@
                     break;
                 // Avoid sampling the rows with timestamp in
                 int y = index / (width * colours);
-                if ( y < label_coord.Y() || y > label_coord.Y()+Image::LINE_HEIGHT )
+                if ( y < label_coord.Y() || y <= label_coord.Y()+Image::LINE_HEIGHT )
                     break;
             }
             const unsigned char *ptr = buffer+(index*colours);

Posted: Fri Sep 17, 2010 10:06 am
by mastertheknife
Hi,

I can confirm, your patch does fix the signal check. I can see now lines containing Signal Lost and Signal Acquired in my system log.

Added to here if you don't mind: http://www.zoneminder.com/wiki/index.ph ... 2_Bugfixes

mastertheknife.

Posted: Fri Oct 08, 2010 10:42 pm
by zoneminder
Thanks. Now updated.