From fea4f7402eabdb86d28a1eaa7e92c36d46ec7bca Mon Sep 17 00:00:00 2001 From: Ge0rges Date: Thu, 9 Mar 2017 23:30:56 +0200 Subject: [PATCH] Fixed a calibration issue with multiple peers --- .../UserInterfaceState.xcuserstate | Bin 18215 -> 18165 bytes Synaction/Synaction.h | 2 +- Synaction/Synaction.m | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Synaction.xcodeproj/project.xcworkspace/xcuserdata/GeorgesKanaan.xcuserdatad/UserInterfaceState.xcuserstate b/Synaction.xcodeproj/project.xcworkspace/xcuserdata/GeorgesKanaan.xcuserdatad/UserInterfaceState.xcuserstate index 62379d8cbfd6b7fdeeca65b8a4572b02320e97c4..1b960897f90196b8c208894545c3567eef1780e9 100644 GIT binary patch delta 8500 zcmaiY2V7Iv+y6b|h7clzBoK%tj4To|31p!a6}O^@N}b4viXt1g=3Gaudt7I=DnrG+ zTU&RvR;{)_w;i^Q+E#0=cGqhCpFpwp?eG7--~*#UIj8_*z*sODOaW8D zY_Je40V}~;unyFN&0s6o4c-KAfkWUhco&=kr@AN~e^hmYYO@Cg#57AO>jAqfgcQWS-vQ7no> zMwEn1$c!Awh1}?6l!3aUUMLHVLd9q_DnX^F43(n_REerkH5!A)qREIuGtdIG5G_KB z(Q5PtTH{A`Xam}YcA>Y?JLnL47rl=@Kp&wC=reQ^-9mTJ*XTa_4hLZ&4#pxJg2lK6 z4#i^N zxEzngc~^mz?TxOzuC?<#xMXT+j}jfd!L+$^lY9Dj7=hNIog32QJ{ID|$&G z@zE8B@kBD2KN+5&&j4Kl6FPv7pcCj!Mvx*hl8mYcT|qa>--8sB(UiZWk$lTJqz2P4P{inJ!Ei8wRFN^YU?dnt#t}a;USv8lAxtNxGt&i> z5r#yNYThhs8&uu+K9;YRwGJBxCNR1hFrJLB0Tamt{+LYD+s_=V0fbB>8JFq&BVZbH z6if#*n9d*;lz~~f5{YkISzbwDpNhPa%7Tibva0??C566mz4EF?kST-_l4>&PBA5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wOE5bYa?qDYjbOsHQSnF?QYGt4zdoh4zrH3PO(n2 z&alq3R#{hAS6SCu*IPfaZnbW=er`Qzy=VQ+rnVVvS+*S8INNmFOxs(w*|vGM`L@Nj zD%%R%YTH`dr?wroUADcpL$;%~d*KN0KcWn1<4{eWaPi@ca;X%9H9&b;y zYwUV^irry%*}e9Fy@|bNdv{(*g){gC~P{k;7f`vvI zj@6EJjt!1YjvB{q$3DkF#}UUd#|g)`j_)0p9oHN;96vf9I-{Ior_8BvDxD3TYG<-j z=QKLaPOG!EGsD^5nd$80?BeX^?CI?7?Cb3B%ys5F=R3Cro!6azrOVPArx&MBO|MSh zk$yG(cKQ<+a*16sm%^oVCA%yxo6F^D;_B?`;Tq@~?y7K&agBFPa!qs1aJ}K0<(ln! z&$ZUI$#u|G>$>Q=?fT92$n}ToPdCqv+yZyJ+vIk*U2c!t?{4Yt;O^|sbr-wGy5DfW z<$l{8oa_F;z1h9peZqawecgT6{m}iF2YMI}-xKfAds00PPr%c|)88}RGuyMwv(B^C zv&XaFbKLWl=Yr>^=QqzI&mW#=-f*wL8|77ble}85!E5rSdDFcfuix9qo9*rD?cwe1 z?dKir9qS$Mo#dVFo#~zDUFrSMyT^Mh=)LQG>XZ2tKBcdrPwh+g>3l|?*=O~o`O * _Nullable peer + (instancetype _Nonnull)sharedManager;// Use this to get an instance of Synaction - (void)askPeersToCalculateOffset:(NSArray * _Nonnull)peers;// Asks the peers to call -calculateTimeOffsetWithHost, when completed the block of -executeBlockWhenPeerCalibrates will be called on host. -- (void)calculateTimeOffsetWithHost;// Calculate the time difference in nanoseconds between us and the host device. +- (void)calculateTimeOffsetWithHost:(MCPeerID * _Nonnull)hostPeer;// Calculate the time difference in nanoseconds between us and the host device. - (uint64_t)currentNetworkTime;// The current host time adjusted for offset (offset = 0 if host) - (void)atExactTime:(uint64_t)val runBlock:(dispatch_block_t _Nonnull)block;// Run block at the exact host adjusted time val adjusted - (void)executeBlockWhenAllPeersCalibrate:(NSArray * _Nonnull)peers block:(calibrationBlock)completionBlock;// Once EVERY peer in the array calibrates this will be called diff --git a/Synaction/Synaction.m b/Synaction/Synaction.m index f7ef507..1892dc9 100644 --- a/Synaction/Synaction.m +++ b/Synaction/Synaction.m @@ -112,7 +112,7 @@ - (void)askPeersToCalculateOffset:(NSArray * _Nonnull)peers { } // Meant for speakers. -- (void)calculateTimeOffsetWithHost { +- (void)calculateTimeOffsetWithHost:(MCPeerID *)hostPeer { if (!isCalibrating) { isCalibrating = YES;// Used to track the calibration [calculatedOffsets removeAllObjects];// Remove all previously calculated offsets @@ -126,7 +126,7 @@ - (void)calculateTimeOffsetWithHost { }]; NSData *payload = [NSKeyedArchiver archivedDataWithRootObject:payloadDic]; - [self.connectivityManager sendData:payload toPeers:self.connectivityManager.allPeers reliable:YES]; + [self.connectivityManager sendData:payload toPeers:@[hostPeer] reliable:YES]; } // Handle 0 calibrations @@ -138,7 +138,7 @@ - (void)calculateTimeOffsetWithHost { NSMutableDictionary *payloadDic = [[NSMutableDictionary alloc] initWithDictionary:@{@"command": @"syncDone"}]; NSData *payload = [NSKeyedArchiver archivedDataWithRootObject:payloadDic]; - [self.connectivityManager sendData:payload toPeers:self.connectivityManager.allPeers reliable:YES]; + [self.connectivityManager sendData:payload toPeers:@[hostPeer] reliable:YES]; } } } @@ -192,7 +192,7 @@ - (void)session:(MCSession *)session didReceiveData:(NSData *)data fromPeer:(MCP // Check if the host is asking us to sync if ([payload[@"command"] isEqualToString:@"sync"]) { - [self calculateTimeOffsetWithHost]; + [self calculateTimeOffsetWithHost:peerID]; return;