Skip to content

Commit

Permalink
major changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Obkircher Jakob committed Dec 7, 2010
1 parent 756a387 commit 96d6a67
Show file tree
Hide file tree
Showing 46 changed files with 104,229 additions and 92,249 deletions.
17 changes: 11 additions & 6 deletions Classes/ARViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ - (void)loadView {

[ar_overlayView addSubview:ar_debugView];
}
radarView = [[Radar alloc]initWithFrame:CGRectMake(0, 0, 61, 61)];
radarViewPort = [[RadarViewPortView alloc]initWithFrame:CGRectMake(0, 0, 61, 61)];
radarView = [[Radar alloc]initWithFrame:CGRectMake(2, 2, 61, 61)];
radarViewPort = [[RadarViewPortView alloc]initWithFrame:CGRectMake(2, 2, 61, 61)];

self.view = ar_overlayView;
[self.view addSubview:radarView];
Expand Down Expand Up @@ -437,10 +437,15 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading
}

}
int gradToRotate= newHeading.trueHeading-oldHeading;
float rad = gradToRotate*M_PI/180;
radarView.transform = CGAffineTransformMakeRotation(rad);
[radarView setNeedsDisplay];
int gradToRotate= newHeading.trueHeading-90-22.5;
if([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft){
gradToRotate+=90;
}
if(gradToRotate <0){
gradToRotate= 360+gradToRotate;
}
radarViewPort.referenceAngle = gradToRotate;
[radarViewPort setNeedsDisplay];
oldHeading = newHeading.trueHeading;
if (self.locationDelegate && [self.locationDelegate respondsToSelector:@selector(locationManager:didUpdateHeading:)]) {
//forward the call.
Expand Down
67 changes: 0 additions & 67 deletions Classes/CamViewController.h

This file was deleted.

Loading

0 comments on commit 96d6a67

Please sign in to comment.