code nl-0 ol-0">
@@ -1698,7 +1696,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1698 1696
 	public boolean setDriveMode (Session session, int drivemodeValue){
1699 1697
 		Log.d(TAG, "Set setDriveMode");
1700 1698
 		boolean result = session.isActive();
1701
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1699
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1702 1700
 		if (!bi.isSessionActive())
1703 1701
 			try {
1704 1702
 				bi.openSession();
@@ -1725,7 +1723,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1725 1723
 	public boolean setMetering (Session session, int meteringValue){
1726 1724
 		Log.d(TAG, "Set setMetering");
1727 1725
 		boolean result = session.isActive();
1728
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1726
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1729 1727
 		if (!bi.isSessionActive())
1730 1728
 			try {
1731 1729
 				bi.openSession();
@@ -1752,7 +1750,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1752 1750
 	public boolean startBulb (Session session){
1753 1751
 		Log.d(TAG, "Starting releaseShutter");
1754 1752
 		boolean result = session.isActive();
1755
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1753
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1756 1754
 		if (!bi.isSessionActive())
1757 1755
 			try {
1758 1756
 				bi.openSession();
@@ -1783,7 +1781,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1783 1781
 	public boolean stopBulb (Session session){
1784 1782
 		Log.d(TAG, "Starting stopBulb");
1785 1783
 		boolean result = session.isActive();
1786
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1784
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1787 1785
 		if (!bi.isSessionActive())
1788 1786
 			try {
1789 1787
 				bi.openSession();
@@ -1813,7 +1811,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1813 1811
 	public boolean getShutterSpeed (Session session){
1814 1812
 		Log.d(TAG, "getShutterSpeed");
1815 1813
 		boolean result = session.isActive();
1816
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1814
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1817 1815
 		if (!bi.isSessionActive())
1818 1816
 			try {
1819 1817
 				bi.openSession();
@@ -1841,7 +1839,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1841 1839
 	public boolean setShutterSpeed (Session session, int speed){
1842 1840
 		Log.d(TAG, "Starting stopBulb");
1843 1841
 		boolean result = session.isActive();
1844
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1842
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1845 1843
 		if (!bi.isSessionActive())
1846 1844
 			try {
1847 1845
 				bi.openSession();
@@ -1868,7 +1866,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1868 1866
 	public boolean initLiveview (Session session){
1869 1867
 		Log.d(TAG, "Set setMetering");
1870 1868
 		boolean result = session.isActive();
1871
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1869
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1872 1870
 		if (!bi.isSessionActive())
1873 1871
 			try {
1874 1872
 				bi.openSession();
@@ -1895,7 +1893,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1895 1893
 	public boolean startLiveview (Session session){
1896 1894
 		Log.d(TAG, "Set setMetering");
1897 1895
 		boolean result = session.isActive();
1898
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1896
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1899 1897
 		if (!bi.isSessionActive())
1900 1898
 			try {
1901 1899
 				bi.openSession();
@@ -1918,7 +1916,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1918 1916
 
1919 1917
 		Log.d(TAG, "Starting releaseShutter");
1920 1918
 		boolean result = session.isActive();
1921
-		if (bi.device == null) {log("NO DEVICE OPENED"); return result;}
1919
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return result;}
1922 1920
 		if (!bi.isSessionActive())
1923 1921
 			try {
1924 1922
 				bi.openSession();
@@ -2042,58 +2040,58 @@ public class USBCameraTest extends Activity { //implements Runnable {
2042 2040
 		public void run() {
2043 2041
 //			Log.d(TAG, "running thread " +thread.getName());
2044 2042
 			if (thread.getName().equals(THREAD_SHUTTER)) { 
2045
-				releaseShutter (bi.session);
2043
+				releaseShutter (bi.getSession());
2046 2044
 			}; 		
2047 2045
 			if (thread.getName().equals(THREAD_TEST)) { 
2048
-				testFunction(bi.session);
2046
+				testFunction(bi.getSession());
2049 2047
 			};
2050 2048
 			if (thread.getName().equals(THREAD_STARTBULB)) { 
2051
-				startBulb(bi.session);
2049
+				startBulb(bi.getSession());
2052 2050
 			};
2053 2051
 			if (thread.getName().equals(THREAD_STOPBULB)) { 
2054
-				stopBulb(bi.session);
2052
+				stopBulb(bi.getSession());
2055 2053
 			};
2056 2054
 			if (thread.getName().equals(THREAD_SETSHUTTER)) { 
2057
-				setShutter(bi.session, shutter_value);
2055
+				setShutter(bi.getSession(), shutter_value);
2058 2056
 			};		
2059 2057
 			if (thread.getName().equals(THREAD_SETISO)) { 
2060
-				setISO(bi.session, iso_value);
2058
+				setISO(bi.getSession(), iso_value);
2061 2059
 			};
2062 2060
 			if (thread.getName().equals(THREAD_SETAPERTURE)) { 
2063
-				setAperture(bi.session, aperture_value);
2061
+				setAperture(bi.getSession(), aperture_value);
2064 2062
 			};
2065 2063
 			if (thread.getName().equals(THREAD_FOCUSFORWARD)) { 
2066
-				moveFocusForward(bi.session);
2064
+				moveFocusForward(bi.getSession());
2067 2065
 			};
2068 2066
 			if (thread.getName().equals(THREAD_FOCUSBACKWARD)) { 
2069
-				moveFocusBackward(bi.session);
2067
+				moveFocusBackward(bi.getSession());
2070 2068
 			};
2071 2069
 			if (thread.getName().equals(THREAD_SETPICTURESTYLE)) { 
2072
-				setPictureSyle(bi.session, picturestyle_value);
2070
+				setPictureSyle(bi.getSession(), picturestyle_value);
2073 2071
 			};
2074 2072
 			if (thread.getName().equals(THREAD_SETWHITEBALANCE)) { 
2075
-				setWhiteBalance(bi.session,whitebalance_value);
2073
+				setWhiteBalance(bi.getSession(),whitebalance_value);
2076 2074
 			};
2077 2075
 			if (thread.getName().equals(THREAD_SETEXPOSURE)) { 
2078
-				setExposure(bi.session, exposure_value);
2076
+				setExposure(bi.getSession(), exposure_value);
2079 2077
 			};
2080 2078
 			if (thread.getName().equals(THREAD_SETDRIVEMODE)) { 
2081
-				setDriveMode(bi.session, drivemode_value);
2079
+				setDriveMode(bi.getSession(), drivemode_value);
2082 2080
 			};		
2083 2081
 			
2084 2082
 			if (thread.getName().equals(THREAD_SETMETERING)) { 
2085
-				setMetering(bi.session, metering_value);
2083
+				setMetering(bi.getSession(), metering_value);
2086 2084
 			};
2087 2085
 			
2088 2086
 			if (thread.getName().equals(THREAD_INITLIVEVIEW)) { 
2089
-				initLiveview(bi.session);
2087
+				initLiveview(bi.getSession());
2090 2088
 				liveViewTurnedOn = true;
2091 2089
 			};
2092 2090
 			
2093 2091
 			if (thread.getName().equals(THREAD_STARTLIVEVIEW)) { 
2094 2092
 				while(liveViewTurnedOn)
2095 2093
 				{
2096
-					startLiveview(bi.session);
2094
+					startLiveview(bi.getSession());
2097 2095
 				}
2098 2096
 			};
2099 2097
 			

kodo - Gogs: Go Git Service

Nessuna descrizione

Brightcells: f724e0f9c0 Add tour guide apis 10 anni fa
..
__init__.py f724e0f9c0 Add tour guide apis 10 anni fa