android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
+ android:usesCleartextTraffic="true"
android:supportsRtl="true"
android:theme="@style/Theme.ThetaView">
<activity android:name=".MainActivity">
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
+ <meta-data android:name="android.max_aspect" android:value="ratio_float"/>
</application>
</manifest>
\ No newline at end of file
{
private val TAG = BluetoothDeviceFinder::class.java.simpleName
}
+
private lateinit var targetDeviceName: String
private var foundBleDevice = false
- private var scanner : BluetoothLeScanner? = null
+ private var scanner: BluetoothLeScanner? = null
override fun reset()
{
scanner?.flushPendingScanResults(this)
scanner?.stopScan(this)
}
- catch (e : Exception)
+ catch (e: Exception)
{
e.printStackTrace()
}
val device = result?.device
Log.v(TAG, " onScanResult($callbackType, ${device?.name}) ")
val findDevice = (device?.name)?.contains(targetDeviceName)
- if ((findDevice != null)&&(findDevice))
+ if ((findDevice != null) && (findDevice))
{
Log.v(TAG, " FIND DEVICE : $targetDeviceName")
scanResult.foundBluetoothDevice(device)
setMessage(IIndicator.Area.AREA_9, Color.WHITE, "")
setMessage(IIndicator.Area.AREA_10, Color.WHITE, "")
setMessage(IIndicator.Area.AREA_11, Color.WHITE, "")
+
+ setMessage(IIndicator.Area.AREA_A, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_B, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_C, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_D, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_E, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_F, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_G, Color.WHITE, "")
+ setMessage(IIndicator.Area.AREA_H, Color.WHITE, "")
}
catch (e : Exception)
{
import android.content.Context
import android.graphics.PixelFormat
import android.opengl.GLSurfaceView
+import android.os.Looper
import android.util.AttributeSet
import android.util.Log
import jp.osdn.gokigen.thetaview.liveview.glrenderer.EquirectangularDrawer
override fun refresh()
{
- invalidate()
+ if (Looper.getMainLooper().thread === Thread.currentThread())
+ {
+ invalidate()
+ }
+ else
+ {
+ postInvalidate()
+ }
}
override fun setImageProvider(provider: IImageProvider)
attention > 30 -> { Color.LTGRAY }
else -> { Color.DKGRAY }
}
- indicator.setMessage(IIndicator.Area.AREA_G, colorAttention, "ATTENTION : $attention")
+ indicator.setMessage(IIndicator.Area.AREA_A, colorAttention, "ATTENTION : $attention")
val colorMediation = when {
mediation > 90 -> { Color.GREEN }
mediation > 30 -> { Color.LTGRAY }
else -> { Color.DKGRAY }
}
- indicator.setMessage(IIndicator.Area.AREA_G, colorMediation, "MEDIATION : $mediation")
+ indicator.setMessage(IIndicator.Area.AREA_B, colorMediation, "MEDIATION : $mediation")
indicator.invalidate()
}
}