Skip to content

Commit

Permalink
New version with manual focus switch and faster burst mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasjuffinger committed Jun 2, 2020
1 parent 96cf164 commit 0f13f9d
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 64 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ Finally click the start button and wait.

You can stop by clicking the MENU button on the camera.

## Silent Shutter ##
## SS (Silent Shutter) ##
The silent shutter option is functionless on cameras without silent shutter mode.

## AEL ##
## MF (Manual Focus) ##
This sets focus mode to manual. Be sure to have focused before starting the app!

## AEL (Auto Exposure Lock) ##
This locks the exposure to the exposure of the first shot.

## BRC3 ##
Expand All @@ -33,4 +36,4 @@ When selecting the lowest interval the camera is in burst mode. In this mode it

If the app crashes the camera, please try the following camera settings. They were reported to work with the RX100 M4.
- The silent shutter needs to be disabled or unchecked in the app, on some cameras
- The app will not run if you are set or self time or continous shooting - Only Single shoot will work.
- The app will not run if you are set or self time or continuous shooting - Only Single shoot will work.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 10
targetSdkVersion 10
versionCode 7
versionName "1.3.0"
versionName "1.4.0"
}
buildTypes {
release {
Expand Down
Binary file added app/release/TimeLapse-release-1.3.0.apk
Binary file not shown.
Binary file added app/release/TimeLapse-release-1.4.0.apk
Binary file not shown.
25 changes: 21 additions & 4 deletions app/src/main/java/com/jonasjuffinger/timelapse/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,71 @@
class Settings {
private static final String EXTRA_INTERVAL = "com.jonasjuffinger.timelapse.INTERVAL";
private static final String EXTRA_SHOTCOUNT = "com.jonasjuffinger.timelapse.SHOTCOUNT";
private static final String EXTRA_DELAY = "com.jonasjuffinger.timelapse.DELAY";
private static final String EXTRA_DISPLAYOFF = "com.jonasjuffinger.timelapse.DISPLAYOFF";
private static final String EXTRA_SILENTSHUTTER = "com.jonasjuffinger.timelapse.SILENTSHUTTER";
private static final String EXTRA_AEL = "com.jonasjuffinger.timelapse.AEL";
private static final String EXTRA_BRS = "com.jonasjuffinger.timelapse.BRS";
private static final String EXTRA_MF = "com.jonasjuffinger.timelapse.MF";

double interval;
int rawInterval;
int delay;
int rawInterval, rawDelay;
int shotCount, rawShotCount;
boolean displayOff;
boolean silentShutter;
boolean ael;
int fps; // index
boolean brs;
boolean mf;

Settings() {
interval = 1;
rawInterval = 1;
delay = 0;
rawDelay = 0;
shotCount = 1;
rawShotCount = 1;
displayOff = false;
silentShutter = true;
ael = true;
fps = 0;
brs = true;
mf = true;
}

public Settings(double interval, int shotCount, boolean displayOff, boolean silentShutter, boolean ael, boolean brs) {
public Settings(double interval, int shotCount, int delay, boolean displayOff, boolean silentShutter, boolean ael, boolean brs, boolean mf) {
this.interval = interval;
this.delay = delay;
this.shotCount = shotCount;
this.displayOff = displayOff;
this.silentShutter = silentShutter;
this.ael = ael;
this.brs = brs;
this.mf = mf;
}

void putInIntent(Intent intent) {
intent.putExtra(EXTRA_INTERVAL, interval);
intent.putExtra(EXTRA_SHOTCOUNT, shotCount);
intent.putExtra(EXTRA_DELAY, delay);
intent.putExtra(EXTRA_DISPLAYOFF, displayOff);
intent.putExtra(EXTRA_SILENTSHUTTER, silentShutter);
intent.putExtra(EXTRA_AEL, ael);
intent.putExtra(EXTRA_BRS, brs);
intent.putExtra(EXTRA_MF, mf);
}

static Settings getFromIntent(Intent intent) {
return new Settings(
intent.getDoubleExtra(EXTRA_INTERVAL, 1),
intent.getIntExtra(EXTRA_SHOTCOUNT, 1),
intent.getIntExtra(EXTRA_DELAY, 1),
intent.getBooleanExtra(EXTRA_DISPLAYOFF, false),
intent.getBooleanExtra(EXTRA_SILENTSHUTTER, false),
intent.getBooleanExtra(EXTRA_SILENTSHUTTER, true),
intent.getBooleanExtra(EXTRA_AEL, false),
intent.getBooleanExtra(EXTRA_BRS, false)
intent.getBooleanExtra(EXTRA_BRS, false),
intent.getBooleanExtra(EXTRA_MF, true)
);
}

Expand All @@ -76,10 +89,12 @@ void save(Context context)
SharedPreferences.Editor editor = sharedPref.edit();
editor.putInt("interval", rawInterval);
editor.putInt("shotCount", rawShotCount);
editor.putInt("delay", rawDelay);
editor.putBoolean("silentShutter", silentShutter);
editor.putBoolean("ael", ael);
editor.putInt("fps", fps);
editor.putBoolean("brs", brs);
editor.putBoolean("mf", mf);
editor.apply();
}

Expand All @@ -88,9 +103,11 @@ void load(Context context)
SharedPreferences sharedPref = getDefaultSharedPreferences(context);
rawInterval = sharedPref.getInt("interval", rawInterval);
rawShotCount = sharedPref.getInt("shotCount", rawShotCount);
rawDelay = sharedPref.getInt("delay", rawDelay);
silentShutter = sharedPref.getBoolean("silentShutter", silentShutter);
ael = sharedPref.getBoolean("ael", ael);
fps = sharedPref.getInt("fps", fps);
brs = sharedPref.getBoolean("brs", brs);
mf = sharedPref.getBoolean("mf", mf);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ public class SettingsActivity extends BaseActivity
private TextView tvDurationValue, tvDurationUnit;
private TextView tvVideoTimeValue, tvVideoTimeUnit;

private AdvancedSeekBar sbDelay;
private TextView tvDelayValue, tvDelayUnit;

private int fps;
private Spinner spnFps;

private CheckBox cbSilentShutter;
private CheckBox cbAEL;
private CheckBox cbBRS;
private CheckBox cbMF;

@Override
protected void onCreate(Bundle savedInstanceState)
Expand Down Expand Up @@ -78,9 +82,14 @@ protected void onCreate(Bundle savedInstanceState)
lblShots = (TextView) findViewById(R.id.lblShots);
spnFps = (Spinner) findViewById(R.id.spnFps);

sbDelay = (AdvancedSeekBar) findViewById(R.id.sbDelay);
tvDelayValue = (TextView) findViewById(R.id.tvDelayValue);
tvDelayUnit = (TextView) findViewById(R.id.tvDelayUnit);

cbSilentShutter = (CheckBox) findViewById(R.id.cbSilentShutter);
cbAEL = (CheckBox) findViewById(R.id.cbAEL);
cbBRS = (CheckBox) findViewById(R.id.cbBRC);
cbMF = (CheckBox) findViewById(R.id.cbMF);

sbInterval.setMax(119);
sbInterval.setOnSeekBarChangeListener(sbIntervalOnSeekBarChangeListener);
Expand All @@ -92,6 +101,11 @@ protected void onCreate(Bundle savedInstanceState)
sbShots.setProgress(settings.rawShotCount);
sbShotsOnSeekBarChangeListener.onProgressChanged(sbShots, settings.rawShotCount, false);

sbDelay.setMax(39);
sbDelay.setOnSeekBarChangeListener(sbDelayOnSeekBarChangeListener);
sbDelay.setProgress(settings.rawDelay);
sbDelayOnSeekBarChangeListener.onProgressChanged(sbDelay, settings.rawDelay, false);

spnFps.setSelection(settings.fps);
spnFps.setOnItemSelectedListener(spnFpsOnItemSelectedListener);

Expand All @@ -105,6 +119,9 @@ protected void onCreate(Bundle savedInstanceState)
cbBRS.setChecked(settings.brs);
cbBRS.setOnCheckedChangeListener(cbBRSOnCheckListener);

cbMF.setChecked(settings.mf);
cbMF.setOnCheckedChangeListener(cbMFOnCheckListener);

//try {
//CameraEx cameraEx = CameraEx.open(0, null);
//final CameraEx.ParametersModifier modifier = cameraEx.createParametersModifier(cameraEx.getNormalCamera().getParameters());
Expand Down Expand Up @@ -169,7 +186,7 @@ else if(i < 93) {
intervalTextValue = Double.toString((i-76) * 0.5 + 2);
intervalUnit = "min";
}
else if(i < 120) {
else {
settings.interval = (i-93) * 60 + 660;
intervalTextValue = Integer.toString(i-93+11);
intervalUnit = "min";
Expand Down Expand Up @@ -225,6 +242,41 @@ else if(i <= 130)
updateTimes();
}

@Override
public void onStartTrackingTouch(SeekBar seekBar) {}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {}
},
sbDelayOnSeekBarChangeListener = new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean fromUser) {
String delayTextValue = "";
String delayUnit = "";

settings.rawDelay = i;

if(i < 6) {
settings.delay = i;
delayTextValue = Double.toString(settings.delay);
delayUnit = "min";

}
else if(i < 16) {
settings.delay = (i-5)*5 + 5;
delayTextValue = Double.toString(settings.delay);
delayUnit = "min";
}
else {
settings.delay = (i-15) * 60;
delayTextValue = Double.toString(i-15);
delayUnit = "h";
}
tvDelayValue.setText(delayTextValue);
tvDelayUnit.setText(delayUnit);

updateTimes();
}

@Override
public void onStartTrackingTouch(SeekBar seekBar) {}
@Override
Expand Down Expand Up @@ -266,6 +318,13 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
}
};

CheckBox.OnCheckedChangeListener cbMFOnCheckListener = new CheckBox.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
settings.mf = b;
}
};

void updateTimes() {
if(settings.shotCount == Integer.MAX_VALUE)
{
Expand Down Expand Up @@ -313,24 +372,28 @@ else if(videoTime < 120) {
protected boolean onUpperDialChanged(int value) {
sbInterval.dialChanged(value);
sbShots.dialChanged(value);
sbDelay.dialChanged(value);
return true;
}

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

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

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

Expand Down
Loading

0 comments on commit 0f13f9d

Please sign in to comment.