Skip to content

Commit

Permalink
Last second updates for 2.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryghost committed Oct 14, 2014
1 parent 86c8123 commit 8979812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mbientlab.metawear.app"
android:versionCode="4"
android:versionName="2.2" >
android:versionCode="5"
android:versionName="2.3" >

<uses-sdk
android:minSdkVersion="18"
Expand Down
6 changes: 6 additions & 0 deletions src/com/mbientlab/metawear/app/NeoPixelFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,21 @@ private interface Preset {
@Override
public void setPattern() {
byte nLEDs= Byte.parseByte(nLEDsText.getEditableText().toString()), currStrand= strand;

neoPixelController.holdStrand(currStrand, (byte) 1);
for(byte i= 0; i < nLEDs; i++) {
neoPixelController.setPixel(currStrand, i, (byte)0, (byte)-1, (byte)0);
}
neoPixelController.holdStrand(currStrand, (byte) 0);
}
},
new Preset() {
@Override
public void setPattern() {
byte nLEDs= Byte.parseByte(nLEDsText.getEditableText().toString()), currStrand= strand;
double delta= 2 * Math.PI / nLEDs;

neoPixelController.holdStrand(currStrand, (byte) 1);
for(byte i= 0; i < nLEDs; i++) {
double step= i * delta;
double rRatio= Math.cos(step),
Expand All @@ -97,6 +102,7 @@ public void setPattern() {
(byte)((gRatio < -gRatio ? 0 : gRatio) * 255),
(byte)((bRatio < -bRatio ? 0 : bRatio) * 255));
}
neoPixelController.holdStrand(currStrand, (byte) 0);
}
},
new Preset() {
Expand Down

0 comments on commit 8979812

Please sign in to comment.