zmMemRead()

Forum for questions and support relating to the 1.24.x releases only.
Locked
382527398571
Posts: 10
Joined: Thu Aug 26, 2010 9:41 pm

zmMemRead()

Post 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.
Last edited by 382527398571 on Thu Sep 09, 2010 10:01 pm, edited 2 times in total.
382527398571
Posts: 10
Joined: Thu Aug 26, 2010 9:41 pm

Post 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;

382527398571
Posts: 10
Joined: Thu Aug 26, 2010 9:41 pm

Post 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);
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post 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.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks. Now updated.
Phil
Locked