Skip to content

Commit

Permalink
added dials to change time interval
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasjuffinger committed Dec 21, 2017
1 parent da847a6 commit 632754d
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.jonasjuffinger.timelapse"
minSdkVersion 10
targetSdkVersion 10
versionCode 4
versionName "0.3.1"
versionCode 6
versionName "0.3.3"
}
buildTypes {
release {
Expand Down
Binary file added app/release/TimeLapse-release-0.3.3.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4},"path":"TimeLapse-release-0.3.1.apk","properties":{"packageId":"com.jonasjuffinger.timelapse","split":"","minSdkVersion":"10"}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"TimeLapse-release-0.3.3.apk","properties":{"packageId":"com.jonasjuffinger.timelapse","split":"","minSdkVersion":"10"}}]
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
case ScalarInput.ISV_DIAL_2_CLOCKWISE:
case ScalarInput.ISV_DIAL_2_COUNTERCW:
return onLowerDialChanged(getDialStatus(ScalarInput.ISV_DIAL_2_STATUS) / 22);
case ScalarInput.ISV_DIAL_3_CLOCKWISE:
case ScalarInput.ISV_DIAL_3_COUNTERCW:
return onThirdDialChanged(getDialStatus(ScalarInput.ISV_DIAL_3_STATUS) / 22);
case ScalarInput.ISV_DIAL_KURU_CLOCKWISE:
case ScalarInput.ISV_DIAL_KURU_COUNTERCW:
return onKuruDialChanged(getDialStatus(ScalarInput.ISV_DIAL_KURU_STATUS) / 22);
case ScalarInput.ISV_KEY_MODE_DIAL:
return onModeDialChanged(getDialStatus(ScalarInput.ISV_KEY_MODE_DIAL));
default:
Expand Down Expand Up @@ -185,6 +191,8 @@ protected int getDialStatus(int key) {
protected boolean onLensDetached() { return false; }
protected boolean onUpperDialChanged(int value) { return false; }
protected boolean onLowerDialChanged(int value) { return false; }
protected boolean onThirdDialChanged(int value) { return false; }
protected boolean onKuruDialChanged(int value) { return false; }
protected boolean onModeDialChanged(int value) { return false; }

protected boolean onDeleteKeyDown() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,29 @@ void updateTimes() {
}
}

protected boolean onUpperDialChanged(int value) {
sbInterval.dialChanged(value);
sbShots.dialChanged(value);
return true;
}

protected boolean onLowerDialChanged(int value) {
sbInterval.dialChanged(value);
sbShots.dialChanged(value);
return true;
}

protected boolean onThirdDialChanged(int value) {
sbInterval.dialChanged(value);
sbShots.dialChanged(value);
return true;
}

protected boolean onKuruDialChanged(int value) {
sbInterval.dialChanged(value);
sbShots.dialChanged(value);
return true;
}

@Override
protected boolean onMenuKeyUp()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ protected void onResume() {

final Camera.Parameters params = cameraEx.createEmptyParameters();
final CameraEx.ParametersModifier modifier = cameraEx.createParametersModifier(params);
if(modifier.isSupportedSilentShutterMode())
// setSilentShutterMode doesn't exist on all cameras
try {
modifier.setSilentShutterMode(settings.silentShutter);
cameraEx.getNormalCamera().setParameters(params);
cameraEx.getNormalCamera().setParameters(params);
}
catch(NoSuchMethodError ignored)
{}

pictureReviewTime = autoReviewControl.getPictureReviewTime();
log(Integer.toString(pictureReviewTime));
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit 632754d

Please sign in to comment.