How to create Geofence - android-ibeacon

In the qualcomm Gimbal manager, I am trying to "Create a New Geofence" when I enter the name and search address it is showing "Valid radial or polygonal geofence is required" error. Can anybody tell me how to resolve the error?

Use the "Add Geofence" button in the top right corner then click the "Create Geofence" then you will see a popup with Name, Type, Raidus and address options.
Name - can be anything as per your requirement
Type - based on your requirement you can use radial or polygon
radial - will create a circular geofence
polygon - will give you an option to create what ever shape you want.
Address - you can enter any google address available from then on you can drag and create where ever you want the geofence to be
and then finally hit create button in the top right corner. You are done :)

Related

SVG mouse event unsyncronized if window scrolled

I don't know how to properly explain this.
I have a svg element which is a big rectangle. If i scroll down, then click on my element, the click isn't registered where my mouse is, but where my mouse would be if i didn't scroll down.
So, if i scroll down by 100px and click on my rectangle, the click will be registered 100px above where i actually clicked.
It's behaving as if i hadn't scrolled down.
Edit: I'm using event.clientX and event.clientY to get the mouse position.
I'm new to svg and i don't know the right keywords to describe my problem.
I'm using svg.js, though i don't think it's relevant to the problem.
I assume this is a well known thing. Can someone point me in the right direction? What kind of keyword am i looking for here?
The problem seems simple enough, i just need to know what to search for.
Thank you.
The problem was the utilization of (event.clientX, event.clientY) to get the mouse position.
In the presence of a vertical and/or horizontal scroll, using these properties caused a mismatch between where the mouse appeared within the page and the mouse position provided by (event.clientX, event.clientY).
I was using the mousedown event, with the mousemove event to create a selection rectangle, similar to what you can find in video games. When horizontal or vertical scrolling had been applied, my selection rectangle didn't appear where my mouse was.
This was solved by using event.pageX and event.pageY (instead of clientX and clientY).
Thank you to #ccprog for pointing me in the right direction.

Attaching items to the hands

We want to attach some UI and other items to the back of the articulated hand. Just trying to figure out how to do that. I have found how to turn on and off the hand visualizer through MixedRealityHandTrackingProfile but I'm trying to find the Unity Game Object I can parent the items to or at least a way to access the hand transform. Thanks for any pointers!
Step 1: Select the object in the scene hierarchy that you want to follow your hand. Click “add component” in the inspector panel.
Step 2: Type in “RadialView” in the search box and you should see the RadialView solver appear. Click on it. You will see a few additional required scripts appear automatically.
Note: it adds the solver handler script. Along with that, the Radial View script will show up as well just like the orbital script.
Step 3: Change the radial view to not follow the head but follow the left hand. Select the dropdown menu next to the “tracked object to reference” option. Then select “hand joint left” from the menu.
Step 4: As you may see, once you select the hand joint you can choose which part of the hand you want the cube to follow. There are a lot of options to use! For this example, we are going to use the wrist. So next to the option “tracked hand joint” click the dropdown menu and select wrist.
Note: Not all joints, in this current version of the HoloLens2 can be tracked. This is a bug that may be fixed in the near future.
Now if you press play and try it out in your scene, you will see that the object does follow the wrist, but the object may lag a little bit behind and looks like it’s struggling to keep up. Now to fix this and make it so that the object is with the wrist at all time we must change a few things. Set the maximum and minimum distances to 0 so that the cube will not have any distance between it and the user’s wrist. Once set, the cube will be perfectly aligned with the wrist.
In the latest mrtk_development branch as of PR 4532 you can also used the "Hand Constraint" component. You can see an example of how to use it at MixedRealityToolkit.Examples/Experimental/HandTracking/Scenes/HandBasedMenuExample.unity.
Have a look at Assets/MixedRealityToolkit.SDK/Experimental/Features/Utilities/Solvers/HandConstraint.cs for the implementation.
You can add this behavior by adding a "Hand Constraint" solver to the object that you wish to follow the hand.
The Hand Constraint component will also be available in the upcoming MRTK V2.0.0 RC2 release.

How to detect where on a sprite a mouse-click occurred on scratch

So I’ve been trying to make a target type game where you click on a target and it tells you how accurate you were and where you clicked each time. After a while I have run across an issue where I couldn’t find out where on the sprite I clicked the target on. I tried googling it but all that comes up is detecting when the sprite is clicked. If anyone can help me it would be very appreciated. Thank you.
I think this is what you want: Create a variable (I'll call it accuracy). Then create an event for "When this sprite clicked". Have it set your variable to "distance to mouse pointer". This will give you the distance from the mouse click to the center of the sprite.

Cross Color Change Puzzle logical solution

I want to write a code that solve this puzzle for me.
The rules:
If you click the green tile it becomes red.
If you click the red tile it becomes gray.
If you click the gray tile it becomes green.
Also, if you click on a tile, it's neighbors vertically and horizontally also changes color, like a cross.
You can click on a tile as many as you like.
For exmaple:
Click to view - If I click on the marked tile...
Click to view - It will look like this
I'm looking for a logic behind it, so far I have no clue. I can code that, it's not what I'm looking for, but the (mathematical?) logic behind the solution. For example, the Rubik's Cube steps to make to have a full ordered cube. I want to make a program that automatically tries to solve this.
Its very simple if you do this with an array,
int[][] box;
if(//if you click box[a][b])
{
change_color(a,b);
change_color(a-1,b);
change_color(a+1,b);
change_color(a,b-1);
change_color(a,b+1);
}
change_color(int x,int y)
{
if(box[x][y]==red)
box[x][y]=grey;
if(box[x][y]==grey)
box[x][y]=green;
if(box[x][y]==green)
box[x][y]=red;
}

Can I use an image instead of a title in an Apple Watch app?

How can I put an icon in the top left label and make fullscreen? Apple allocates some space on top for the digital clock and back label. I would like to customize it, but I can't find anything in the SDK to enable this.
The top strip of the Watch screen is reserved for displaying the page title, or occasionally links such as "Cancel" by default for modal views, and the clock. It is not possible to hide this.
It is possible to set an empty title for a page. Some settings will alsoplace a background image behind this text (if you set the mode to 'Aspect Fill', at least in the current Xcode 6.2 beta 3). However, the portion of the image at the top of the screen is simply occluded by a black strip, so this does not achieve what you want.
Additionally, Apple have specifically recommended against displaying logos on the Apple Watch screen, with the rationale that the screen is too small to display for the user anything but actual content.
To set the Global tint:
Select the Interface Controller itself in Interface Builder by clicking on the Yellow circle at the top of the view of the screen.
Press Cmd-Opt-1 to display the File Inspector section of the Utilites on the right hand side.
Set the 'Global Tint' option in the section 'Interface Builder Document', as per the screenshot.
Not possible in the first cut but I think it will come later.
It's not actually a back label. The text in the top left of the Watch screen is the title of the current WKInterfaceController. You can change it by using -[WKInterfaceTitle setTitle:], but you are limited to content that is expressible in an NSString (so no UIImages).
It is possible to customise the status bar in watchOS 4.
Select your interface controller in the storyboard
Open the attributes inspector
Check the Full Screen checkbox
After doing this you can add your custom image to the left of the statusbar.

Resources