Dahua-API: can not obtain event alarm relay-out - ip-camera

Hello I am working with a dahua camera and trying to activate by API an event alarm relay-out (AO1-AO2) and I don't know any way on how to activate it. I have explored dahoo API and I have not found any correct functions. The nearest option is the following:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=true
Any idea.
Thanks
Gorka

Related

Have drone hover for longer than 32,767ms after completing waypoint in DJIWaypointMission

In the iOS DJI documentation for DJIWaypointActionType, it states that the maximum range for DJIWaypointActionTypeStay is 32767ms. I need a drone to hover for 60s or more. Is there a way around this limitation?
I've attempted implement this manually using the Timeline. This would be much preferred for our use case. However, I need to pause the timeline in between each action, not during any given action. Is there a way to do that? Attempting to pause the timeline results in errors which the debugger showing have codes 10003 and 10060. Retrieving these errors with NSError.djisdkMissionError(forCode: 10003) yields UnknownError for both codes.
How about using hover at last waypoint?
The solution ended up being to separate each action into it's own Timeline consisting of only one elemnt. Then, after each timeline is complete, reinitialize the mission control object before executing the next timeline.

How can we get the coordinates of the current text input globally

How is it possible to get the coordinates of the current text input globally?
I am familiar with Quartz Event Taps and NSEvent API for monitoring events, but I have not yet found a way to figure out where on the screen text input is occurring.
Is there an API I am missing?
You can try the Accessibility API.
Take a look at AXUIElementCopyAttributeValue(... kAXFocusedUIElementAttribute ...)
Once you have the focused element, you can grab screen coordinates from it.

X11: Removing event from queue

I'm creating an FPS demo using an Engine called: Gameplay. I'm currently trying to define a captureMouse() function into the engine so the player can look around the map. I've already been able to pin the cursor to the center of the window and turn it invisible, but as I move the mouse the screen (camera) seems to "vibrate" as it moves around. After a lot of tinkering with X11 functions I figured that the XWarpPointer() function I'm using to warp the cursor back to the center of the window is adding a "mouse moved" event to the event queue.
X11 Question: How can I identify and remove an event from the event queue before it is captured by the event cycle?
Question: Has anyone been a similar problem and solved in a different manner? If so, what did you do?
I'm sorry if I'm not being clear. I have no extensive knowledge of X11, but I really need to add this to the engine so I can, in turn, add it to my game.
I guess you're using XtAppMainLoop to handle your events.
This is actually a call to XtAppNextEvent followed by XtDispatchEvent.
If you replace the XtAppMainLoop with a loop calling XtAppNextEvent to get the next event and check its type (the type field of the XEvent structure).
If you want to handle the event call XtDispatchEvent, do nothing to ignore it.
The loop needs to exit when XtAppGetExitFlag returns true (or add your own exit flag).

Autocomplete/suggest functionality in an applescript input box

I am trying to build an applescript dialog that helps me keep track of the things I am working on. To make it really effective I'd like to have it look up items from my todo list and suggest them as I type a la google suggest or other javascript autocomplete functionality.
I was thinking it would be fairly simple if I just captured the input of the # key, which I wanted to use to denote project or the # key for tasks and at that point started matching the input to my list of tasks or projects. For example, lets say I type:
"Worked on feature for #"
At this point the input of the # would start capturing keyboard input and try to suggest one of the projects on my todo list. This is where I am stuck. It seems like I should be able to attach a listener or something to my input box but I can't seem to find any examples or reference to such functionality.
You can't do this with applescript. You need to build your own window in a cocoa application and then hook into the NSTextField's methods to do this. It's not too difficult but it requires a whole different set of skills than applescript.

Transition effect like the start menu tile transition on WP7

I would like to recreate the transition effect which can be observed when a user clicks on a tile on the start menu. But I have hit a road block in my quest. I am unable to search for information related to that particular transition. Is it possible to do so in you own application? If so, please guide me. Thanks in advance.
I call it a 'peel animation' and have implemented it here:
http://www.scottlogic.co.uk/blog/colin/2011/03/metro-in-motion-part-2-peel-animations/
Others call it a 'turnstile' and have also implemented it:
http://turnstile.codeplex.com/

Resources