Page 1 of 1

Mapped motion from Monitor click

Posted: Sun Mar 12, 2006 7:22 pm
by gneuf
I'm exhausted from creating the control script for the PTZ2N, but that's no excuse for not figuring this one out:

Does ZM emit -move_map control commands when you click on a monitor image? I want to be able to click on the image and have ZM center the click point by panning and tilting.

What I've found so far is that the move_map commands are used for the motion tracking feature - I haven't been able to make ZM emit anything from a click on the image.

Does ZM even do that? Is it cambozola-related? Or browser related? I've tried a number of things, but nothing has worked so far.

Sorry if ZM already does this - I couldn't find it anywhere in the forums...

Thanks in advance.

Posted: Mon Mar 13, 2006 10:31 pm
by jameswilson
I think zm does this or it did in 1.21.3 but you need to use firefox

Posted: Thu Mar 16, 2006 12:23 am
by zoneminder
You need to ensure that your control capabilities have CanMoveMapped checked and that you have appropriate pan and tilt ranges entered. For simplicity I would recommend unchecking the other move methods for now as some override others.

Posted: Mon Mar 20, 2006 9:40 pm
by gneuf
Here are the possible settings that affect the Watch window HTML code:

ZM:
1) use cambozola.
2) browser detection.
3) javascript vs. http switch.

Browser:
1) IE vs. Netscape vs. Firefox
2) Streaming capability.

So my current questions are:

1) Does the monitor window map-clicking work if the page is javascript?
2) Does the monitor window map-clicking work if the page is pure html?
3) Do Netscape or Firefox ever get any html content that's non-javascript (e.g. do they ever see the cambozola java code)?
4) Does Browser native streaming/display affect whether you can map-click.

I'm asking because I've tried the three browsers, and although they get different pages to display, IE gets cambozola, and the other two get only javascript. Changing the options in ZM doesn't seem to change what each browser gets sent. And so far, *nothing* makes ZM emit any move_map_* commands.

I'm still at it, though...

It's a burning question because I now have two control scripts for two cameras - one that *can* read back the camera's PT position, and another that *can't*. So, when I can make the map-clicking work, I'll have the two different types of control code to create - one with no saved state information, and one with saved state information.

And then...I can start trying out all kinds of cameras that don't have control scripts... :)

Posted: Thu Mar 23, 2006 5:04 pm
by zoneminder
I also need to address the issue of control scripts and saved state as I have got hold of a VCL orbiter and the protocol for that really needs saved state. So if you've crossed that hurdle already then feel free to mention what you did.

Posted: Fri Mar 24, 2006 12:45 am
by gneuf
I'm quickly learning what I need to know about shared memory.

Then, the control script would *either* check for SHM,
create it if it's not there (first call),
move the camera to a known position (reset or to the stop and back),
and store the various axes' positions there.

*or*

Run using the stored positions.

I suppose you could do it to disk, but each control click would be a read/write. :(

Posted: Fri Mar 24, 2006 11:35 am
by zoneminder
Shared memory is the obvious place to put it. However I would caution against creating the segment if it doesn't already exist as that would imply that nothing else is running at all and you wouldn't be getting any video anyway.