zmMemRead()

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

zmMemRead()

Post by 382527398571 » Tue Sep 07, 2010 8:53 pm

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 » Thu Sep 09, 2010 9:26 pm

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 » Mon Sep 13, 2010 3:17 pm

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: 679
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife » Fri Sep 17, 2010 10:06 am

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: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Fri Oct 08, 2010 10:42 pm

Thanks. Now updated.
Phil

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest