Skip to content

Commit

Permalink
modified sync signal for better compatibility across different platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisVeigl committed Mar 12, 2018
1 parent 2aeabfe commit 3bb351a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Services/modem.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ export default class Modem {
this.setData(animations);
}

// slow sine wave for sync signal
// sync signal
generateSyncSignal(number: number = 1): number[] {
var ssig = [];
for(var j = 0; j < number*360; j += 1)
ssig.push(Math.sin(Math.radians((j/4))));
if (j<number/2) ssig.push(Math.sin(Math.radians((j/4)))); // a slow sine in the fist half
else ssig.push(0); // then mute in the second half - worked on most platforms
return ssig;
}

Expand Down

0 comments on commit 3bb351a

Please sign in to comment.