package jp.osdn.gokigen.gokigenassets.camera.theta.status
-import jp.osdn.gokigen.gokigenassets.camera.theta.operation.ThetaOptionGetControl
+import android.util.Log
import jp.osdn.gokigen.gokigenassets.camera.theta.operation.ThetaOptionSetControl
class ThetaCameraStatusListHolder(private val sessionIdProvider: IThetaSessionIdProvider, executeUrl : String = "http://192.168.1.1")
{
- private val optionGet = ThetaOptionGetControl(sessionIdProvider, executeUrl)
+ //private val optionGet = ThetaOptionGetControl(sessionIdProvider, executeUrl)
private val optionSet = ThetaOptionSetControl(sessionIdProvider, executeUrl)
+ companion object
+ {
+ private val TAG = ThetaCameraStatusListHolder::class.java.simpleName
+ }
+
fun getAvailableTakeModeList(): List<String?>
{
return (listOf("Manual", "Normal", "Aperture", "Shutter", "ISO"))
fun getAvailableApertureList(): List<String?>
{
- return (ArrayList())
+ return (listOf("2.0", "0", "2.1", "3.5", "5.6"))
}
fun getAvailableExpRevList(): List<String?>
{
- return (ArrayList())
+ return (listOf("-2.0", "-1.7", "-1.3", "-1.0", "-0.7", "-0.3", "0.0", "0.3", "0.7", "1.0", "1.3", "1.7", "2.0"))
}
fun getAvailableCaptureModeStringList(): List<String?>
fun getAvailablePictureEffectList(): List<String?>
{
- return (ArrayList())
+ return (listOf("off", "DR Comp", "Noise Reduction", "hdr", "Hh hdr"))
}
fun setTakeMode(value: String)
}
}
-
fun setAperture(value: String)
{
try
{
-
+ val useOSCv2 = sessionIdProvider.sessionId.isEmpty()
+ optionSet.setOptions(" \"aperture\": $value", useOSCv2)
}
catch (e: Exception)
{
}
}
-
-
fun setExpRev(value: String)
{
try
{
-
+ val useOSCv2 = sessionIdProvider.sessionId.isEmpty()
+ optionSet.setOptions(" \"exposureCompensation\": $value", useOSCv2)
}
catch (e: Exception)
{
}
}
-
fun setCaptureMode(value: String)
{
try
{
try
{
-
+ Log.v(TAG, " setMeteringMode($value)")
}
catch (e: Exception)
{
{
try
{
-
+ val useOSCv2 = sessionIdProvider.sessionId.isEmpty()
+ optionSet.setOptions(" \"_filter\": \"$value\"", useOSCv2)
}
catch (e: Exception)
{
e.printStackTrace()
}
}
-
-}
\ No newline at end of file
+}
whileFetching = false
}
- companion object
- {
- private val TAG = ThetaCameraStatusWatcher::class.java.simpleName
- private const val timeoutMs = 3300
- private const val loopWaitMs : Long = 400
-
- private const val THETA_BATTERY_LEVEL = "batteryLevel"
- private const val THETA_CAPTURE_STATUS = "_captureStatus"
-
- private const val THETA_APERTURE = "aperture"
- private const val THETA_CAPTURE_MODE = "captureMode"
- private const val THETA_EXPOSURE_COMPENSATION = "exposureCompensation"
- private const val THETA_EXPOSURE_PROGRAM = "exposureProgram"
- private const val THETA_ISO_SENSITIVITY = "iso"
- private const val THETA_SHUTTER_SPEED = "shutterSpeed"
- private const val THETA_WHITE_BALANCE = "whiteBalance"
- private const val THETA_FILTER = "_filter"
- }
override var captureMode: String
get() = currentCaptureMode
}
return (color)
}
+
+ companion object
+ {
+ private val TAG = ThetaCameraStatusWatcher::class.java.simpleName
+ private const val timeoutMs = 3300
+ private const val loopWaitMs : Long = 400
+
+ private const val THETA_BATTERY_LEVEL = "batteryLevel"
+ private const val THETA_CAPTURE_STATUS = "_captureStatus"
+
+ private const val THETA_APERTURE = "aperture"
+ private const val THETA_CAPTURE_MODE = "captureMode"
+ private const val THETA_EXPOSURE_COMPENSATION = "exposureCompensation"
+ private const val THETA_EXPOSURE_PROGRAM = "exposureProgram"
+ private const val THETA_ISO_SENSITIVITY = "iso"
+ private const val THETA_SHUTTER_SPEED = "shutterSpeed"
+ private const val THETA_WHITE_BALANCE = "whiteBalance"
+ private const val THETA_FILTER = "_filter"
+ }
}