• R/O
  • HTTP
  • SSH
  • HTTPS

A01d: Commit

OPC(Olympus Air)用望遠鏡アプリ。


Commit MetaInfo

Révision5d9f40684634553e03323cb38782bea06183db20 (tree)
l'heure2018-06-16 20:53:39
AuteurMRSa <mrsa@myad...>
CommiterMRSa

Message de Log

SONYの制御部分のボタンを無効化する。

Change Summary

Modification

--- a/app/src/main/java/net/osdn/gokigen/a01d/camera/sony/wrapper/ISonyCameraApi.java
+++ b/app/src/main/java/net/osdn/gokigen/a01d/camera/sony/wrapper/ISonyCameraApi.java
@@ -19,6 +19,11 @@ public interface ISonyCameraApi
1919 JSONObject getTouchAFPosition();
2020 JSONObject cancelTouchAFPosition();
2121
22+ JSONObject setFocusMode(String focusMode);
23+ JSONObject getFocusMode();
24+ JSONObject getSupportedFocusMode();
25+ JSONObject getAvailableFocusMode();
26+
2227 JSONObject startLiveview();
2328 JSONObject stopLiveview();
2429
--- a/app/src/main/java/net/osdn/gokigen/a01d/camera/sony/wrapper/SonyCameraApi.java
+++ b/app/src/main/java/net/osdn/gokigen/a01d/camera/sony/wrapper/SonyCameraApi.java
@@ -207,6 +207,63 @@ class SonyCameraApi implements ISonyCameraApi
207207 }
208208
209209 @Override
210+ public JSONObject setFocusMode(String focusMode)
211+ {
212+ try
213+ {
214+ Log.v(TAG, "setFocusMode (" + focusMode + ")");
215+ return (communicateJSON("camera", "setFocusMode", new JSONArray().put(focusMode), "1.0", -1));
216+ }
217+ catch (Exception e)
218+ {
219+ e.printStackTrace();
220+ }
221+ return (new JSONObject());
222+ }
223+
224+ @Override
225+ public JSONObject getFocusMode()
226+ {
227+ try
228+ {
229+ return (communicateJSON("camera", "getFocusMode", new JSONArray(), "1.0", -1));
230+ }
231+ catch (Exception e)
232+ {
233+ e.printStackTrace();
234+ }
235+ return (new JSONObject());
236+ }
237+
238+ @Override
239+ public JSONObject getSupportedFocusMode()
240+ {
241+ try
242+ {
243+ return (communicateJSON("camera", "getSupportedFocusMode", new JSONArray(), "1.0", -1));
244+ }
245+ catch (Exception e)
246+ {
247+ e.printStackTrace();
248+ }
249+ return (new JSONObject());
250+ }
251+
252+ @Override
253+ public JSONObject getAvailableFocusMode()
254+ {
255+ try
256+ {
257+ return (communicateJSON("camera", "getAvailableFocusMode", new JSONArray(), "1.0", -1));
258+ }
259+ catch (Exception e)
260+ {
261+ e.printStackTrace();
262+ }
263+ return (new JSONObject());
264+ }
265+
266+ @Override
210267 public JSONObject startLiveview()
211268 {
212269 try {
--- a/app/src/main/java/net/osdn/gokigen/a01d/liveview/LiveViewFragment.java
+++ b/app/src/main/java/net/osdn/gokigen/a01d/liveview/LiveViewFragment.java
@@ -151,15 +151,19 @@ public class LiveViewFragment extends Fragment implements IStatusViewDrawer, IFo
151151 view.findViewById(R.id.shutter_button).setOnClickListener(onClickTouchListener);
152152 view.findViewById(R.id.btn_zoomin).setOnClickListener(onClickTouchListener);
153153 view.findViewById(R.id.btn_zoomout).setOnClickListener(onClickTouchListener);
154+
155+ manualFocus = view.findViewById(R.id.focusing_button);
156+ changeLiveViewScale = view.findViewById(R.id.live_view_scale_button);
157+
154158 if (interfaceProvider.useOlympusCamera())
155159 {
156160 view.findViewById(R.id.show_favorite_settings_button).setOnClickListener(onClickTouchListener);
157161 }
158162 else
159163 {
160- // お気に入りボタンは、SONYモードのときには表示しない
164+ // お気に入りボタン(とMFボタン)は、SONYモードのときには表示しない
161165 final View favoriteButton = view.findViewById(R.id.show_favorite_settings_button);
162- if (favoriteButton != null)
166+ if ((favoriteButton != null)&&(manualFocus != null))
163167 {
164168 runOnUiThread(new Runnable()
165169 {
@@ -167,19 +171,25 @@ public class LiveViewFragment extends Fragment implements IStatusViewDrawer, IFo
167171 public void run()
168172 {
169173 favoriteButton.setVisibility(View.INVISIBLE);
174+ if (manualFocus != null)
175+ {
176+ manualFocus.setVisibility(View.INVISIBLE);
177+ }
178+ if (changeLiveViewScale != null)
179+ {
180+ changeLiveViewScale.setVisibility(View.INVISIBLE);
181+ }
170182 }
171183 });
172184 }
173185 }
174186
175- manualFocus = view.findViewById(R.id.focusing_button);
176187 if (manualFocus != null)
177188 {
178189 manualFocus.setOnClickListener(onClickTouchListener);
179190 }
180191 changedFocusingMode();
181192
182- changeLiveViewScale = view.findViewById(R.id.live_view_scale_button);
183193 if (changeLiveViewScale != null)
184194 {
185195 changeLiveViewScale.setOnClickListener(onClickTouchListener);
Afficher sur ancien navigateur de dépôt.