kopia lustrzana https://github.com/sh123/codec2_talkie
Aprsis tx
rodzic
3e476a72a5
commit
f08aab08b6
|
@ -108,12 +108,12 @@ public class AprsIs implements Protocol, Runnable {
|
|||
line = TextTools.getString(_rxQueue);
|
||||
}
|
||||
if (line.length() > 0) {
|
||||
if (_isTxGateEnabled) {
|
||||
// TODO, forward APRS-IS data to radio
|
||||
}
|
||||
AprsIsData aprsIsData = AprsIsData.fromString(line);
|
||||
if (aprsIsData != null) {
|
||||
_parentProtocolCallback.onReceiveData(aprsIsData.src, aprsIsData.dst, aprsIsData.path, aprsIsData.data.getBytes());
|
||||
if (_isTxGateEnabled) {
|
||||
sendData(aprsIsData.src, aprsIsData.dst, aprsIsData.path, aprsIsData.data.getBytes());
|
||||
}
|
||||
}
|
||||
_parentProtocolCallback.onReceiveLog(line);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.radio.codec2talkie.protocol.aprs.tools;
|
|||
|
||||
import android.util.Log;
|
||||
|
||||
import com.radio.codec2talkie.protocol.aprs.AprsCallsign;
|
||||
|
||||
import kotlin.text.Regex;
|
||||
import kotlin.text.RegexOption;
|
||||
|
||||
|
@ -37,7 +39,7 @@ public class AprsIsData {
|
|||
String sep = "";
|
||||
Regex regex = new Regex(filterRegex, RegexOption.DOT_MATCHES_ALL);
|
||||
for (String p : tail) {
|
||||
if (regex.matches(filterRegex)) {
|
||||
if (regex.matches(p)) {
|
||||
result.append(sep);
|
||||
result.append(p);
|
||||
sep = separator;
|
||||
|
|
|
@ -54,7 +54,7 @@ public class LogItemGroupHolder extends RecyclerView.ViewHolder {
|
|||
}
|
||||
_logItemViewTitle.setText(String.format(Locale.US, "%s",
|
||||
group.getSrcCallsign()));
|
||||
_logItemViewMessage.setText(String.format(Locale.US, "%s %f %f %03d° %03dkm/h %04dm %s %s",
|
||||
String status = String.format(Locale.US, "%s %f %f %03d° %03dkm/h %04dm %s %s",
|
||||
group.getMaidenHead(),
|
||||
group.getLatitude(),
|
||||
group.getLongitude(),
|
||||
|
@ -62,11 +62,14 @@ public class LogItemGroupHolder extends RecyclerView.ViewHolder {
|
|||
UnitTools.metersPerSecondToKilometersPerHour((int)group.getSpeedMetersPerSecond()),
|
||||
(int)group.getAltitudeMeters(),
|
||||
group.getStatus(),
|
||||
group.getComment()));
|
||||
group.getComment());
|
||||
if (group.getMaidenHead() != null) {
|
||||
_logItemViewMessage.setText(status);
|
||||
}
|
||||
String symbol = group.getSymbolCode();
|
||||
Bitmap iconBitmap = _symbolTable.bitmapFromSymbol(symbol == null ? "/." : symbol, false);
|
||||
if (iconBitmap == null) {
|
||||
Log.w(TAG, "Cannot load bitmap for " + symbol);
|
||||
Log.e(TAG, "Cannot load bitmap for " + symbol);
|
||||
} else {
|
||||
_symbolIcon.setImageBitmap(iconBitmap);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue