mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Added negative elevation filtering when sent via BT/Network (#164)
This commit is contained in:
1 parent
c0debc038a
commit
c910e37d00
13 files changed
+49
-19
No files matched your search
@@ -34,7 +34,7 @@ jobs:
|
||||
alias: ${{ secrets.KEY_ALIAS }}
|
||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||
env:
|
||||
BUILD_TOOLS_VERSION: "34.0.0"
|
||||
BUILD_TOOLS_VERSION: "35.0.1"
|
||||
|
||||
- name: Sign Bundle
|
||||
uses: r0adkll/sign-android-release@v1
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
alias: ${{ secrets.KEY_ALIAS }}
|
||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||
env:
|
||||
BUILD_TOOLS_VERSION: "34.0.0"
|
||||
BUILD_TOOLS_VERSION: "35.0.1"
|
||||
|
||||
- name: Rename APK and Bundle
|
||||
run: |
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
serviceAccountJsonPlainText: ${{secrets.SERVICE_ACCOUNT_JSON}}
|
||||
packageName: com.rtbishop.look4sat
|
||||
releaseFiles: app/build/outputs/apk/release/look4sat.aab
|
||||
track: production
|
||||
track: beta
|
||||
whatsNewDirectory: fastlane/metadata/android/en-US/whatsnew
|
||||
|
||||
- name: Create release
|
||||
|
||||
+4
-4
@@ -8,13 +8,13 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace 'com.rtbishop.look4sat'
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
defaultConfig {
|
||||
applicationId "com.rtbishop.look4sat"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 320
|
||||
versionName '3.2.0'
|
||||
targetSdk 35
|
||||
versionCode 321
|
||||
versionName '3.2.1'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ class BTReporter(private val manager: BluetoothManager, private val reporterScop
|
||||
|
||||
fun isConnecting(): Boolean = connecting
|
||||
|
||||
@Suppress("BlockingMethodInNonBlockingContext")
|
||||
fun connectBTDevice(deviceId: String) {
|
||||
if (!connected) {
|
||||
rotationConnectionJob = reporterScope.launch {
|
||||
@@ -47,13 +46,13 @@ class BTReporter(private val manager: BluetoothManager, private val reporterScop
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("BlockingMethodInNonBlockingContext")
|
||||
fun reportRotation(format: String, azimuth: Int, elevation: Int) {
|
||||
if (connected) {
|
||||
rotationReportingJob = reporterScope.launch {
|
||||
val newElevation = if (elevation > 0) elevation else 0
|
||||
try {
|
||||
val azimuthString = intToStringWithLeadingZeroes(azimuth)
|
||||
val elevationString = intToStringWithLeadingZeroes(elevation)
|
||||
val elevationString = intToStringWithLeadingZeroes(newElevation)
|
||||
val crChar = '\r'
|
||||
val nlChar = '\n'
|
||||
val tbChar = '\t'
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="@string/btn_file"
|
||||
android:text="@string/btn_import"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/data_btn_web"
|
||||
app:layout_constraintEnd_toStartOf="@+id/data_btn_clear"
|
||||
app:layout_constraintStart_toEndOf="@+id/data_btn_web" />
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<string name="btn_manual">Ввести</string>
|
||||
<string name="btn_qth">QTH</string>
|
||||
<string name="btn_web">Онлайн</string>
|
||||
<string name="btn_file">Файл</string>
|
||||
<string name="btn_import">Импорт</string>
|
||||
<string name="btn_github">GitHub</string>
|
||||
<string name="btn_support">Поддержать</string>
|
||||
<string name="btn_fdroid">F-Droid</string>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<string name="btn_manual">අතින්</string>
|
||||
<string name="btn_qth">QTH</string>
|
||||
<string name="btn_web">මාර්ගගතව</string>
|
||||
<string name="btn_file">File</string>
|
||||
<string name="btn_import">Import</string>
|
||||
<string name="btn_github">GitHub</string>
|
||||
<string name="btn_support">දායකත්ව</string>
|
||||
<string name="btn_fdroid">F-Droid</string>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<string name="btn_manual">Ввести вручну</string>
|
||||
<string name="btn_qth">QTH</string>
|
||||
<string name="btn_web">Онлайн</string>
|
||||
<string name="btn_file">Файл</string>
|
||||
<string name="btn_import">Импорт</string>
|
||||
<string name="btn_github">GitHub</string>
|
||||
<string name="btn_support">Підтримка</string>
|
||||
<string name="btn_fdroid">F-Droid</string>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.Look4Sat.SplashScreen" parent="Theme.SplashScreen">
|
||||
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
|
||||
<item name="postSplashScreenTheme">@style/Theme.Look4Sat.Main</item>
|
||||
<item name="windowSplashScreenBackground">@color/background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_splash</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Look4Sat.Main" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="colorControlNormal">@color/textMain</item>
|
||||
<item name="colorPrimary">@color/accent</item>
|
||||
<item name="colorSecondary">@color/accent</item>
|
||||
<item name="colorOnPrimaryContainer">@color/background</item>
|
||||
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
|
||||
<item name="android:listDivider">@drawable/item_divider</item>
|
||||
<item name="android:navigationBarColor">@color/background</item>
|
||||
<item name="android:textColorPrimary">@color/textMain</item>
|
||||
<item name="android:statusBarColor">@color/background</item>
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -28,7 +28,7 @@
|
||||
<string name="btn_manual">手动输入</string>
|
||||
<string name="btn_qth">QTH 网格</string>
|
||||
<string name="btn_web">在线更新</string>
|
||||
<string name="btn_file">本地文件</string>
|
||||
<string name="btn_import">進口</string>
|
||||
<string name="btn_github">GitHub</string>
|
||||
<string name="btn_support">支持</string>
|
||||
<string name="btn_fdroid">F-Droid</string>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<string name="btn_manual">Manual</string>
|
||||
<string name="btn_qth">QTH</string>
|
||||
<string name="btn_web">Online</string>
|
||||
<string name="btn_file">File</string>
|
||||
<string name="btn_import">Import</string>
|
||||
<string name="btn_github">GitHub</string>
|
||||
<string name="btn_support">Support</string>
|
||||
<string name="btn_fdroid">F-Droid</string>
|
||||
|
||||
@@ -52,11 +52,12 @@ class DataReporter(private val reporterScope: CoroutineScope) {
|
||||
|
||||
fun reportRotation(server: String, port: Int, azimuth: Double, elevation: Double) {
|
||||
rotationReporting = reporterScope.launch {
|
||||
val newElevation = if (elevation > 0.0) elevation else 0.0
|
||||
runCatching {
|
||||
if (rotationSocketChannel == null) {
|
||||
rotationSocketChannel = SocketChannel.open(InetSocketAddress(server, port))
|
||||
} else {
|
||||
val buffer = ByteBuffer.wrap("\\P $azimuth $elevation\n".toByteArray())
|
||||
val buffer = ByteBuffer.wrap("\\P $azimuth $newElevation\n".toByteArray())
|
||||
rotationSocketChannel?.write(buffer)
|
||||
}
|
||||
}.onFailure { error ->
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Added Ukrainian translation by KristobalJunta #165
|
||||
Added per-app language switching feature by KristobalJunta #166
|
||||
Added negative elevation filtering when sent via BT/Network #164
|
||||
@@ -1,2 +1,3 @@
|
||||
Added calendar reminder support by zhou2008
|
||||
Added Sinhala translation by Dilshan Hapuarachchi
|
||||
Added Ukrainian translation by KristobalJunta #165
|
||||
Added per-app language switching feature by KristobalJunta #166
|
||||
Added negative elevation filtering when sent via BT/Network #164
|
||||
Reference in new issue
Block a user