修改文档

chiyanzhen_branch
CYZ 2 years ago
parent 8af5a913f5
commit 114c0b690e

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\zqy04\.android\avd\Pixel_XL_API_31.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-03-28T17:08:46.341846900Z" />
</component>
</project>

@ -0,0 +1,137 @@
` java:S112g"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
` java:S112r"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
` java:S112}"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
a java:S112ˆ"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
a java:S112"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
a java:S112ž"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
a java:S112©"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
a java:S112´"FDefine and throw a dedicated exception instead of using a generic one.(Ò‚Òéüÿÿÿÿ
g java:S117Ž"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(×àÿÅ
>
java:S1604a"(Make this anonymous inner class a lambda(êáÇñ
C
java:S1604l"(Make this anonymous inner class a lambda(Ëݳ­ûÿÿÿÿ
C
java:S1604w"(Make this anonymous inner class a lambda(ßó¤—ùÿÿÿÿ
D
java:S1604"(Make this anonymous inner class a lambda(‰‘¼“ÿÿÿÿÿ
D
java:S1604<18>"(Make this anonymous inner class a lambda(÷³¿­úÿÿÿÿ
?
java:S1604˜"(Make this anonymous inner class a lambda(Ÿ…³Á
?
java:S1604£"(Make this anonymous inner class a lambda(ÚŠõ¨
?
java:S1604®"(Make this anonymous inner class a lambda(¶±»ù
?
java:S1604¹"(Make this anonymous inner class a lambda(±ë¦þ
V
java:S2184"@Cast one of the operands of this integer division to a "double".(—­½[
X
java:S2184Œ"ACast one of the operands of this division operation to a "float".(ÒÏ“×
]
java:S2184"ACast one of the operands of this division operation to a "float".(‹öÚÈùÿÿÿÿ
[
java:S2184"DCast one of the operands of this subtraction operation to a "float".(¸õÀ½
]
java:S2184Ÿ"ACast one of the operands of this division operation to a "float".(‹öÚÈùÿÿÿÿ
[
java:S2184 "DCast one of the operands of this subtraction operation to a "float".(¸õÀ½
[
java:S2184¡"DCast one of the operands of this subtraction operation to a "float".(¬Óé<C393>
]
java:S2184°"ACast one of the operands of this addition operation to a "float".(•‹öƒýÿÿÿÿ
`
java:S2184°"DCast one of the operands of this subtraction operation to a "float".(•‹öƒýÿÿÿÿ
]
java:S2184±"ACast one of the operands of this division operation to a "float".(ÝÒŒÑþÿÿÿÿ
\
java:S2184Ç"@Cast one of the operands of this integer division to a "double".(ÂÀ‰öùÿÿÿÿ
c
java:S2095"LUse try-with-resources or close this "DatagramSocket" in a "finally" clause.(©Áá‚
o java:S115-"ZRename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.(ƴư
t java:S115."ZRename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.(¨Öܶüÿÿÿÿ
t java:S116;"ZRename this field "Trans_to_Detect" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¾¥Âöûÿÿÿÿ
k java:S116>"VRename this field "Forward_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¸ÂÑ•
m java:S116?"SRename this field "Back_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÛÇãôþÿÿÿÿ
h java:S116@"SRename this field "Left_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¥÷œë
i java:S116A"TRename this field "Right_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28>Οƒ
m java:S116B"SRename this field "Down_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ß缎øÿÿÿÿ
k java:S116C"QRename this field "Up_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ŒÑ„›ùÿÿÿÿ
q java:S116D"WRename this field "TurnLeft_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ëÝŽ–þÿÿÿÿ
l java:S116E"XRename this field "TurnRight_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(€‡p
k java:S116F"VRename this field "Setting_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(à°úö
p java:S116G"VRename this field "TakeOff_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(€‚òœüÿÿÿÿ
p java:S116H"VRename this field "Landing_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÅÔ““þÿÿÿÿ
u
java:S1450G"ZRemove the "TakeOff_btn" field and declare it as a local variable in the relevant methods.(€‚òœüÿÿÿÿ
o
java:S1450I"TRemove the "angle" field and declare it as a local variable in the relevant methods.(§úþóþÿÿÿÿ
r
java:S1450J"WRemove the "distance" field and declare it as a local variable in the relevant methods.(×¾¶Ðøÿÿÿÿ
q
java:S1450<"VRemove the "imgShow" field and declare it as a local variable in the relevant methods.(–©ýûûÿÿÿÿ
[
java:S1124-"EReorder the modifiers to comply with the Java Language Specification.(ƴư
`
java:S1124."EReorder the modifiers to comply with the Java Language Specification.(¨Öܶüÿÿÿÿ
[
java:S1124/"EReorder the modifiers to comply with the Java Language Specification.(ß×á
[
java:S11240"EReorder the modifiers to comply with the Java Language Specification.(Ó¾þá
h java:S100`"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ü™âîùÿÿÿÿ
m
java:S3776`"RRefactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.(ü™âîùÿÿÿÿ
R java:S125¼"<This block of commented-out lines of code should be removed.(é婊
D
java:S1185Ã"(Remove this method to simply inherit it.(ñ‰ÿÜýÿÿÿÿ
D
java:S1185Ë"(Remove this method to simply inherit it.(ñ‰ÿÜýÿÿÿÿ
Z
java:S1117Û">Rename "serverAddr" which hides the field declared at line 56.(ŠÜãËûÿÿÿÿ
R
java:S2696æ"6Make the enclosing method "static" or remove this set.(Ôø±üûÿÿÿÿ
d java:S100Ž"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(×àÿÅ
G
java:S1172"+Remove this unused method parameter "view".(àï’†üÿÿÿÿ
W java:S125Ÿ"<This block of commented-out lines of code should be removed.(ñ¥ùšøÿÿÿÿ
i java:S116¯"SRename this field "BG_COLOR" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(þ¨ò‘
k
java:S1450½"TRemove the "mPath" field and declare it as a local variable in the relevant methods.(ä“<C3A4>Â
\
java:S1610È"@Convert the abstract class "OnUnlockListener" into an interface.(׋›Îøÿÿÿÿ
= java:S131ò""Add a default case to this switch.(<28>äÃùÿÿÿÿÿ
= java:S131»""Add a default case to this switch.(ãÁð™øÿÿÿÿ
9
java:S1128*"Remove this duplicated import.(°þÊóøÿÿÿÿ
C
java:S1068/"-Remove this unused "SEND_PORT" private field.(ß×á
B
java:S10683"'Remove this unused "buf" private field.(ÅØè<C398>þÿÿÿÿ
L
java:S10685"1Remove this unused "receiveSocket" private field.(ÜÁ‰Óúÿÿÿÿ
D
java:S10687".Remove this unused "sendSocket" private field.(éêÖé
D
java:S10688".Remove this unused "serverAddr" private field.(·¡þë
J
java:S10689"/Remove this unused "sendHandler" private field.(ã¹Ð«þÿÿÿÿ
N
java:S1068;"3Remove this unused "Trans_to_Detect" private field.(¾¥Âöûÿÿÿÿ
F
java:S1068<"+Remove this unused "imgShow" private field.(–©ýûûÿÿÿÿ
B
java:S1068="'Remove this unused "btn" private field.(ãȧ<C388>üÿÿÿÿ
J
java:S1068G"/Remove this unused "TakeOff_btn" private field.(€‚òœüÿÿÿÿ
J
java:S1068H"/Remove this unused "Landing_btn" private field.(ÅÔ““þÿÿÿÿ
D
java:S1068I")Remove this unused "angle" private field.(§úþóþÿÿÿÿ
G
java:S1068J",Remove this unused "distance" private field.(×¾¶Ðøÿÿÿÿ
@
java:S1068½")Remove this unused "mPath" private field.(ä“<C3A4>Â
F
java:S1068Ã"/Remove this unused "mIsUnlocked" private field.(ˆø•ö

@ -0,0 +1,84 @@
l java:S117Ú"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÓÔÒÞùÿÿÿÿ
p
java:S1104D"[Make mLocationClient a static final constant or non-public and provide accessors if needed.(òó•L
q
java:S1104F"[Make mLocationOption a static final constant or non-public and provide accessors if needed.(ÈÀ‚§
d
java:S2259"MA "NullPointerException" could be thrown; "mLocationClient" is nullable here.(Ô¹¤<C2B9>
c
java:S2095ñ"LUse try-with-resources or close this "DatagramSocket" in a "finally" clause.(ù<>Èö
o java:S115d"ZRename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.(ë¿§Ï
s java:S116I"YRename this field "Current_latlng" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(æàÁÆÿÿÿÿÿ
o java:S116["ZRename this field "ClearMarker_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ëþ¥È
r java:S116]"XRename this field "ChangeAct_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÂîœÃúÿÿÿÿ
d java:S116i"PRename this field "Angle" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÒáÒD
q java:S116j"WRename this field "MonitorAngle" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(þ‰Ô€ûÿÿÿÿ
o java:S116l"ZRename this field "MonitorDistance" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƒæ¬Ê
˜
java:S1186á"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(±€¿ë
i
java:S1450i"TRemove the "Angle" field and declare it as a local variable in the relevant methods.(ÒáÒD
w
java:S1450]"\Remove the "ChangeAct_btn" field and declare it as a local variable in the relevant methods.(ÂîœÃúÿÿÿÿ
i
java:S1450H"SRemove the "city" field and declare it as a local variable in the relevant methods.(“øÌà
m
java:S1450W"WRemove the "cityCode" field and declare it as a local variable in the relevant methods.(êýð†
r
java:S1450k"WRemove the "distance" field and declare it as a local variable in the relevant methods.(×¾¶Ðøÿÿÿÿ
G
java:S1874S"1Remove this use of "PoiSearch"; it is deprecated.(–ƒëÖ
L
java:S1874U"1Remove this use of "PoiSearch"; it is deprecated.(²¹·‘ÿÿÿÿÿ
[
java:S1124d"EReorder the modifiers to comply with the Java Language Specification.(ë¿§Ï
`
java:S1124e"EReorder the modifiers to comply with the Java Language Specification.(<28>”µÆüÿÿÿÿ
Q java:S125h"<This block of commented-out lines of code should be removed.(‡µÍ”
V java:S125w"<This block of commented-out lines of code should be removed.(¤¯¿Îúÿÿÿÿ
f
java:S1874"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(Ó»×¶þÿÿÿÿ
R java:S125ì"<This block of commented-out lines of code should be removed.(©áèè
Y
java:S1854Ÿ"=Remove this useless assignment to local variable "longitude".(ËàÅ€ûÿÿÿÿ
X
java:S1854<18>"<Remove this useless assignment to local variable "latitude".(û‘áäùÿÿÿÿ
I
java:S1481<18>"-Remove this unused "latitude" local variable.(û‘áäùÿÿÿÿ
J
java:S1481Ÿ".Remove this unused "longitude" local variable.(ËàÅ€ûÿÿÿÿ
R java:S125Þ"<This block of commented-out lines of code should be removed.(É–Ö­
G
java:S1172ƒ"+Remove this unused method parameter "view".(çÑ¢‰ýÿÿÿÿ
U
java:S1155">Use isEmpty() to check whether the collection is empty or not.(”ó±’
G
java:S1172Œ"+Remove this unused method parameter "view".(•É‘Îûÿÿÿÿ
Q java:S125ž"<This block of commented-out lines of code should be removed.(Ÿ…¦Q
U
java:S1117Í"9Rename "query" which hides the field declared at line 83.(˜Ž“áûÿÿÿÿ
\
java:S2147ˆ"ECombine this catch with the one at line 518, which has the same body.(<28>”ý¾
n
java:S3776˜"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(—´¸…øÿÿÿÿ
O java:S106µ"9Replace this use of System.out or System.err by a logger.(éÃÇâ
W java:S125·"<This block of commented-out lines of code should be removed.(×ûÂÚÿÿÿÿÿ
>
java:S1068H"(Remove this unused "city" private field.(“øÌà
?
java:S1068S")Remove this unused "query" private field.(–ƒëÖ
H
java:S1068U"-Remove this unused "poiSearch" private field.(²¹·‘ÿÿÿÿÿ
B
java:S1068W",Remove this unused "cityCode" private field.(êýð†
I
java:S1068c".Remove this unused "reveSocket" private field.(éÛþ§ýÿÿÿÿ
K
java:S1068e"0Remove this unused "RECEIVE_PORT" private field.(<28>”µÆüÿÿÿÿ
K
java:S1068f"0Remove this unused "listenStatus" private field.(ì㋸ûÿÿÿÿ
I
java:S1068g".Remove this unused "serverAddr" private field.(<28>§±ùÿÿÿÿ
E
java:S1068é".Remove this unused "mReceiveIp" private field.(úúÛò

@ -0,0 +1,33 @@
o
java:S2293Z"YReplace the type specification in this constructor call with the diamond operator ("<>").(œœÕ¼
K
java:S1066<18>"/Merge this if statement with the enclosing one.(¦­Üˆûÿÿÿÿ
K
java:S1066"/Merge this if statement with the enclosing one.(þÆÅ÷üÿÿÿÿ
>
java:S1604"(Make this anonymous inner class a lambda(ô§ê
i
java:S1104%"SMake TV_show a static final constant or non-public and provide accessors if needed.(úÀŸõ
>
java:S2189""Add an end condition to this loop.(˜ïˆžÿÿÿÿÿ
>
java:S2189±""Add an end condition to this loop.(˜ïˆžÿÿÿÿÿ
k java:S116!"VRename this field "receive_Msg" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ŒßÙú
g java:S116%"RRename this field "TV_show" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(úÀŸõ
^
java:S1659#"CDeclare "total1" and all following declarations on a separate line.(Æ‘ç¡üÿÿÿÿ
c java:S100<"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Íš“è
h
java:S3776~"RRefactor this method to reduce its Cognitive Complexity from 50 to the 15 allowed.(“–ýþ
u
java:S2142Œ"^Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.(<>í†
W java:S125"<This block of commented-out lines of code should be removed.(‹ãà‘úÿÿÿÿ
R java:S125"<This block of commented-out lines of code should be removed.(çÓ®Ë
U
java:S1155·">Use isEmpty() to check whether the collection is empty or not.(†”“”
u
java:S2142È"^Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.(ä ¹€
V java:S106Õ"9Replace this use of System.out or System.err by a logger.(ŒŸÍÞ8¬ª<C2AC>‰1
A
java:S1068$"+Remove this unused "button0" private field.(Îÿæ¡

@ -19,3 +19,13 @@ k
;app/src/main/java/com/example/sixaunyi/ControlActivity.java,c\9\c99a584c2117ed2df42496451bb97ac1147f5ea0
j
:app/src/main/java/com/example/sixaunyi/SecondFragment.java,1\2\12963d86ac5c2888cc2a9ae459de5665bc06b01f
j
:app/src/main/java/com/example/sixaunyi/MapApplication.java,7\7\776a4b5f215e52628a4164ac15ef90fa338360ce
j
:app/src/main/java/com/example/sixaunyi/DetectActivity.java,9\6\9668392b13e33166876f2a7d3f10eb5405e757ad
i
9app/src/main/java/com/example/sixaunyi/VideoActivity.java,7\1\71fd1993763df2214bbdad8cfee650733993fe44
P
app/src/main/AndroidManifest.xml,8\c\8c55c3ccc257e5907959013f99656e4c8ec3903e
h
8app/src/main/java/com/example/sixaunyi/MainActivity.java,7\c\7c120b7216f76ce98d1573d90803ab36f481640c

@ -51,11 +51,11 @@ public class VideoActivity extends AppCompatActivity {
private byte[] buf;
static Bitmap bp;
private DatagramSocket receiveSocket;
private DatagramSocket reveSocket;
private DatagramSocket sendSocket;
private static DatagramSocket reveSocket;
private static InetAddress serverAddr;
private SendHandler sendHandler = new SendHandler();
private static ReceiveHandler receiveHandler;
private ReceiveHandler receiveHandler = new ReceiveHandler();
private Button Trans_to_Detect;
private ImageView imgShow;
private Button btn;
@ -194,7 +194,7 @@ public class VideoActivity extends AppCompatActivity {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
imgShow.setImageBitmap(bp);
}
}
@ -208,7 +208,7 @@ public class VideoActivity extends AppCompatActivity {
/*
* UDP线
* */
public static class UdpReceiveThread extends Thread
public class UdpReceiveThread extends Thread
{
@Override
public void run()
@ -216,13 +216,11 @@ public class VideoActivity extends AppCompatActivity {
try
{
reveSocket = new DatagramSocket(RECEIVE_PORT);
serverAddr = InetAddress.getByName(Recieve_IP);
//ByteArrayOutputStream out = new ByteArrayOutputStream();
InetAddress serverAddr = InetAddress.getByName(Recieve_IP);
while(listenStatus)
{
byte[] inBuf= new byte[1024*1024];
DatagramPacket inPacket=new DatagramPacket(inBuf,inBuf.length);
//out.write(inPacket.getData());
reveSocket.receive(inPacket);
if(!inPacket.getAddress().equals(serverAddr)){
throw new IOException("未知名的报文");
@ -230,12 +228,13 @@ public class VideoActivity extends AppCompatActivity {
ByteArrayInputStream in = new ByteArrayInputStream(inPacket.getData());
receiveHandler.sendEmptyMessage(1);
bp = BitmapFactory.decodeStream(in);
}
} catch (Exception e)
}
catch (Exception e)
{
e.printStackTrace();
}finally {
reveSocket.close();
}
}
}
@ -285,13 +284,13 @@ public class VideoActivity extends AppCompatActivity {
@Override
public void onUnlock() {
// 在用户滑动解锁后执行操作
try {
InitUdpSend("TAKEOFF"+"___"+angle+"___"+String.valueOf(distance));
} catch (UnknownHostException e) {
throw new RuntimeException(e);
}
UdpReceiveThread udpReceiveThread = new UdpReceiveThread();
udpReceiveThread.start();
// try {
// InitUdpSend("TAKEOFF"+"___"+angle+"___"+String.valueOf(distance));
// } catch (UnknownHostException e) {
// throw new RuntimeException(e);
// }
new UdpReceiveThread().start();
dialog.dismiss();
Log.i(TAG, "onClick: 2222222222222222222222222");
}

Loading…
Cancel
Save