case SEQ_CHANGE_REMOTE:
interfaceProvider.getInformationReceiver().updateMessage(context.getString(R.string.canon_connect_connecting4), false, false, 0);
- commandIssuer.enqueueCommand(new PtpIpCommandGeneric(this, SEQ_SET_EVENT_MODE, isDumpLog, 0, 0x902f, 4, 0x02));
+ commandIssuer.enqueueCommand(new PtpIpCommandGeneric(this, SEQ_SET_EVENT_MODE, isDumpLog, 0, 0x9115, 4, 0x02));
break;
case SEQ_SET_EVENT_MODE:
interfaceProvider.getInformationReceiver().updateMessage(context.getString(R.string.canon_connect_connecting5), false, false, 0);
+ commandIssuer.enqueueCommand(new PtpIpCommandGeneric(this, SEQ_GET_EVENT, isDumpLog, 0, 0x902f, 4, 0x02));
+ break;
+
+ case SEQ_GET_EVENT:
interfaceProvider.getInformationReceiver().updateMessage(context.getString(R.string.connect_connect_finished), false, false, 0);
connectFinished();
Log.v(TAG, "CHANGED PLAYBACK MODE : DONE.");
eventConnectionNumber = eventConnectionNumber + ((receiveData[10] & 0xff) << 16);
eventConnectionNumber = eventConnectionNumber + ((receiveData[11] & 0xff) << 24);
statusChecker.setEventConnectionNumber(eventConnectionNumber);
- interfaceProvider.getCameraStatusWatcher().startStatusWatch(null);
+ interfaceProvider.getCameraStatusWatcher().startStatusWatch(interfaceProvider.getStatusListener());
commandIssuer.enqueueCommand(new PtpIpCommandGeneric(this, SEQ_OPEN_SESSION, isDumpLog, 0, 0x1002, 4, 0x41));
}
package net.osdn.gokigen.a01d.camera.canon.wrapper.liveview;
import android.app.Activity;
+import android.util.Log;
import androidx.annotation.NonNull;
public class CanonLiveViewControl implements ILiveViewControl, ILiveViewListener, IPtpIpCommunication
{
+ private final String TAG = this.toString();
+
private final Activity context;
private final String ipAddr;
private final int portNo;
@Override
public void startLiveView()
{
+ Log.v(TAG, " startLiveView() ");
}
@Override
public void stopLiveView()
{
+ Log.v(TAG, " stopLiveView() ");
}
@Override
public boolean connect()
{
- return false;
+ Log.v(TAG, " connect() ");
+ return (true);
}
@Override
public void disconnect()
{
-
+ Log.v(TAG, " disconnect() ");
}
}
{
@Override
- public void startStatusWatch(@NonNull ICameraStatusUpdateNotify notifier) {
+ public void startStatusWatch(@NonNull ICameraStatusUpdateNotify notifier)
+ {
}
@Override
- public void stopStatusWatch() {
+ public void stopStatusWatch()
+ {
}
}
eventConnectionNumber = eventConnectionNumber + ((receiveData[10] & 0xff) << 16);
eventConnectionNumber = eventConnectionNumber + ((receiveData[11] & 0xff) << 24);
statusChecker.setEventConnectionNumber(eventConnectionNumber);
- interfaceProvider.getCameraStatusWatcher().startStatusWatch(null);
+ interfaceProvider.getCameraStatusWatcher().startStatusWatch(interfaceProvider.getStatusListener());
commandIssuer.enqueueCommand(new PtpIpCommandGeneric(this, SEQ_OPEN_SESSION, 50, isDumpLog, 0, 0x1002, 4, 0x41, 0, 0, 0));
}
package net.osdn.gokigen.a01d.camera.nikon.wrapper.liveview;
import android.app.Activity;
+import android.util.Log;
import androidx.annotation.NonNull;
public class NikonLiveViewControl implements ILiveViewControl, ILiveViewListener, IPtpIpCommunication
{
+ private final String TAG = this.toString();
+
private final Activity context;
private final String ipAddr;
private final int portNo;
@Override
public void startLiveView()
{
+ Log.v(TAG, " startLiveView() ");
}
@Override
public void stopLiveView()
{
+ Log.v(TAG, " stopLiveView() ");
}
@Override
public boolean connect()
{
- return false;
+ Log.v(TAG, " connect() ");
+ return (true);
}
@Override
public void disconnect()
{
-
+ Log.v(TAG, " disconnect() ");
}
}
private IPtpIpCommandPublisher commandPublisher = null;
private PtpIpCameraCommandResponse responseReceiver = null;
private SparseArrayCompat<String> commandNameIndexArray;
- private boolean isDumpLog = false;
+ private boolean isDumpLog = true;
private int selectedCommandIdPosition = 0;
private int selectedBodyLengthPosition = 0;
int SEQ_INIT_SESSION = 4;
int SEQ_CHANGE_REMOTE = 5;
int SEQ_SET_EVENT_MODE = 6;
+ int SEQ_GET_EVENT = 7;
int SEQ_STATUS_REQUEST = 9;
@Override
public void run()
{
- activity.findViewById(R.id.btn_zoomin).setVisibility(View.INVISIBLE);
- activity.findViewById(R.id.btn_zoomout).setVisibility(View.INVISIBLE);
+ try
+ {
+ View zoomin = activity.findViewById(R.id.btn_zoomin);
+ if (zoomin != null)
+ {
+ zoomin.setVisibility(View.INVISIBLE);
+ }
+ View zoomout = activity.findViewById(R.id.btn_zoomout);
+ if (zoomout != null)
+ {
+ zoomout.setVisibility(View.INVISIBLE);
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
}
});
}