kopia lustrzana https://github.com/sh123/codec2_talkie
Smart beaconing options
rodzic
e98ebdc9cd
commit
f4e15baffa
|
@ -7,6 +7,7 @@
|
|||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
|
||||
<uses-feature android:name="android.hardware.bluetooth_le"
|
||||
android:required="true" />
|
||||
|
@ -18,6 +19,7 @@
|
|||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Codec2Talkie">
|
||||
<!--service android:name=".app.AppWorker"/-->
|
||||
<activity
|
||||
android:name=".connect.UsbConnectActivity"
|
||||
android:configChanges="orientation|screenSize" />
|
||||
|
|
|
@ -21,7 +21,6 @@ import android.graphics.PorterDuff;
|
|||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Typeface;
|
||||
import android.hardware.usb.UsbManager;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.radio.codec2talkie.app;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.location.Location;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioRecord;
|
||||
|
|
|
@ -68,4 +68,12 @@ public final class PreferenceKeys {
|
|||
public static String APRS_PRIVACY_POSITION_AMBIGUITY = "aprs_privacy_position_ambiguity";
|
||||
public static String APRS_PRIVACY_SPEED_ENABLED = "aprs_privacy_speed_enable";
|
||||
public static String APRS_PRIVACY_ALTITUDE_ENABLED = "aprs_privacy_altitude_enable";
|
||||
|
||||
public static String APRS_LOCATION_SOURCE_SMART_FAST_SPEED = "aprs_location_source_smart_fast_speed";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_FAST_RATE = "aprs_location_source_smart_fast_rate";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_SLOW_SPEED = "aprs_location_source_smart_slow_speed";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_SLOW_RATE = "aprs_location_source_smart_slow_rate";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_MIN_TURN_TIME = "aprs_location_source_smart_min_turn_time";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_MIN_TURN_ANGLE = "aprs_location_source_smart_min_turn_angle";
|
||||
public static String APRS_LOCATION_SOURCE_SMART_TURN_SLOPE = "aprs_location_source_smart_turn_slope";
|
||||
}
|
|
@ -17,8 +17,6 @@ import androidx.preference.PreferenceManager;
|
|||
import com.radio.codec2talkie.protocol.position.Position;
|
||||
import com.radio.codec2talkie.settings.PreferenceKeys;
|
||||
|
||||
import java.util.Timer;
|
||||
|
||||
public class Periodic implements Tracker {
|
||||
private static final String TAG = Periodic.class.getSimpleName();
|
||||
|
||||
|
@ -48,9 +46,10 @@ public class Periodic implements Tracker {
|
|||
Log.e(TAG, "No permissions for location access");
|
||||
return;
|
||||
}
|
||||
|
||||
_locationManager.requestSingleUpdate(
|
||||
LocationManager.GPS_PROVIDER,
|
||||
(LocationListener) this::sendLocation,
|
||||
this::sendLocation,
|
||||
Looper.myLooper());
|
||||
}
|
||||
|
||||
|
|
|
@ -90,11 +90,13 @@
|
|||
</string-array>
|
||||
|
||||
<string-array name="aprs_location_source">
|
||||
<item>Smartbeaconing™ position</item>
|
||||
<item>Periodic GPS position</item>
|
||||
<item>Manual position</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="aprs_location_source_values">
|
||||
<item>smart</item>
|
||||
<item>periodic</item>
|
||||
<item>manual</item>
|
||||
</string-array>
|
||||
|
|
|
@ -101,6 +101,16 @@
|
|||
<string name="player_status_played_file">Played file: %1$s</string>
|
||||
<string name="recorder_menu_stop">Stop</string>
|
||||
<string name="recorder_remove_file_confirmation_message">Remove recording %1$s?</string>
|
||||
<string name="bt_connect_failed">Bluetooth connect failed</string>
|
||||
<string name="bt_socket_failed">Bluetooth socket failed</string>
|
||||
<string name="bt_adapter_not_found">Bluetooth adapter is not found</string>
|
||||
<string name="bt_connected">Connected</string>
|
||||
<string name="bt_connecting_to">Connecting to %1$s</string>
|
||||
<string name="bt_turned_on">Bluetooth turned on</string>
|
||||
<string name="menu_reconnect">Reconnect to TNC</string>
|
||||
<string name="bt_connecting">Connecting bluetooth…</string>
|
||||
<string name="usb_connecting">Connecting USB…</string>
|
||||
|
||||
<string name="ports_tcp_ip_enable_title">Enable TCP/IP</string>
|
||||
<string name="ports_tcp_ip_enable_summary">Data will be sent and received through TCP/IP as a client</string>
|
||||
<string name="port_tcp_ip_prefs_title">TCP/IP parameters</string>
|
||||
|
@ -111,24 +121,19 @@
|
|||
<string name="tcp_ip_basic_port_summary">Set server port number</string>
|
||||
<string name="tcp_ip_connection_failed">TCP/IP connection failed %1$s:%2$s</string>
|
||||
<string name="tcp_ip_connected">TCP/IP connected %1$s:%2$s</string>
|
||||
<string name="bt_connect_failed">Bluetooth connect failed</string>
|
||||
<string name="bt_socket_failed">Bluetooth socket failed</string>
|
||||
<string name="bt_adapter_not_found">Bluetooth adapter is not found</string>
|
||||
<string name="bt_connected">Connected</string>
|
||||
<string name="bt_connecting_to">Connecting to %1$s</string>
|
||||
<string name="bt_turned_on">Bluetooth turned on</string>
|
||||
<string name="menu_reconnect">Reconnect to TNC</string>
|
||||
<string name="tcp_ip_connecting">Connecting to remote KISS server…</string>
|
||||
<string name="bt_connecting">Connecting bluetooth…</string>
|
||||
<string name="usb_connecting">Connecting USB…</string>
|
||||
<string name="tcp_ip_basic_retry_count_title">Connect retry count</string>
|
||||
<string name="tcp_ip_basic_retry_count_summary">Try to connect number of times when connecting for the first time or when connection is lost</string>
|
||||
<string name="tcp_ip_basic_retry_delay_title">Connect retry delay</string>
|
||||
<string name="tcp_ip_basic_retry_delay_summary">How many milliseconds to wait before trying to connect again</string>
|
||||
<string name="kiss_enable_scrambler_title">(Experimental) Enable speech scrambling</string>
|
||||
<string name="kiss_enable_scrambler_summary">Enable speech scrambling, you MUST understand what you are doing, might be illegal in your country</string>
|
||||
|
||||
<string name="kiss_enable_scrambler_title">(Experimental) Enable KISS packet scrambling</string>
|
||||
<string name="kiss_enable_scrambler_summary">Enable experimental scrambling (NB! Only QRPP and only ISM bands where allowed by the band plan! Not allowed for Amateur Radio usage!)</string>
|
||||
<string name="kiss_scrambler_key_title">(Experimental) Set key for speech scrambling</string>
|
||||
<string name="kiss_scrambler_key_summary">Set key for speech scrambling, should be the same on all devices</string>
|
||||
<string name="kiss_scrambler_key_summary">Set key for scrambling, should be the same on all devices</string>
|
||||
<string name="kiss_scrambler_iterations_title">(Experimental) Number of iterations performed</string>
|
||||
<string name="kiss_scrambler_iterations_summary">Change to lower value on slow devices, >=1000 recommended, should match on all devices</string>
|
||||
|
||||
<string name="permissions_granted">Permissions granted</string>
|
||||
<string name="permissions_denied">Permissions denied</string>
|
||||
<string name="usb_detached">USB detached</string>
|
||||
|
@ -141,8 +146,6 @@
|
|||
<string name="kiss_extension_reboot_title">Reboot modem</string>
|
||||
<string name="kiss_extension_reboot_summary">Click to send reboot command to the modem</string>
|
||||
<string name="kiss_toast_modem_reboot">Modem reboot requested</string>
|
||||
<string name="kiss_scrambler_iterations_title">(Experimental) Number of iterations performed</string>
|
||||
<string name="kiss_scrambler_iterations_summary">(Experimental) Change to lower value on slow devices, >1000 recommended, should match on all devices</string>
|
||||
|
||||
<string name="codec2_tx_frame_max_size_title">Maximum super frame size (bytes)</string>
|
||||
<string name="codec2_tx_frame_max_size_summary">Multiple Codec2 samples are aggregated into super frame not larger than this value</string>
|
||||
|
@ -227,5 +230,20 @@
|
|||
<string name="voax25_label">☎</string>
|
||||
<string name="menu_aprs_log">View log</string>
|
||||
<string name="aprs_location_emic_digipath_title">Mic-E digipath</string>
|
||||
<string name="aprs_location_source_smart_title">Smartbeaconing™ position</string>
|
||||
<string name="aprs_location_source_smart_fast_speed_summary">Minimum speed for fast position updates</string>
|
||||
<string name="aprs_location_source_smart_fast_speed_title">Fast speed [km/h]</string>
|
||||
<string name="aprs_location_source_smart_fast_rate_title">Fast rate [s]</string>
|
||||
<string name="aprs_location_source_smart_fast_rate_summary">Beacon rate ast fast speed</string>
|
||||
<string name="aprs_location_source_smart_slow_speed_title">Slow speed [km/h]</string>
|
||||
<string name="aprs_location_source_smart_slow_speed_summary">Maximum speed for slow position updates</string>
|
||||
<string name="aprs_location_source_smart_slow_rate_title">Slow rate [s]</string>
|
||||
<string name="aprs_location_source_smart_slow_rate_summary">Beacon rate at slow speed</string>
|
||||
<string name="aprs_location_source_smart_min_turn_time_title">Min turn time [s]</string>
|
||||
<string name="aprs_location_source_smart_min_turn_time_summary">Minimum beacon rate when changing direction</string>
|
||||
<string name="aprs_location_source_smart_min_turn_angle_title">Min turn angle [°]</string>
|
||||
<string name="aprs_location_source_smart_min_turn_angle_summary">Minimum angle at high speed</string>
|
||||
<string name="aprs_location_source_smart_turn_slope_title">Turn slope</string>
|
||||
<string name="aprs_location_source_smart_min_turn_slope_summary">Influence of speed on the minimum angle</string>
|
||||
|
||||
</resources>
|
|
@ -92,4 +92,58 @@
|
|||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
app:key="aprs_location_source_smart"
|
||||
app:title="@string/aprs_location_source_smart_title">
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_fast_speed"
|
||||
app:title="@string/aprs_location_source_smart_fast_speed_title"
|
||||
app:summary="@string/aprs_location_source_smart_fast_speed_summary"
|
||||
app:defaultValue="90">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_fast_rate"
|
||||
app:title="@string/aprs_location_source_smart_fast_rate_title"
|
||||
app:summary="@string/aprs_location_source_smart_fast_rate_summary"
|
||||
app:defaultValue="60">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_slow_speed"
|
||||
app:title="@string/aprs_location_source_smart_slow_speed_title"
|
||||
app:summary="@string/aprs_location_source_smart_slow_speed_summary"
|
||||
app:defaultValue="5">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_slow_rate"
|
||||
app:title="@string/aprs_location_source_smart_slow_rate_title"
|
||||
app:summary="@string/aprs_location_source_smart_slow_rate_summary"
|
||||
app:defaultValue="1200">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_min_turn_time"
|
||||
app:title="@string/aprs_location_source_smart_min_turn_time_title"
|
||||
app:summary="@string/aprs_location_source_smart_min_turn_time_summary"
|
||||
app:defaultValue="15">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_min_turn_angle"
|
||||
app:title="@string/aprs_location_source_smart_min_turn_angle_title"
|
||||
app:summary="@string/aprs_location_source_smart_min_turn_angle_summary"
|
||||
app:defaultValue="10">
|
||||
</EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
app:key="aprs_location_source_smart_turn_slope"
|
||||
app:title="@string/aprs_location_source_smart_turn_slope_title"
|
||||
app:summary="@string/aprs_location_source_smart_min_turn_slope_summary"
|
||||
app:defaultValue="240">
|
||||
</EditTextPreference>
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
Ładowanie…
Reference in New Issue