From 6ebfdb73bcc1c99086430088e55d31b2273b8252 Mon Sep 17 00:00:00 2001 From: Nedifinita Date: Sun, 18 May 2025 17:59:08 +0800 Subject: [PATCH] Initialize LBJ Receiver project with basic structure and configuration files --- .gitignore | 15 + .idea/.gitignore | 3 + .idea/.name | 1 + .idea/compiler.xml | 6 + .idea/deploymentTargetSelector.xml | 10 + .idea/gradle.xml | 20 + .idea/inspectionProfiles/Project_Default.xml | 47 ++ .idea/kotlinc.xml | 6 + .idea/migrations.xml | 10 + .idea/misc.xml | 9 + .idea/runConfigurations.xml | 17 + .idea/vcs.xml | 6 + LICENSE | 674 ++++++++++++++++++ README.md | 7 + app/.gitignore | 1 + app/build.gradle.kts | 65 ++ app/proguard-rules.pro | 21 + .../receiver/lbj/ExampleInstrumentedTest.kt | 20 + app/src/main/AndroidManifest.xml | 52 ++ app/src/main/assets/loco_info.csv | 430 +++++++++++ app/src/main/java/receiver/lbj/BLEClient.kt | 489 +++++++++++++ .../main/java/receiver/lbj/MainActivity.kt | 637 +++++++++++++++++ .../java/receiver/lbj/model/TrainRecord.kt | 152 ++++ .../receiver/lbj/model/TrainRecordManager.kt | 216 ++++++ .../lbj/ui/components/TrainDetailDialog.kt | 172 +++++ .../lbj/ui/components/TrainInfoCard.kt | 141 ++++ .../lbj/ui/components/TrainRecordsList.kt | 339 +++++++++ .../receiver/lbj/ui/screens/HistoryScreen.kt | 565 +++++++++++++++ .../java/receiver/lbj/ui/screens/MapScreen.kt | 559 +++++++++++++++ .../receiver/lbj/ui/screens/MonitorScreen.kt | 252 +++++++ .../receiver/lbj/ui/screens/SettingsScreen.kt | 38 + .../main/java/receiver/lbj/ui/theme/Color.kt | 11 + .../main/java/receiver/lbj/ui/theme/Theme.kt | 50 ++ .../main/java/receiver/lbj/ui/theme/Type.kt | 19 + .../java/receiver/lbj/util/LocationUtils.kt | 70 ++ .../java/receiver/lbj/util/LocoInfoUtil.kt | 117 +++ .../res/drawable/ic_launcher_background.xml | 170 +++++ .../res/drawable/ic_launcher_foreground.xml | 30 + .../main/res/mipmap-anydpi/ic_launcher.xml | 6 + .../res/mipmap-anydpi/ic_launcher_round.xml | 6 + app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes app/src/main/res/raw/loco_info.csv | 590 +++++++++++++++ app/src/main/res/values/colors.xml | 10 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/themes.xml | 5 + app/src/main/res/xml/backup_rules.xml | 4 + .../main/res/xml/data_extraction_rules.xml | 7 + app/src/main/res/xml/file_paths.xml | 5 + .../test/java/receiver/lbj/ExampleUnitTest.kt | 13 + build.gradle.kts | 6 + gradle.properties | 23 + gradle/libs.versions.toml | 32 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 185 +++++ gradlew.bat | 89 +++ settings.gradle.kts | 24 + 66 files changed, 6461 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/compiler.xml create mode 100644 .idea/deploymentTargetSelector.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/kotlinc.xml create mode 100644 .idea/migrations.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/vcs.xml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 app/.gitignore create mode 100644 app/build.gradle.kts create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/receiver/lbj/ExampleInstrumentedTest.kt create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/assets/loco_info.csv create mode 100644 app/src/main/java/receiver/lbj/BLEClient.kt create mode 100644 app/src/main/java/receiver/lbj/MainActivity.kt create mode 100644 app/src/main/java/receiver/lbj/model/TrainRecord.kt create mode 100644 app/src/main/java/receiver/lbj/model/TrainRecordManager.kt create mode 100644 app/src/main/java/receiver/lbj/ui/components/TrainDetailDialog.kt create mode 100644 app/src/main/java/receiver/lbj/ui/components/TrainInfoCard.kt create mode 100644 app/src/main/java/receiver/lbj/ui/components/TrainRecordsList.kt create mode 100644 app/src/main/java/receiver/lbj/ui/screens/HistoryScreen.kt create mode 100644 app/src/main/java/receiver/lbj/ui/screens/MapScreen.kt create mode 100644 app/src/main/java/receiver/lbj/ui/screens/MonitorScreen.kt create mode 100644 app/src/main/java/receiver/lbj/ui/screens/SettingsScreen.kt create mode 100644 app/src/main/java/receiver/lbj/ui/theme/Color.kt create mode 100644 app/src/main/java/receiver/lbj/ui/theme/Theme.kt create mode 100644 app/src/main/java/receiver/lbj/ui/theme/Type.kt create mode 100644 app/src/main/java/receiver/lbj/util/LocationUtils.kt create mode 100644 app/src/main/java/receiver/lbj/util/LocoInfoUtil.kt create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 app/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 app/src/main/res/mipmap-anydpi/ic_launcher.xml create mode 100644 app/src/main/res/mipmap-anydpi/ic_launcher_round.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/raw/loco_info.csv create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/themes.xml create mode 100644 app/src/main/res/xml/backup_rules.xml create mode 100644 app/src/main/res/xml/data_extraction_rules.xml create mode 100644 app/src/main/res/xml/file_paths.xml create mode 100644 app/src/test/java/receiver/lbj/ExampleUnitTest.kt create mode 100644 build.gradle.kts create mode 100644 gradle.properties create mode 100644 gradle/libs.versions.toml create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle.kts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..cf9db12 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +LBJ_Console \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b86273d --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..b268ef3 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..7b3006b --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..005afb3 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,47 @@ + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..6d0ee1c --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b2c751a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3a79638 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + LBJ_Console is an Android app designed to receive and display LBJ (Locomotive Bell Jingling) messages via BLE from the SX1276_Receive_LBJ device. + Copyright (C) 2025 undef-i + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + LBJ_Console Copyright (C) 2025 undef-i + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..22eeee8 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# LBJ_Console + +LBJ_Console is an Android app designed to receive and display LBJ (Locomotive Bell Jingling) messages via BLE from the [SX1276_Receive_LBJ](https://github.com/undef-i/SX1276_Receive_LBJ) device. + +# License + +This project is licensed under the GNU General Public License v3.0 (GPLv3). This license ensures that the software remains free and open source, requiring that any modifications or derivative works must also be released under the same license terms. \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..2a6bd47 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,65 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) +} + +android { + namespace = "receiver.lbj" + compileSdk = 35 + + defaultConfig { + applicationId = "receiver.lbj" + minSdk = 29 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + compose = true + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.ui.test.junit4) + debugImplementation(libs.androidx.ui.tooling) + debugImplementation(libs.androidx.ui.test.manifest) + implementation("org.json:json:20231013") + implementation("androidx.compose.material:material-icons-extended:1.5.4") + + + implementation("org.osmdroid:osmdroid-android:6.1.16") + implementation("org.osmdroid:osmdroid-mapsforge:6.1.16") +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/receiver/lbj/ExampleInstrumentedTest.kt b/app/src/androidTest/java/receiver/lbj/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..1355497 --- /dev/null +++ b/app/src/androidTest/java/receiver/lbj/ExampleInstrumentedTest.kt @@ -0,0 +1,20 @@ +package receiver.lbj + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + + +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("receiver.lbj", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..035d73d --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/loco_info.csv b/app/src/main/assets/loco_info.csv new file mode 100644 index 0000000..fbdcd61 --- /dev/null +++ b/app/src/main/assets/loco_info.csv @@ -0,0 +1,430 @@ +6G,51,90,西安铁路局 宝鸡电力机务段,, +6K,1,85,郑州铁路局 洛阳机务段,, +8G,1,1,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,, +8G,2,2,中国铁道博物馆,, +8G,3,75,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,, +8G,76,76,太原铁路局 太原机务段北场,, +8G,77,96,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,, +8G,97,97,太原铁路局 榆次机务折返段,, +8G,98,100,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,, +8K,1,1,北京铁路局 丰台机务段,, +8K,2,7,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,8,8,中国铁道博物馆,*科技号, +8K,9,17,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,18,18,*北京铁路局 丰台机务段,, +8K,19,23,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,24,24,太原铁路局 湖东机务段 大同西运用车间,, +8K,25,64,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,65,65,天津铁道职业技术学院,, +8K,66,71,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,72,72,北京铁路局 丰台机务段,, +8K,73,90,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +8K,91,91,太原铁路局 太原机务段北场 机车展场,, +8K,92,100,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,, +DJ1,1,1,中国铁道科学研究院 环形铁道,, +DJ1,2,2,株洲西门子牵引设备有限公司,, +DJ1,3,3,西安铁路局 宝鸡机务段 秦岭附加队 ,, +DJ2,1,1,郑州铁路局 郑州机务段京武快车队,奥星, +DJ2,2,3,郑州铁路局 郑州机务段,奥星, +HXD1D,1,15,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,16,16,上海铁路局集团有限公司 杭州机务段,, +HXD1D,17,17,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,18,18,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,19,19,上海铁路局集团有限公司 杭州机务段,, +HXD1D,20,20,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,21,21,上海铁路局集团有限公司 杭州机务段,, +HXD1D,22,24,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,25,25,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,26,26,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,27,27,上海铁路局集团有限公司 杭州机务段,, +HXD1D,28,28,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,29,34,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,35,35,上海铁路局集团有限公司 杭州机务段,, +HXD1D,36,38,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,39,39,中国铁路济南局集团有限公司 济南机务段,, +HXD1D,40,50,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,51,75,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,76,105,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,106,137,上海铁路局集团有限公司 上海机务段,, +HXD1D,138,168,上海铁路局集团有限公司 杭州机务段,, +HXD1D,169,175,上海铁路局集团有限公司 上海机务段,, +HXD1D,176,185,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,186,187,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,188,188,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,189,190,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,191,232,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,233,233,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,234,237,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,238,257,广州铁路(集团)公司 广州机务段,, +HXD1D,258,270,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,271,275,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,276,279,上海铁路局集团有限公司 上海机务段,, +HXD1D,280,289,上海铁路局集团有限公司 徐州机务段,, +HXD1D,290,291,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,292,293,南昌铁路局集团有限公司 鹰潭机务段,, +HXD1D,294,295,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,296,300,广州铁路(集团)公司 广州机务段,, +HXD1D,301,310,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,311,320,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,321,340,青藏铁路集团有限公司 西宁机务段,, +HXD1D,341,362,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,363,382,广州铁路(集团)公司 广州机务段,, +HXD1D,383,392,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,393,405,上海铁路局集团有限公司 上海机务段,, +HXD1D,406,415,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,416,430,广州铁路(集团)公司 长沙机务段,, +HXD1D,431,440,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,441,445,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,446,450,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,451,460,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,461,470,广州铁路(集团)公司 广州机务段,, +HXD1D,471,478,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,479,483,上海铁路局集团有限公司 上海机务段,, +HXD1D,484,488,上海铁路局集团有限公司 杭州机务段,, +HXD1D,489,490,上海铁路局集团有限公司 杭州机务段,, +HXD1D,491,510,郑州铁路局集团有限公司 郑州机务段,, +HXD1D,511,512,上海铁路局集团有限公司 徐州机务段,, +HXD1D,513,515,上海铁路局集团有限公司 上海机务段,, +HXD1D,516,520,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,521,534,广州铁路(集团)公司 广州机务段,, +HXD1D,522,522,广州铁路职业技术学院,, +HXD1D,535,544,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,545,551,上海铁路局集团有限公司 上海机务段,, +HXD1D,552,554,上海铁路局集团有限公司 杭州机务段,, +HXD1D,555,559,郑州铁路局集团有限公司 郑州机务段,, +HXD1D,560,564,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,565,570,广州铁路(集团)公司 广州机务段,, +HXD1D,571,585,南昌铁路局集团有限公司 南昌机务段,, +HXD1D,586,595,上海铁路局集团有限公司 杭州机务段,, +HXD1D,596,613,兰州铁路局集团有限公司 兰州西机务段,, +HXD1D,614,623,广州铁路(集团)公司 广州机务段,, +HXD1D,624,633,上海铁路局集团有限公司 上海机务段,, +HXD1D,634,636,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,637,644,郑州铁路局集团有限公司 郑州机务段,, +HXD1D,645,660,郑州铁路局集团有限公司 郑州机务段,, +HXD1D,661,668,武汉铁路局集团有限公司 武昌南机务段,, +HXD1D,669,673,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,, +HXD1D,674,678,郑州铁路局集团有限公司 郑州机务段,, +HXD1D,679,682,上海铁路局集团有限公司 上海机务段,, +HXD1D,683,683,上海铁路局集团有限公司 徐州机务段,, +HXD1D,684,684,上海铁路局集团有限公司 徐州机务段,, +HXD1D,685,689,青藏铁路集团有限公司 格尔木机务段,, +HXD1D,1898,1898,上海铁路局集团有限公司 上海机务段,周恩来号, +HXD1D-J,1,3,青藏铁路集团有限公司 拉萨动车运用所,, +HXD1D-J,1001,1009,昆明铁路局集团有限公司 昆明动车运用所,, +HXD1D-J,1010,1013,青藏铁路集团有限公司 格尔木机务段,, +HXD1D-J,1014,1019,成都铁路局集团有限公司 成都动车运用所,, +HXD1D-J,1020,1027,昆明铁路局集团有限公司 昆明动车运用所,, +HXD3C,446,446,广州铁路(集团)公司 广州机务段,, +HXD3C,805,809,广州铁路(集团)公司 ,, +HXD3C,810,819,中国铁路南宁局集团有限公司,, +HXD3C,820,829,中国铁路武汉局集团有限公司,, +HXD3C,896,925,中国铁路沈阳局集团有限公司,, +HXD3C,926,930,中国铁路南宁局集团有限公司,, +HXD3C,931,945,中国铁路北京局集团有限公司,, +HXD3C,946,955,中国铁路济南局集团有限公司,, +HXD3C,956,965,中国铁路郑州局集团有限公司,, +HXD3C,966,974,中国铁路济南局集团有限公司,, +HXD3D,1,10,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,11,25,西安铁路局集团有限公司 西安机务段,, +HXD3D,26,34,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,35,35,兰州铁路局集团有限公司 迎水桥机务段,雷锋号, +HXD3D,36,38,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,39,39,济南铁路局集团有限公司 济南机务段,共青团号, +HXD3D,40,40,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,41,50,西安铁路局集团有限公司 西安机务段,, +HXD3D,51,70,北京铁路局集团有限公司 北京机务段,, +HXD3D,71,90,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,91,115,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,116,135,昆明铁路局集团有限公司 昆明机务段,, +HXD3D,136,145,北京铁路局集团有限公司 北京机务段,, +HXD3D,146,150,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,151,155,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,156,160,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,161,165,北京铁路局集团有限公司 北京机务段,, +HXD3D,166,170,西安铁路局集团有限公司 西安机务段,, +HXD3D,171,180,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,181,190,济南铁路局集团有限公司 济南机务段,, +HXD3D,191,245,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,246,255,北京铁路局集团有限公司 北京机务段,, +HXD3D,256,265,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,266,290,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,291,300,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,301,310,济南铁路局集团有限公司 济南机务段,, +HXD3D,310,315,昆明铁路局集团有限公司 昆明机务段,, +HXD3D,316,320,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,321,322,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,323,325,北京铁路局集团有限公司 北京机务段,, +HXD3D,326,333,西安铁路局集团有限公司 西安机务段,, +HXD3D,334,340,西安铁路局集团有限公司 安康机务段,, +HXD3D,341,345,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,346,346,成都铁路局集团有限公司 重庆机务段,, +HXD3D,351,351,成都铁路局集团有限公司 重庆机务段,, +HXD3D,356,365,西安铁路局集团有限公司 安康机务段,, +HXD3D,366,369,北京铁路局集团有限公司 北京机务段,, +HXD3D,370,382,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,383,392,昆明铁路局集团有限公司 昆明机务段,, +HXD3D,393,397,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,398,402,西安铁路局集团有限公司 西安机务段,, +HXD3D,403,417,西安铁路局集团有限公司 西安机务段,, +HXD3D,418,419,哈尔滨铁路局集团有限公司 牡丹江机务段,, +HXD3D,420,424,北京铁路局集团有限公司 北京机务段,, +HXD3D,425,429,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,430,433,哈尔滨铁路局集团有限公司 牡丹江机务段,, +HXD3D,434,443,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,444,449,济南铁路局集团有限公司 济南机务段,, +HXD3D,450,464,西安铁路局集团有限公司 西安机务段,, +HXD3D,465,468,济南铁路局集团有限公司 济南机务段,, +HXD3D,469,473,济南铁路局集团有限公司 济南机务段,, +HXD3D,474,479,昆明铁路局集团有限公司 昆明机务段,, +HXD3D,480,484,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,485,489,西安铁路局集团有限公司 西安机务段,, +HXD3D,490,499,北京铁路局集团有限公司 北京机务段,, +HXD3D,500,503,哈尔滨铁路局集团有限公司 牡丹江机务段,, +HXD3D,504,514,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,515,515,成都铁路局集团有限公司 重庆机务段,, +HXD3D,516,518,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,519,528,西安铁路局集团有限公司 西安机务段,, +HXD3D,529,538,北京铁路局集团有限公司 北京机务段,, +HXD3D,539,541,呼和浩特铁路局集团有限公司 集宁机务段,, +HXD3D,542,553,西安铁路局集团有限公司 西安机务段,, +HXD3D,554,563,济南铁路局集团有限公司 济南机务段,, +HXD3D,564,568,昆明铁路局集团有限公司 昆明机务段,, +HXD3D,569,573,成都铁路局集团有限公司 重庆机务段,, +HXD3D,574,583,济南铁路局集团有限公司 济南机务段,, +HXD3D,584,584,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,585,609,哈尔滨铁路局集团有限公司 三棵树机务段,, +HXD3D,610,611,北京铁路局集团有限公司 北京机务段,, +HXD3D,612,621,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,622,626,南昌铁路局集团有限公司 南昌机务段,, +HXD3D,627,629,哈尔滨铁路局集团有限公司 三棵树机务段,, +HXD3D,630,630,哈尔滨铁路局集团有限公司 哈尔滨机务段,, +HXD3D,631,631,西安铁路局集团有限公司 西安机务段,第五代“钢人铁马号”, +HXD3D,632,653,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,654,673,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,674,681,沈阳铁路局集团有限公司 沈阳机务段,, +HXD3D,682,688,兰州铁路局集团有限公司 兰州西机务段,, +HXD3D,1886,1886,哈尔滨铁路局集团有限公司 哈尔滨机务段,第五代“朱德号”, +HXD3D,1893,1893,北京铁路局集团有限公司 丰台机务段,第六代“毛泽东号”, +HXD3D,1921,1921,沈阳铁路局集团有限公司 沈阳机务段,共产党员号, +HXD3D,7001,7002,广西沿海铁路股份有限公司 南宁南机务运用段,, +HXD3D,7003,7003,吉林铁道职业技术学院,, +HXD3D,8001,8025,沈阳铁路局集团有限公司 沈阳机务段,,大同 +HXD3D,8026,8028,太原铁路局集团有限公司 太原南机务段,,大同 +东方红2,1,50,,,资阳 +东风,1201,1830,,,大连、成都 +东风,2001,2094,,,戚墅堰 +东风11,1,459,,,戚墅堰 +东风12,8001,8001,吉林铁道职业技术学院,, +东风2,3201,3348,,,戚墅堰 +东风21,1,5,中国铁路昆明局集团有限公司 昆明机务段,, +东风21,6,6,中国铁路昆明局集团有限公司 昆明机务段,状元号, +东风21,7,7,中国铁路昆明局集团有限公司 昆明机务段,亲年号, +东风21,8,8,中国铁路昆明局集团有限公司 昆明机务段,建水古城, +东风21,9,100,中国铁路昆明局集团有限公司 昆明机务段,, +东风21,101,101,中国铁路昆明局集团有限公司 昆明机务段,异龙号, +东风21,102,102,中国铁路昆明局集团有限公司 昆明机务段,, +东风21,1001,1002,云南钢铁厂,, +东风2Z,3251,3251,*齐齐哈尔铁路局 加格达奇机务段,, +东风3,3243,3243,中车共享城机车公园,, +东风4,3247,3247,中车成都轨道交通产业园,, +东风4B,1001,1999,,,大连 +东风4B,1963,1963,*北京铁路局 丰台机务段,, +东风4B,2101,2685,,,大连 +东风4B,2104,2104,*上海铁路局 蚌埠机务段,, +东风4B,2376,2376,*南昌铁路局 鹰潭机务段,, +东风4B,3101,3999,,,资阳 +东风4B,3214,3214,*浙江金温铁道开发有限公司 温州机务段,, +东风4B,3249,3249,*西安铁路局 西安机务段,, +东风4B,3390,3390,*成都铁路局 重庆机务段,, +东风4B,3593,3593,*广州铁路(集团)公司 株洲机务段,, +东风4B,6001,6587,,,大同 +东风4B,6530,6530,*南宁铁路局 南宁机务段,, +东风4B,7001,7363,,,大连 +东风4B,7364,7365,,,四方 +东风4B,7366,7796,,,大连 +东风4B,7701,7732,,,戚墅堰改 +东风4B,9001,9702,,,资阳 +东风4B,9167,9167,*南昌铁路局 向塘机务段,, +东风4B,9531,9531,*新长铁路公司,, +东风4C,1,10,,,大同 +东风4C,11,11,北京铁路局 丰台段,青年文明号, +东风4C,12,40,,,大同 +东风4C,2001,2006,,,四方 +东风4C,4001,4465,,,大连 +东风4C,4466,4466,四方机车车辆厂,,四方 +东风4C,5001,5273,,,资阳 +东风4C,5274,5275,三茂铁路公司 三水机务段,东风4CK, +东风4C,5276,5335,,,资阳 +东风4D,7001,7021,中国铁路南宁局集团有限公司,, +东风5,1,1,中国铁路北京局集团有限公司 北京车辆段,, +东风5,1974,1975,中国铁路兰州局集团有限公司 兰州西机务段,,唐山 +东风5,1976,2082,,,唐山 +东风5,2083,2083,中国石油兰州石化公司,,唐山 +东风5,3279,3279,云南铁路博物馆,, +东风6,1,2,*沈阳铁路局 大连机务段,, +东风6,3,3,沈阳铁路陈列馆,, +东风6,4,4,*沈阳铁路局 大连机务段,, +东风7,174,174,太原机务段北场,, +东风7B,3006,3006,中国铁道博物馆,, +东风7B,3015,3015,王坪村铁路公园,, +东风7B,6001,6072,*北京铁路局 邯郸机务段;郑州铁路局 新乡机务段,调车, +东风7D,1,1,中国铁道博物馆,, +东风7D,3001,3001,中国铁道博物馆,, +东风7E,1,1,郑州铁路局 新乡机务段,, +东风7E,2,2,郑州铁路局 郑州机务段,, +东风7G,9001,9004,呼和浩特铁路局 集宁机务段 赛汗塔拉分段,, +东风8,1,1,中国铁道博物馆,, +东风9,1,2,中国铁路广州局集团有限公司广州机务段,, +韶山1,8,8,中国铁道博物馆,, +韶山1,156,156,郑州世纪欢乐园,, +韶山1,160,160,北京铁路电气化学校,, +韶山1,227,227,兰州铁路局 兰州西机务段,, +韶山1,254,254,北京铁路局 丰台机务段 储备厂,, +韶山1,307,307,太原铁路局 榆次机务折返段,, +韶山1,309,309,太原铁路局 太原机务段北场,, +韶山1,321,321,武汉铁路职业技术学院,, +韶山1,681,681,中国铁道博物馆,, +韶山1,695,695,沈阳铁路陈列馆,, +韶山1,762,762,广州铁路(集团)公司 娄底运用车间储备厂,, +韶山1,818,818,西南交通大学 机车博物园,, +韶山1,821,821,韶关机务实训基地,, +韶山1,826,826,韶关机务实训基地,, +韶山3,454,454,成都铁路局 贵阳机务段,先锋号, +韶山3,524,524,武汉铁路局 江岸机务段,青年号, +韶山3,4160,4160,广西沿海铁路公司 南宁南机务运用段,共青团号, +韶山3,4178,4178,广西沿海铁路公司 南宁南机务运用段,共青团号, +韶山3,4235,4235,成都铁路局 重庆机务段,青年文明号, +韶山3,4258,4258,成都铁路局 重庆机务段,党员先锋号, +韶山3,5080,5080,广铁机车博物馆,, +韶山3,6005,6005,湖南交通工程学院,, +韶山3,8050,8050,武汉四美塘铁路遗址公园,, +韶山3B,16,16,西安铁路局 安康机务段,青年文明号, +韶山3B,5001,5001,成都铁路局 贵阳机务段,*先锋力神, +韶山3B,5035,5035,兰州铁路局 迎水桥机务段,雷锋号 (曾), +韶山3B,5038,5038,兰州铁路局 迎水桥机务段,青年文明号, +韶山3B,5151,5151,成都铁路局 西昌机务段,扶贫先锋号, +韶山3B,5162,5162,昆明铁路局 昆明机务段,五四青年号, +韶山3B,5235,5235,成都铁路局 西昌机务段,*共青团号, +韶山3C,1,1,贵阳机务段,, +韶山4,6,6,中国铁道博物馆,, +韶山4,10,10,成都铁路局 西昌机务段,, +韶山4,50,50,郑州铁路局 新乡机务段,先锋号, +韶山4,63,63,太原铁路局 太原机务段,, +韶山4,204,204,郑州铁路局 新乡机务段,先锋号, +韶山4,448,448,沈阳铁路局 苏家屯机务段,先锋号, +韶山4,574,574,中铁三局集团,先锋号, +韶山4,743,743,哈尔滨铁路局 哈尔滨机务段,青年文明号, +韶山4,855,855,西安铁路局 新丰镇机务段,, +韶山4,911,911,中铁三局集团,青年文明号, +韶山4,2006,2006,吉林铁道职业技术学院,, +韶山4B,19,19,神朔铁路公司 神木北机务段,青年号, +韶山4B,89,89,神朔铁路公司 神木北机务段,青年文明号, +韶山4B,90,90,神朔铁路公司 神木北机务段,青年文明号, +韶山4B,257,257,包神铁路公司 东胜机务段,党员先锋号, +韶山4G,159,1177,,,株洲 +韶山4G,168,168,中国铁道博物馆,, +韶山4G,171,171,哈尔滨铁路局 牡丹江机务段,, +韶山4G,179,179,太原铁路局 湖东机务段,, +韶山4G,466,466,石家庄铁道大学,, +韶山4G,1089,1089,*呼和浩特铁路局 包头西机务段,, +韶山4G,1886,1886,哈尔滨铁路局 哈尔滨机务段,*朱德号,株洲 +韶山4G,3001,3002,,,资阳 +韶山4G,6001,6001,中国铁道博物馆,, +韶山4G,6001,6001,中国铁道博物馆,,大同 +韶山4G,7001,7110,,,大连 +韶山4G,7121,7243,,,大连 +韶山5,1,1,中国铁道博物馆,, +韶山5,2,2,郑州世纪欢乐园 ,, +韶山6,1,1,郑州铁路司机学校,, +韶山6,2,2,中国铁道博物馆,, +韶山6B,1011,1011,西安铁路局 西安机务段,*青年文明号, +韶山6B,1026,1026,韶关机务实训基地,, +韶山6B,1088,1088,武汉铁路局 襄阳机务段,*民兵号, +韶山6B,1111,1111,武汉铁路局 襄阳机务段,*先锋号, +韶山6B,6001,6001,韶关机务实训基地,, +韶山6B,6002,6002,广州铁路博物馆,, +韶山7,1,79,南宁铁路局集团有限公司 柳州机务段,, +韶山7,76,76,南宁铁路局集团有限公司 南宁机务段,*五四红旗号, +韶山7,80,84,南宁铁路局集团有限公司 柳州机务段,, +韶山7,85,111,南宁铁路局集团有限公司 柳州机务段,, +韶山7,8112,8113,山西孝柳铁路有限责任公司,, +韶山7B,1,1,*南宁铁路局集团有限公司 南宁机务段,, +韶山7B,2,2,中国铁路南宁局集团有限公司 柳州机务段,, +韶山7D,1,58,西安铁路局集团有限公司 西安机务段,, +韶山7D,631,631,西安铁路局集团有限公司 西安机务段,*钢人铁马号, +韶山7E,1,140,,,大同 +韶山7E,6001,6002,昆明铁路局,,大同 +韶山7E,7001,7004,,,大连 +韶山8,1,1,中国铁路广州局集团有限公司 广州机务段,, +韶山8,2,2,中国铁路广州局集团有限公司 广州机务段,, +韶山8,3,4,中国铁路上海局集团有限公司 上海机务段,, +韶山8,5,5,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,9,9,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,11,11,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,12,12,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,15,16,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,17,17,中国铁路上海局集团有限公司 上海机务段,, +韶山8,20,20,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,24,25,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,27,27,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,29,32,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,33,35,中国铁路上海局集团有限公司 上海机务段,, +韶山8,36,36,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,38,38,中国铁路上海局集团有限公司 上海机务段,, +韶山8,39,39,中国铁路上海局集团有限公司 上海机务段,国祥号, +韶山8,40,40,中国铁路上海局集团有限公司 上海机务段,, +韶山8,41,41,中国铁路北京局集团有限公司 北京机务段,, +韶山8,43,43,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,44,44,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,45,45,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,48,48,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,49,49,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,50,50,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,51,51,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,52,52,中国铁路上海局集团有限公司 上海机务段,, +韶山8,55,55,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,56,57,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,64,64,中国铁路广州局集团有限公司 广州机务段,, +韶山8,72,72,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,73,73,中国铁路北京局集团有限公司 北京机务段,, +韶山8,74,74,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,81,81,中国铁路北京局集团有限公司 北京机务段,, +韶山8,83,84,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,85,85,中国铁路北京局集团有限公司 北京机务段,, +韶山8,88,103,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,104,104,中国铁路北京局集团有限公司 邯郸机务段,, +韶山8,109,111,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,114,116,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,118,119,中国铁路北京局集团有限公司 北京机务段,, +韶山8,121,126,中国铁路北京局集团有限公司 北京机务段,, +韶山8,127,128,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,130,130,中国铁路南昌局集团有限公司 南昌机务段,, +韶山8,131,131,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,132,132,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,133,133,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,134,134,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,136,136,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,141,141,中国铁路广州局集团有限公司 广州机务段,, +韶山8,144,144,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,148,148,中国铁路广州局集团有限公司 广州机务段,, +韶山8,156,156,中国铁路广州局集团有限公司 广州机务段,, +韶山8,163,163,中国铁路广州局集团有限公司 广州机务段,, +韶山8,166,166,中国铁路广州局集团有限公司 广州机务段,新世纪金龙号, +韶山8,171,171,中国铁路上海局集团有限公司 上海机务段,, +韶山8,172,172,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,173,173,中国铁路广州局集团有限公司 广州机务段,, +韶山8,181,181,中国铁路广州局集团有限公司 广州机务段,, +韶山8,186,186,中国铁路广州局集团有限公司 广州机务段,, +韶山8,191,191,中国铁路广州局集团有限公司 广州机务段,, +韶山8,192,192,中国铁路广州局集团有限公司 广州机务段,, +韶山8,197,197,中国铁路郑州局集团有限公司 郑州机务段,, +韶山8,200,204,中国铁路上海局集团有限公司 上海机务段,, +韶山8,205,205,中国铁路广州局集团有限公司 长沙机务段,, +韶山8,214,214,中国铁路郑州局集团有限公司 郑州机务段,, +韶山9,1,3,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,, +韶山9,5,29,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,, +韶山9,30,30,沈阳铁路局 通辽机务段,, +韶山9,31,37,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,, +韶山9,38,38,沈阳铁路局 通辽机务段,, +韶山9,39,43,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,, \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/BLEClient.kt b/app/src/main/java/receiver/lbj/BLEClient.kt new file mode 100644 index 0000000..3d8505d --- /dev/null +++ b/app/src/main/java/receiver/lbj/BLEClient.kt @@ -0,0 +1,489 @@ +package receiver.lbj + +import android.annotation.SuppressLint +import android.bluetooth.* +import android.content.Context +import android.os.Handler +import android.os.Looper +import android.util.Log +import java.nio.charset.StandardCharsets +import org.json.JSONObject +import java.util.* + +class BLEClient(private val context: Context) : BluetoothGattCallback(), + BluetoothAdapter.LeScanCallback { + companion object { + const val TAG = "LBJ_BT" + const val SCAN_PERIOD = 10000L + + val SERVICE_UUID = UUID.fromString("0000ffe0-0000-1000-8000-00805f9b34fb") + val CHAR_UUID = UUID.fromString("0000ffe1-0000-1000-8000-00805f9b34fb") + + const val CMD_GET_STATUS = "STATUS" + + const val RESP_STATUS = "STATUS:" + const val RESP_ERROR = "ERROR:" + } + + private var bluetoothGatt: BluetoothGatt? = null + private var deviceAddress: String? = null + private var isConnected = false + private var isScanning = false + private var statusCallback: ((String) -> Unit)? = null + private var scanCallback: ((BluetoothDevice) -> Unit)? = null + private var connectionStateCallback: ((Boolean) -> Unit)? = null + private var trainInfoCallback: ((JSONObject) -> Unit)? = null + private var handler = Handler(Looper.getMainLooper()) + private var targetDeviceName: String? = null + + + fun setTrainInfoCallback(callback: (JSONObject) -> Unit) { + trainInfoCallback = callback + } + + + @SuppressLint("MissingPermission") + fun scanDevices(targetDeviceName: String? = null, callback: (BluetoothDevice) -> Unit) { + try { + scanCallback = callback + this.targetDeviceName = targetDeviceName + val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() ?: run { + Log.e(TAG, "Bluetooth adapter unavailable") + return + } + + if (!bluetoothAdapter.isEnabled) { + Log.e(TAG, "Bluetooth adapter disabled") + return + } + + handler.postDelayed({ + stopScan() + }, SCAN_PERIOD) + + isScanning = true + Log.d(TAG, "Starting BLE scan target=${targetDeviceName ?: "Any"}") + bluetoothAdapter.startLeScan(this) + } catch (e: SecurityException) { + Log.e(TAG, "Scan security error: ${e.message}") + } catch (e: Exception) { + Log.e(TAG, "BLE scan failed: ${e.message}") + } + } + + + @SuppressLint("MissingPermission") + fun stopScan() { + if (isScanning) { + val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() + bluetoothAdapter.stopLeScan(this) + isScanning = false + } + } + + + override fun onLeScan(device: BluetoothDevice, rssi: Int, scanRecord: ByteArray) { + + val deviceName = device.name + if (targetDeviceName != null) { + + if (deviceName == null || !deviceName.equals(targetDeviceName, ignoreCase = true)) { + return + } + } + scanCallback?.invoke(device) + } + + + @SuppressLint("MissingPermission") + fun connect(address: String, onConnectionStateChange: ((Boolean) -> Unit)? = null): Boolean { + if (address.isBlank()) { + Log.e(TAG, "Connection failed empty address") + handler.post { onConnectionStateChange?.invoke(false) } + return false + } + + try { + val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() ?: run { + Log.e(TAG, "Bluetooth adapter unavailable") + handler.post { onConnectionStateChange?.invoke(false) } + return false + } + + + bluetoothGatt?.close() + bluetoothGatt = null + + val device = bluetoothAdapter.getRemoteDevice(address) + + deviceAddress = address + connectionStateCallback = onConnectionStateChange + + + bluetoothGatt = device.connectGatt(context, false, this, BluetoothDevice.TRANSPORT_LE) + + Log.d(TAG, "Connecting to address=$address") + + + handler.postDelayed({ + if (!isConnected && deviceAddress == address) { + Log.e(TAG, "Connection timeout reconnecting") + + bluetoothGatt?.close() + bluetoothGatt = + device.connectGatt(context, false, this, BluetoothDevice.TRANSPORT_LE) + } + }, 10000) + + return true + } catch (e: Exception) { + Log.e(TAG, "Connection failed: ${e.message}") + handler.post { onConnectionStateChange?.invoke(false) } + return false + } + } + + + fun isConnected(): Boolean { + return isConnected + } + + + @SuppressLint("MissingPermission") + fun disconnect() { + bluetoothGatt?.disconnect() + } + + + @SuppressLint("MissingPermission") + fun getStatus(callback: (String) -> Unit) { + statusCallback = callback + bluetoothGatt?.let { gatt -> + val service = gatt.getService(SERVICE_UUID) + if (service != null) { + val characteristic = service.getCharacteristic(CHAR_UUID) + if (characteristic != null) { + characteristic.value = CMD_GET_STATUS.toByteArray() + gatt.writeCharacteristic(characteristic) + } else { + Log.e(TAG, "Characteristic not found") + statusCallback?.invoke("ERROR: Characteristic not found") + } + } else { + Log.e(TAG, "Service not found") + statusCallback?.invoke("ERROR: Service not found") + } + } + } + + + override fun onServicesDiscovered(gatt: BluetoothGatt, status: Int) { + super.onServicesDiscovered(gatt, status) + + if (status == BluetoothGatt.GATT_SUCCESS) { + Log.i(TAG, "Discovered GATT services") + requestMtu(gatt) + } else { + Log.w(TAG, "Service discovery failed status=$status") + + handler.post { + connectionStateCallback?.invoke(false) + } + } + } + + + @SuppressLint("MissingPermission") + private fun requestMtu(gatt: BluetoothGatt) { + try { + Log.d(TAG, "Requesting MTU size=512") + gatt.requestMtu(512) + } catch (e: Exception) { + Log.e(TAG, "MTU request failed: ${e.message}") + + enableNotification() + } + } + + + override fun onMtuChanged(gatt: BluetoothGatt, mtu: Int, status: Int) { + super.onMtuChanged(gatt, mtu, status) + + if (status == BluetoothGatt.GATT_SUCCESS) { + Log.d(TAG, "MTU set to $mtu") + } else { + Log.w(TAG, "MTU change failed status=$status") + } + + + enableNotification() + } + + + override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int) { + super.onConnectionStateChange(gatt, status, newState) + + if (status != BluetoothGatt.GATT_SUCCESS) { + Log.e(TAG, "Connection error status=$status") + isConnected = false + + + if (status == 133 || status == 8) { + Log.e(TAG, "GATT error closing connection") + try { + gatt.close() + bluetoothGatt = null + + + deviceAddress?.let { address -> + handler.postDelayed({ + Log.d(TAG, "Reconnecting to device") + val device = + BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address) + bluetoothGatt = device.connectGatt( + context, + false, + this, + BluetoothDevice.TRANSPORT_LE + ) + }, 2000) + } + } catch (e: Exception) { + Log.e(TAG, "Reconnect error: ${e.message}") + } + } + + handler.post { connectionStateCallback?.invoke(false) } + return + } + + when (newState) { + BluetoothProfile.STATE_CONNECTED -> { + isConnected = true + Log.i(TAG, "Connected to GATT server") + + handler.post { connectionStateCallback?.invoke(true) } + + + handler.postDelayed({ + try { + gatt.discoverServices() + } catch (e: Exception) { + Log.e(TAG, "Service discovery failed: ${e.message}") + } + }, 500) + } + + BluetoothProfile.STATE_DISCONNECTED -> { + isConnected = false + Log.i(TAG, "Disconnected from GATT server") + + handler.post { connectionStateCallback?.invoke(false) } + + + if (!deviceAddress.isNullOrBlank()) { + handler.postDelayed({ + Log.d(TAG, "Reconnecting after disconnect") + connect(deviceAddress!!, connectionStateCallback) + }, 3000) + } + } + } + } + + + private val dataBuffer = StringBuilder() + private val maxBufferSize = 1024 * 1024 + private var lastDataTime = 0L + + + override fun onCharacteristicChanged( + gatt: BluetoothGatt, + characteristic: BluetoothGattCharacteristic + ) { + super.onCharacteristicChanged(gatt, characteristic) + + val newData = characteristic.value?.let { + String(it, StandardCharsets.UTF_8) + } ?: return + + Log.d(TAG, "Received data len=${newData.length} preview=${newData.take(50)}") + + + dataBuffer.append(newData) + + + checkAndProcessCompleteJson() + } + + + private fun checkAndProcessCompleteJson() { + val bufferContent = dataBuffer.toString() + val currentTime = System.currentTimeMillis() + + + if (lastDataTime > 0 && currentTime - lastDataTime > 5000) { + Log.w(TAG, "Data timeout ${(currentTime - lastDataTime) / 1000}s") + + } + + Log.d(TAG, "Buffer size=${dataBuffer.length} bytes") + + + tryExtractJson(bufferContent) + + + lastDataTime = currentTime + } + + + private fun tryExtractJson(bufferContent: String) { + + val openBracesCount = bufferContent.count { it == '{' } + val closeBracesCount = bufferContent.count { it == '}' } + + + if (openBracesCount > 0 && openBracesCount == closeBracesCount) { + Log.d(TAG, "Found JSON braces=${openBracesCount}") + + + val firstOpenBrace = bufferContent.indexOf('{') + val lastCloseBrace = bufferContent.lastIndexOf('}') + + if (firstOpenBrace >= 0 && lastCloseBrace > firstOpenBrace) { + val possibleJson = bufferContent.substring(firstOpenBrace, lastCloseBrace + 1) + + if (processJsonString(possibleJson)) { + + dataBuffer.delete(0, lastCloseBrace + 1) + return + } + } + } + + + val firstOpenBrace = bufferContent.indexOf('{') + if (firstOpenBrace >= 0) { + + var openCount = 0 + var closeCount = 0 + var currentEnd = -1 + + for (i in firstOpenBrace until bufferContent.length) { + if (bufferContent[i] == '{') { + openCount++ + } else if (bufferContent[i] == '}') { + closeCount++ + if (openCount == closeCount) { + currentEnd = i + break + } + } + } + + if (currentEnd > firstOpenBrace) { + val possibleJson = bufferContent.substring(firstOpenBrace, currentEnd + 1) + Log.d(TAG, "Parsing JSON=${possibleJson.take(30)}...") + + if (processJsonString(possibleJson)) { + + dataBuffer.delete(0, currentEnd + 1) + return + } + } + } + + + if (dataBuffer.length > 1000) { + Log.w(TAG, "Large buffer ${dataBuffer.length} bytes") + + + val lastJsonStart = dataBuffer.lastIndexOf("{") + if (lastJsonStart > 0) { + dataBuffer.delete(0, lastJsonStart) + Log.d(TAG, "Kept JSON buffer=${dataBuffer.length} bytes") + } else { + + dataBuffer.delete(0, dataBuffer.length / 2) + Log.d(TAG, "Cleared buffer size=${dataBuffer.length}") + } + } + } + + + private fun processJsonString(jsonStr: String): Boolean { + try { + val jsonObject = JSONObject(jsonStr) + Log.d(TAG, "Parsed JSON len=${jsonStr.length} preview=${jsonStr.take(50)}") + + + handler.post { + statusCallback?.invoke(jsonStr) + + + if (jsonObject.has("train")) { + Log.d(TAG, "Found train data") + trainInfoCallback?.invoke(jsonObject) + } + } + + return true + } catch (e: Exception) { + Log.d(TAG, "JSON parse failed: ${e.message}") + return false + } + } + + + @SuppressLint("MissingPermission") + private fun enableNotification() { + bluetoothGatt?.let { gatt -> + try { + val service = gatt.getService(SERVICE_UUID) + if (service != null) { + val characteristic = service.getCharacteristic(CHAR_UUID) + if (characteristic != null) { + val result = gatt.setCharacteristicNotification(characteristic, true) + Log.d(TAG, "Notification set result=$result") + + try { + val descriptor = characteristic.getDescriptor( + UUID.fromString("00002902-0000-1000-8000-00805f9b34fb") + ) + if (descriptor != null) { + descriptor.value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE + val writeResult = gatt.writeDescriptor(descriptor) + Log.d(TAG, "Descriptor write result=$writeResult") + } else { + Log.e(TAG, "Descriptor not found") + + requestDataAfterDelay() + } + } catch (e: Exception) { + Log.e(TAG, "Descriptor write error: ${e.message}") + requestDataAfterDelay() + } + } else { + Log.e(TAG, "Characteristic not found") + requestDataAfterDelay() + } + } else { + Log.e(TAG, "Service not found") + requestDataAfterDelay() + } + } catch (e: Exception) { + Log.e(TAG, "Notification setup error: ${e.message}") + requestDataAfterDelay() + } + } + } + + + private fun requestDataAfterDelay() { + handler.postDelayed({ + statusCallback?.let { callback -> + getStatus(callback) + } + }, 1000) + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/MainActivity.kt b/app/src/main/java/receiver/lbj/MainActivity.kt new file mode 100644 index 0000000..755e6df --- /dev/null +++ b/app/src/main/java/receiver/lbj/MainActivity.kt @@ -0,0 +1,637 @@ +package receiver.lbj + +import android.Manifest +import android.bluetooth.BluetoothAdapter +import android.bluetooth.BluetoothDevice +import android.content.Context +import android.content.Intent +import java.io.File +import android.net.Uri +import android.os.Bundle +import android.os.Handler +import android.os.Looper +import android.util.Log +import android.widget.Toast +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.filled.LocationOn +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.core.content.FileProvider +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import org.json.JSONObject +import org.osmdroid.config.Configuration +import receiver.lbj.model.TrainRecord +import receiver.lbj.model.TrainRecordManager +import receiver.lbj.ui.screens.HistoryScreen +import receiver.lbj.ui.screens.MapScreen +import receiver.lbj.ui.screens.SettingsScreen +import receiver.lbj.ui.screens.MapScreen +import receiver.lbj.ui.theme.LBJReceiverTheme +import receiver.lbj.util.LocoInfoUtil +import java.util.* +import androidx.lifecycle.lifecycleScope +import androidx.lifecycle.viewModelScope +import android.bluetooth.le.ScanCallback +import android.bluetooth.le.ScanResult + +class MainActivity : ComponentActivity() { + private val TAG = "MainActivity" + private val bleClient by lazy { BLEClient(this) } + private val trainRecordManager by lazy { TrainRecordManager(this) } + private val locoInfoUtil by lazy { LocoInfoUtil(this) } + + + private var deviceStatus by mutableStateOf("未连接") + private var deviceAddress by mutableStateOf("") + private var isScanning by mutableStateOf(false) + private var foundDevices by mutableStateOf(listOf()) + private var scanResults = mutableListOf() + private var currentTab by mutableStateOf(0) + private var showConnectionDialog by mutableStateOf(false) + private var lastUpdateTime by mutableStateOf(null) + private var latestRecord by mutableStateOf(null) + private var recentRecords by mutableStateOf>(emptyList()) + + + private var filterTrain by mutableStateOf("") + private var filterRoute by mutableStateOf("") + private var filterDirection by mutableStateOf("全部") + + + private var settingsDeviceName by mutableStateOf("LBJReceiver") + private var temporaryStatusMessage by mutableStateOf(null) + + + private var targetDeviceName = "LBJReceiver" + + + private val requestPermissions = registerForActivityResult( + ActivityResultContracts.RequestMultiplePermissions() + ) { permissions -> + + val bluetoothPermissionsGranted = permissions.filter { it.key.contains("BLUETOOTH") }.all { it.value } + val locationPermissionsGranted = permissions.filter { it.key.contains("LOCATION") }.all { it.value } + + if (bluetoothPermissionsGranted && locationPermissionsGranted) { + Log.d(TAG, "Permissions granted") + + startScan() + } else { + Log.e(TAG, "Missing permissions: $permissions") + deviceStatus = "需要蓝牙和位置权限" + } + } + + + private val scanCallback = object : ScanCallback() { + override fun onScanResult(callbackType: Int, result: ScanResult) { + val device = result.device + val deviceName = device.name ?: "未知设备" + val deviceAddress = device.address + + Log.d(TAG, "Found device name=$deviceName address=$deviceAddress") + + val existingDevice = scanResults.find { it.device.address == deviceAddress } + if (existingDevice == null) { + scanResults.add(result) + updateDeviceList() + + + if (deviceName == targetDeviceName) { + Log.d(TAG, "Found target=$targetDeviceName, connecting") + bleClient.stopScan() + connectToDevice(device) + showConnectionDialog = false + } + } + } + + override fun onScanFailed(errorCode: Int) { + Log.e(TAG, "BLE scan failed code=$errorCode") + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + + requestPermissions.launch(arrayOf( + Manifest.permission.BLUETOOTH, + Manifest.permission.BLUETOOTH_ADMIN, + Manifest.permission.BLUETOOTH_CONNECT, + Manifest.permission.BLUETOOTH_SCAN, + Manifest.permission.ACCESS_FINE_LOCATION, + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.WRITE_EXTERNAL_STORAGE, + Manifest.permission.READ_EXTERNAL_STORAGE + )) + + + bleClient.setTrainInfoCallback { jsonData -> + handleTrainInfo(jsonData) + } + + + lifecycleScope.launch { + try { + locoInfoUtil.loadLocoData() + Log.d(TAG, "Loaded locomotive data") + } catch (e: Exception) { + Log.e(TAG, "Load locomotive data failed", e) + } + } + + + try { + + val osmCacheDir = File(cacheDir, "osm").apply { mkdirs() } + val tileCache = File(osmCacheDir, "tiles").apply { mkdirs() } + + + Configuration.getInstance().apply { + userAgentValue = packageName + load(this@MainActivity, getSharedPreferences("osmdroid", Context.MODE_PRIVATE)) + osmdroidBasePath = osmCacheDir + osmdroidTileCache = tileCache + expirationOverrideDuration = 86400000L * 7 + tileDownloadThreads = 2 + tileFileSystemThreads = 2 + + setUserAgentValue("LBJReceiver/1.0") + } + + Log.d(TAG, "OSM cache configured") + } catch (e: Exception) { + Log.e(TAG, "OSM cache config failed", e) + } + + enableEdgeToEdge() + setContent { + LBJReceiverTheme { + val scope = rememberCoroutineScope() + + Surface(modifier = Modifier.fillMaxSize()) { + MainContent( + deviceStatus = deviceStatus, + isConnected = bleClient.isConnected(), + isScanning = isScanning, + currentTab = currentTab, + onTabChange = { tab -> currentTab = tab }, + onConnectClick = { showConnectionDialog = true }, + + + latestRecord = latestRecord, + recentRecords = recentRecords, + lastUpdateTime = lastUpdateTime, + temporaryStatusMessage = temporaryStatusMessage, + onRecordClick = { record -> + Log.d(TAG, "Record clicked train=${record.train}") + }, + onClearMonitorLog = { + recentRecords = emptyList() + temporaryStatusMessage = null + }, + + + allRecords = if (trainRecordManager.getFilteredRecords().isNotEmpty()) + trainRecordManager.getFilteredRecords() else trainRecordManager.getAllRecords(), + recordCount = trainRecordManager.getRecordCount(), + filterTrain = filterTrain, + filterRoute = filterRoute, + filterDirection = filterDirection, + onFilterChange = { train, route, direction -> + filterTrain = train + filterRoute = route + filterDirection = direction + trainRecordManager.setFilter(train, route, direction) + }, + onClearFilter = { + filterTrain = "" + filterRoute = "" + filterDirection = "全部" + trainRecordManager.clearFilter() + }, + onClearRecords = { + scope.launch { + trainRecordManager.clearRecords() + recentRecords = emptyList() + latestRecord = null + temporaryStatusMessage = null + } + }, + onExportRecords = { + scope.launch { + exportRecordsToCSV() + } + }, + onDeleteRecords = { records -> + scope.launch { + val deletedCount = trainRecordManager.deleteRecords(records) + if (deletedCount > 0) { + Toast.makeText( + this@MainActivity, + "已删除 $deletedCount 条记录", + Toast.LENGTH_SHORT + ).show() + + if (records.contains(latestRecord)) { + latestRecord = null + } + } + } + }, + + + deviceName = settingsDeviceName, + onDeviceNameChange = { newName -> settingsDeviceName = newName }, + onApplySettings = { + + + Toast.makeText(this, "设备名称 '${settingsDeviceName}' 已保存,下次连接时生效", Toast.LENGTH_LONG).show() + Log.d(TAG, "Applied settings deviceName=${settingsDeviceName}") + }, + locoInfoUtil = locoInfoUtil + ) + + + + + } + } + } + } + + + private fun connectToDevice(device: BluetoothDevice) { + deviceStatus = "正在连接..." + Log.d(TAG, "Connecting to device name=${device.name ?: "Unknown"} address=${device.address}") + + bleClient.connect(device.address) { connected -> + if (connected) { + deviceStatus = "已连接" + Log.d(TAG, "Connected to device name=${device.name ?: "Unknown"}") + } else { + deviceStatus = "连接失败或已断开连接" + Log.e(TAG, "Connection failed name=${device.name ?: "Unknown"}") + } + } + + deviceAddress = device.address + stopScan() + } + + + private fun handleTrainInfo(jsonData: JSONObject) { + Log.d(TAG, "Received train data=${jsonData.toString().take(50)}...") + + runOnUiThread { + try { + val isTestData = jsonData.optBoolean("test_flag", false) + lastUpdateTime = Date() + + if (isTestData) { + Log.i(TAG, "Received keep-alive signal") + forceUiRefresh() + } else { + temporaryStatusMessage = null + + val record = trainRecordManager.addRecord(jsonData) + Log.d(TAG, "Added record train=${record.train} direction=${record.direction}") + + + latestRecord = record + + val newList = mutableListOf() + newList.add(record) + newList.addAll(recentRecords.filterNot { it.train == record.train && it.time == record.time }) + recentRecords = newList.take(10) + + Log.d(TAG, "Updated UI train=${record.train}") + forceUiRefresh() + } + + } catch (e: Exception) { + Log.e(TAG, "Train data error: ${e.message}") + e.printStackTrace() + temporaryStatusMessage = null + + forceUiRefresh() + } + } + } + + + private fun forceUiRefresh() { + Log.d(TAG, "Refreshing UI train=${latestRecord?.train}") + } + + + private fun exportRecordsToCSV() { + val records = trainRecordManager.getFilteredRecords() + val file = trainRecordManager.exportToCsv(records) + if (file != null) { + try { + + val uri = FileProvider.getUriForFile( + this, + "${applicationContext.packageName}.provider", + file + ) + val intent = Intent(Intent.ACTION_SEND) + intent.type = "text/csv" + intent.putExtra(Intent.EXTRA_STREAM, uri) + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) + startActivity(Intent.createChooser(intent, "分享CSV文件")) + } catch (e: Exception) { + Log.e(TAG, "CSV export failed: ${e.message}") + Toast.makeText(this, "导出失败: ${e.message}", Toast.LENGTH_SHORT).show() + } + } else { + Toast.makeText(this, "导出CSV文件失败", Toast.LENGTH_SHORT).show() + } + } + + + private fun updateTemporaryStatusMessage(message: String) { + temporaryStatusMessage = message + + Handler(Looper.getMainLooper()).postDelayed({ + if (temporaryStatusMessage == message) { + temporaryStatusMessage = null + } + }, 3000) + } + + + private fun startScan() { + isScanning = true + foundDevices = emptyList() + val targetDeviceName = settingsDeviceName.ifBlank { null } + Log.d(TAG, "Starting BLE scan target=${targetDeviceName ?: "Any"}") + + bleClient.scanDevices(targetDeviceName) { device -> + if (!foundDevices.any { it.address == device.address }) { + Log.d(TAG, "Found device name=${device.name ?: "Unknown"} address=${device.address}") + foundDevices = foundDevices + device + + if (targetDeviceName != null && device.name == targetDeviceName) { + Log.d(TAG, "Found target=$targetDeviceName, connecting") + stopScan() + connectToDevice(device) + } else if (!foundDevices.any { it.address == device.address }) { + showConnectionDialog = true + } + } + } + } + + + private fun stopScan() { + isScanning = false + bleClient.stopScan() + Log.d(TAG, "Stopped BLE scan") + } + + + private fun updateDeviceList() { + foundDevices = scanResults.map { it.device } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun MainContent( + deviceStatus: String, + isConnected: Boolean, + isScanning: Boolean, + currentTab: Int, + onTabChange: (Int) -> Unit, + onConnectClick: () -> Unit, + + + latestRecord: TrainRecord?, + recentRecords: List, + lastUpdateTime: Date?, + temporaryStatusMessage: String? = null, + onRecordClick: (TrainRecord) -> Unit, + onClearMonitorLog: () -> Unit, + + + allRecords: List, + recordCount: Int, + filterTrain: String, + filterRoute: String, + filterDirection: String, + onFilterChange: (String, String, String) -> Unit, + onClearFilter: () -> Unit, + onClearRecords: () -> Unit, + onExportRecords: () -> Unit, + onDeleteRecords: (List) -> Unit, + + + deviceName: String, + onDeviceNameChange: (String) -> Unit, + onApplySettings: () -> Unit, + + + locoInfoUtil: LocoInfoUtil +) { + val statusColor = if (isConnected) Color(0xFF4CAF50) else Color(0xFFFF5722) + + + val timeSinceLastUpdate = remember { mutableStateOf(null) } + LaunchedEffect(key1 = lastUpdateTime) { + if (lastUpdateTime != null) { + while (true) { + val now = Date() + val diffInSec = (now.time - lastUpdateTime.time) / 1000 + timeSinceLastUpdate.value = when { + diffInSec < 60 -> "${diffInSec}秒前" + diffInSec < 3600 -> "${diffInSec / 60}分钟前" + else -> "${diffInSec / 3600}小时前" + } + delay(1000) + } + } else { + timeSinceLastUpdate.value = null + } + } + + Scaffold( + topBar = { + TopAppBar( + title = { Text("LBJReceiver") }, + actions = { + + timeSinceLastUpdate.value?.let { time -> + Text( + text = time, + modifier = Modifier.padding(end = 8.dp), + style = MaterialTheme.typography.bodySmall + ) + } + + Box( + modifier = Modifier + .size(10.dp) + .background( + color = statusColor, + shape = CircleShape + ) + ) + + Spacer(modifier = Modifier.width(8.dp)) + + IconButton(onClick = onConnectClick) { + Icon( + imageVector = Icons.Default.Bluetooth, + contentDescription = "连接蓝牙设备" + ) + } + } + ) + }, + bottomBar = { + NavigationBar { + NavigationBarItem( + selected = currentTab == 0, + onClick = { onTabChange(0) }, + icon = { Icon(Icons.Filled.DirectionsRailway, "记录") }, + label = { Text("列车记录") } + ) + + NavigationBarItem( + selected = currentTab == 3, + onClick = { onTabChange(3) }, + icon = { Icon(Icons.Filled.LocationOn, "地图") }, + label = { Text("位置地图") } + ) + + NavigationBarItem( + selected = currentTab == 2, + onClick = { onTabChange(2) }, + icon = { Icon(Icons.Filled.Settings, "设置") }, + label = { Text("设置") } + ) + } + } + ) { paddingValues -> + Box( + modifier = Modifier + .fillMaxSize() + .padding(paddingValues) + ) { + when (currentTab) { + 0 -> HistoryScreen( + records = allRecords, + latestRecord = latestRecord, + lastUpdateTime = lastUpdateTime, + temporaryStatusMessage = temporaryStatusMessage, + locoInfoUtil = locoInfoUtil, + onClearRecords = onClearRecords, + onExportRecords = onExportRecords, + onRecordClick = onRecordClick, + onClearLog = onClearMonitorLog, + onDeleteRecords = onDeleteRecords + ) + 2 -> SettingsScreen( + deviceName = deviceName, + onDeviceNameChange = onDeviceNameChange, + onApplySettings = onApplySettings, + ) + 3 -> MapScreen( + records = if (allRecords.isNotEmpty()) allRecords else recentRecords, + onCenterMap = {} + ) + } + } + } +} + +@Composable +fun ConnectionDialog( + isScanning: Boolean, + devices: List, + onDismiss: () -> Unit, + onScan: () -> Unit, + onConnect: (BluetoothDevice) -> Unit +) { + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("连接设备") }, + text = { + Column(modifier = Modifier.fillMaxWidth()) { + Button( + onClick = onScan, + modifier = Modifier.fillMaxWidth() + ) { + Text(if (isScanning) "停止扫描" else "扫描设备") + } + + Spacer(modifier = Modifier.height(8.dp)) + + if (isScanning) { + LinearProgressIndicator(modifier = Modifier.fillMaxWidth()) + Spacer(modifier = Modifier.height(8.dp)) + } + + if (devices.isEmpty()) { + Text("未找到设备") + } else { + Column { + devices.forEach { device -> + Card( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 4.dp) + .clickable { onConnect(device) } + ) { + Column( + modifier = Modifier.padding(8.dp) + ) { + Text( + text = device.name ?: "未知设备", + fontWeight = FontWeight.Bold + ) + Text( + text = device.address, + style = MaterialTheme.typography.bodySmall + ) + } + } + } + } + } + } + }, + confirmButton = { + TextButton(onClick = onDismiss) { + Text("取消") + } + } + ) +} + + +fun Date.toSimpleFormat(): String { + val sdf = java.text.SimpleDateFormat("HH:mm:ss", Locale.getDefault()) + return sdf.format(this) +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/model/TrainRecord.kt b/app/src/main/java/receiver/lbj/model/TrainRecord.kt new file mode 100644 index 0000000..3edf3a8 --- /dev/null +++ b/app/src/main/java/receiver/lbj/model/TrainRecord.kt @@ -0,0 +1,152 @@ +package receiver.lbj.model + +import android.util.Log +import org.json.JSONObject +import java.text.SimpleDateFormat +import java.util.* +import org.osmdroid.util.GeoPoint +import receiver.lbj.util.LocationUtils + +class TrainRecord(jsonData: JSONObject? = null) { + companion object { + const val TAG = "TrainRecord" + } + + var timestamp: Date = Date() + var train: String = "" + var direction: Int = 0 + var speed: String = "" + var position: String = "" + var time: String = "" + var loco: String = "" + var locoType: String = "" + var lbjClass: String = "" + var route: String = "" + var positionInfo: String = "" + var rssi: Double = 0.0 + + + private var _coordinates: GeoPoint? = null + + init { + jsonData?.let { + try { + if (jsonData.has("timestamp")) { + + timestamp = Date(jsonData.getLong("timestamp")) + } + updateFromJson(it) + } catch (e: Exception) { + Log.e(TAG, "Failed to initialize TrainRecord from JSON: ${e.message}") + } + } + } + + fun updateFromJson(jsonData: JSONObject) { + try { + Log.d(TAG, "Parsing JSON: ${jsonData.toString().take(100)}...") + + train = jsonData.optString("train", "") + direction = jsonData.optInt("dir", 0) + speed = jsonData.optString("speed", "") + position = jsonData.optString("pos", "") + time = jsonData.optString("time", "") + loco = jsonData.optString("loco", "") + locoType = jsonData.optString("loco_type", "") + lbjClass = jsonData.optString("lbj_class", "") + route = jsonData.optString("route", "") + positionInfo = jsonData.optString("position_info", "") + rssi = jsonData.optDouble("rssi", 0.0) + + + _coordinates = null + + Log.d(TAG, "Successfully parsed: train=$train, dir=$direction, speed=$speed") + } catch (e: Exception) { + Log.e(TAG, "JSON parse error: ${e.message}", e) + + + try { train = jsonData.optString("train", "") } catch (e: Exception) { } + try { direction = jsonData.optInt("dir", 0) } catch (e: Exception) { } + try { speed = jsonData.optString("speed", "") } catch (e: Exception) { } + try { position = jsonData.optString("pos", "") } catch (e: Exception) { } + try { time = jsonData.optString("time", "") } catch (e: Exception) { } + + Log.d(TAG, "Attempting field-level parse: train=$train, dir=$direction") + } + } + + + fun getCoordinates(): GeoPoint? { + + if (_coordinates != null) { + return _coordinates + } + + + _coordinates = LocationUtils.parsePositionInfo(positionInfo) + return _coordinates + } + private fun isValidValue(value: String): Boolean { + val trimmed = value.trim() + return trimmed.isNotEmpty() && + trimmed != "NUL" && + trimmed != "" && + trimmed != "NA" && + trimmed != "" && + !trimmed.all { it == '*' } + } + + fun toMap(): Map { + val directionText = when (direction) { + 1 -> "下行" + 3 -> "上行" + else -> "未知" + } + + + val trainDisplay = if (isValidValue(lbjClass) && isValidValue(train)) { + "${lbjClass.trim()}${train.trim()}" + } else if (isValidValue(lbjClass)) { + lbjClass.trim() + } else if (isValidValue(train)) { + train.trim() + } else "" + + val map = mutableMapOf() + + + if (trainDisplay.isNotEmpty()) map["train"] = trainDisplay + if (directionText != "未知") map["direction"] = directionText + if (isValidValue(speed)) map["speed"] = "速度: ${speed.trim()} km/h" + if (isValidValue(position)) map["position"] = "位置: ${position.trim()} km" + if (isValidValue(time)) map["time"] = "列车时间: ${time.trim()}" + if (isValidValue(loco)) map["loco"] = "机车号: ${loco.trim()}" + if (isValidValue(locoType)) map["loco_type"] = "型号: ${locoType.trim()}" + if (isValidValue(route)) map["route"] = "线路: ${route.trim()}" + if (isValidValue(positionInfo) && !positionInfo.trim().matches(Regex(".*(|\\s)*.*"))) { + map["position_info"] = "位置信息: ${positionInfo.trim()}" + } + if (rssi != 0.0) map["rssi"] = "信号强度: $rssi dBm" + + return map + } + + + fun toJSON(): JSONObject { + val json = JSONObject() + json.put("timestamp", timestamp.time) + json.put("train", train) + json.put("dir", direction) + json.put("speed", speed) + json.put("pos", position) + json.put("time", time) + json.put("loco", loco) + json.put("loco_type", locoType) + json.put("lbj_class", lbjClass) + json.put("route", route) + json.put("position_info", positionInfo) + json.put("rssi", rssi) + return json + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/model/TrainRecordManager.kt b/app/src/main/java/receiver/lbj/model/TrainRecordManager.kt new file mode 100644 index 0000000..3acdbc8 --- /dev/null +++ b/app/src/main/java/receiver/lbj/model/TrainRecordManager.kt @@ -0,0 +1,216 @@ +package receiver.lbj.model + +import android.content.Context +import android.content.SharedPreferences +import android.os.Environment +import android.util.Log +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.io.FileWriter +import java.text.SimpleDateFormat +import java.util.* +import java.util.concurrent.CopyOnWriteArrayList +import java.util.concurrent.atomic.AtomicInteger + +class TrainRecordManager(private val context: Context) { + companion object { + const val TAG = "TrainRecordManager" + const val MAX_RECORDS = 1000 + private const val PREFS_NAME = "train_records" + private const val KEY_RECORDS = "records" + } + + + private val trainRecords = CopyOnWriteArrayList() + private val recordCount = AtomicInteger(0) + private val prefs: SharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) + + init { + loadRecords() + } + + + private var filterTrain: String = "" + private var filterRoute: String = "" + private var filterDirection: String = "全部" + + + fun addRecord(jsonData: JSONObject): TrainRecord { + val record = TrainRecord(jsonData) + trainRecords.add(0, record) + + + while (trainRecords.size > MAX_RECORDS) { + trainRecords.removeAt(trainRecords.size - 1) + } + + recordCount.incrementAndGet() + saveRecords() + return record + } + + + fun getAllRecords(): List { + return trainRecords + } + + + fun getFilteredRecords(): List { + if (filterTrain.isEmpty() && filterRoute.isEmpty() && filterDirection == "全部") { + return trainRecords + } + + return trainRecords.filter { record -> + matchFilter(record) + } + } + + + private fun matchFilter(record: TrainRecord): Boolean { + + if (filterTrain.isNotEmpty() && !record.train.contains(filterTrain)) { + return false + } + + + if (filterRoute.isNotEmpty() && !record.route.contains(filterRoute)) { + return false + } + + + if (filterDirection != "全部") { + val dirText = when (record.direction) { + 1 -> "下行" + 3 -> "上行" + else -> "未知" + } + if (dirText != filterDirection) { + return false + } + } + + return true + } + + + fun setFilter(train: String, route: String, direction: String) { + filterTrain = train + filterRoute = route + filterDirection = direction + } + + + fun clearFilter() { + filterTrain = "" + filterRoute = "" + filterDirection = "全部" + } + + + fun clearRecords() { + trainRecords.clear() + recordCount.set(0) + saveRecords() + } + + fun deleteRecord(record: TrainRecord): Boolean { + val result = trainRecords.remove(record) + if (result) { + recordCount.decrementAndGet() + saveRecords() + } + return result + } + + fun deleteRecords(records: List): Int { + var deletedCount = 0 + records.forEach { record -> + if (trainRecords.remove(record)) { + deletedCount++ + } + } + + if (deletedCount > 0) { + recordCount.addAndGet(-deletedCount) + saveRecords() + } + return deletedCount + } + + private fun saveRecords() { + try { + val jsonArray = JSONArray() + for (record in trainRecords) { + jsonArray.put(record.toJSON()) + } + prefs.edit().putString(KEY_RECORDS, jsonArray.toString()).apply() + Log.d(TAG, "Saved ${trainRecords.size} records") + } catch (e: Exception) { + Log.e(TAG, "Failed to save records: ${e.message}") + } + } + + + private fun loadRecords() { + try { + val jsonStr = prefs.getString(KEY_RECORDS, "[]") + val jsonArray = JSONArray(jsonStr) + trainRecords.clear() + + for (i in 0 until jsonArray.length()) { + val jsonObject = jsonArray.getJSONObject(i) + trainRecords.add(TrainRecord(jsonObject)) + } + + recordCount.set(trainRecords.size) + Log.d(TAG, "Loaded ${trainRecords.size} records") + } catch (e: Exception) { + Log.e(TAG, "Failed to load records: ${e.message}") + } + } + + + fun exportToCsv(records: List): File? { + try { + val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) + val fileName = "train_records_$timeStamp.csv" + + + val downloadsDir = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS) + val file = File(downloadsDir, fileName) + + FileWriter(file).use { writer -> + + writer.append("时间戳,列车号,列车类型,方向,速度,位置,时间,机车号,机车类型,路线,位置信息,信号强度\n") + + + for (record in records) { + val map = record.toMap() + writer.append(map["timestamp"]).append(",") + writer.append(map["train"]).append(",") + writer.append(map["lbj_class"]).append(",") + writer.append(map["direction"]).append(",") + writer.append(map["speed"]?.replace(" km/h", "") ?: "").append(",") + writer.append(map["position"]?.replace(" km", "") ?: "").append(",") + writer.append(map["time"]).append(",") + writer.append(map["loco"]).append(",") + writer.append(map["loco_type"]).append(",") + writer.append(map["route"]).append(",") + writer.append(map["position_info"]).append(",") + writer.append(map["rssi"]?.replace(" dBm", "") ?: "").append("\n") + } + } + + return file + } catch (e: Exception) { + Log.e(TAG, "Error exporting to CSV: ${e.message}") + return null + } + } + + + fun getRecordCount(): Int { + return recordCount.get() + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/components/TrainDetailDialog.kt b/app/src/main/java/receiver/lbj/ui/components/TrainDetailDialog.kt new file mode 100644 index 0000000..8038569 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/components/TrainDetailDialog.kt @@ -0,0 +1,172 @@ +package receiver.lbj.ui.components + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.viewinterop.AndroidView +import androidx.compose.ui.window.Dialog +import androidx.compose.ui.window.DialogProperties +import org.osmdroid.tileprovider.tilesource.TileSourceFactory +import org.osmdroid.views.MapView +import org.osmdroid.views.overlay.Marker +import receiver.lbj.model.TrainRecord + +@Composable +fun TrainDetailDialog( + trainRecord: TrainRecord, + onDismiss: () -> Unit +) { + val recordMap = trainRecord.toMap() + val coordinates = remember { trainRecord.getCoordinates() } + + Dialog( + onDismissRequest = onDismiss, + properties = DialogProperties( + dismissOnBackPress = true, + dismissOnClickOutside = true + ) + ) { + Card( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + elevation = CardDefaults.cardElevation(defaultElevation = 8.dp) + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp) + .verticalScroll(rememberScrollState()) + ) { + + Text( + text = "列车详情", + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(bottom = 16.dp) + ) + + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + DetailItem("列车号", recordMap["train"] ?: "--") + DetailItem("方向", recordMap["direction"] ?: "未知") + } + + Divider(modifier = Modifier.padding(vertical = 8.dp)) + + + DetailItem("接收时间", recordMap["timestamp"] ?: "--") + DetailItem("列车时间", recordMap["time"] ?: "--") + + Divider(modifier = Modifier.padding(vertical = 8.dp)) + + + DetailItem("速度", recordMap["speed"] ?: "--") + DetailItem("位置", recordMap["position"] ?: "--") + DetailItem("位置信息", recordMap["position_info"] ?: "--") + + Divider(modifier = Modifier.padding(vertical = 8.dp)) + + + DetailItem("机车号", recordMap["loco"] ?: "--") + DetailItem("机车类型", recordMap["loco_type"] ?: "--") + DetailItem("列车类型", recordMap["lbj_class"] ?: "--") + + Divider(modifier = Modifier.padding(vertical = 8.dp)) + + + DetailItem("路线", recordMap["route"] ?: "--") + DetailItem("信号强度", recordMap["rssi"] ?: "--") + + if (coordinates != null) { + Divider(modifier = Modifier.padding(vertical = 8.dp)) + + DetailItem( + label = "经纬度", + value = "纬度: ${coordinates.latitude}, 经度: ${coordinates.longitude}" + ) + + + Spacer(modifier = Modifier.height(8.dp)) + + + Box( + modifier = Modifier + .fillMaxWidth() + .height(200.dp) + .padding(vertical = 8.dp), + contentAlignment = Alignment.Center + ) { + AndroidView( + factory = { context -> + MapView(context).apply { + setTileSource(TileSourceFactory.MAPNIK) + setMultiTouchControls(true) + controller.setZoom(15.0) + controller.setCenter(coordinates) + + + val marker = Marker(this) + marker.position = coordinates + marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM) + marker.title = recordMap["train"] ?: "列车" + overlays.add(marker) + } + }, + update = { mapView -> + mapView.controller.setCenter(coordinates) + mapView.invalidate() + } + ) + } + } + + Spacer(modifier = Modifier.height(16.dp)) + + + Button( + onClick = onDismiss, + modifier = Modifier + .fillMaxWidth() + .padding(top = 8.dp) + ) { + Text("关闭") + } + } + } + } +} + +@Composable +private fun DetailItem( + label: String, + value: String, + modifier: Modifier = Modifier +) { + Column( + modifier = modifier + .fillMaxWidth() + .padding(vertical = 4.dp) + ) { + Text( + text = label, + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + + Text( + text = value, + style = MaterialTheme.typography.bodyLarge + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/components/TrainInfoCard.kt b/app/src/main/java/receiver/lbj/ui/components/TrainInfoCard.kt new file mode 100644 index 0000000..2b138de --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/components/TrainInfoCard.kt @@ -0,0 +1,141 @@ +package receiver.lbj.ui.components + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.material3.HorizontalDivider +import receiver.lbj.model.TrainRecord + +@Composable +fun TrainInfoCard( + trainRecord: TrainRecord, + modifier: Modifier = Modifier +) { + val recordMap = trainRecord.toMap() + + Card( + modifier = modifier + .fillMaxWidth() + .padding(vertical = 4.dp, horizontal = 6.dp), + elevation = CardDefaults.cardElevation(defaultElevation = 2.dp) + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(10.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Row( + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = recordMap["train"]?.toString() ?: "", + fontWeight = FontWeight.Bold, + fontSize = 16.sp + ) + + Spacer(modifier = Modifier.width(4.dp)) + + val directionStr = recordMap["direction"]?.toString() ?: "" + val directionColor = when(directionStr) { + "上行" -> MaterialTheme.colorScheme.primary + "下行" -> MaterialTheme.colorScheme.secondary + else -> MaterialTheme.colorScheme.onSurface + } + + Surface( + shape = RoundedCornerShape(4.dp), + color = directionColor.copy(alpha = 0.1f), + modifier = Modifier.padding(horizontal = 2.dp) + ) { + Text( + text = directionStr, + modifier = Modifier.padding(horizontal = 4.dp, vertical = 2.dp), + fontSize = 12.sp, + color = directionColor + ) + } + } + + Text( + text = recordMap["timestamp"]?.toString()?.split(" ")?.getOrNull(1) ?: "", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + + Spacer(modifier = Modifier.height(4.dp)) + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + Text( + text = "速度: ${recordMap["speed"] ?: ""}", + fontSize = 14.sp, + fontWeight = FontWeight.Medium + ) + + Text( + text = "位置: ${recordMap["position"] ?: ""}", + fontSize = 14.sp, + fontWeight = FontWeight.Medium + ) + } + + Spacer(modifier = Modifier.height(4.dp)) + HorizontalDivider(thickness = 0.5.dp) + Spacer(modifier = Modifier.height(4.dp)) + + Row( + modifier = Modifier.fillMaxWidth() + ) { + Column(modifier = Modifier.weight(1f)) { + CompactInfoItem(label = "机车号", value = recordMap["loco"]?.toString() ?: "") + CompactInfoItem(label = "线路", value = recordMap["route"]?.toString() ?: "") + } + + Column(modifier = Modifier.weight(1f)) { + CompactInfoItem(label = "类型", value = recordMap["lbj_class"]?.toString() ?: "") + CompactInfoItem(label = "信号", value = recordMap["rssi"]?.toString() ?: "") + } + } + } + } +} + +@Composable +private fun CompactInfoItem( + label: String, + value: String, + modifier: Modifier = Modifier +) { + Row( + modifier = modifier + .fillMaxWidth() + .padding(vertical = 2.dp) + ) { + Text( + text = "$label: ", + fontWeight = FontWeight.Medium, + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + + Text( + text = value, + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/components/TrainRecordsList.kt b/app/src/main/java/receiver/lbj/ui/components/TrainRecordsList.kt new file mode 100644 index 0000000..06cbb5b --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/components/TrainRecordsList.kt @@ -0,0 +1,339 @@ +package receiver.lbj.ui.components + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Clear +import androidx.compose.material.icons.filled.FilterList +import androidx.compose.material.icons.filled.Share +import androidx.compose.material3.* +import androidx.compose.material3.TopAppBarDefaults.topAppBarColors +import androidx.compose.runtime.* +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import receiver.lbj.model.TrainRecord +import java.text.SimpleDateFormat +import java.util.* + +@Composable +fun TrainRecordsList( + records: List, + onRecordClick: (TrainRecord) -> Unit, + modifier: Modifier = Modifier +) { + Box( + modifier = modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + if (records.isEmpty()) { + Text( + text = "暂无历史记录", + modifier = Modifier.padding(16.dp), + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } else { + LazyColumn( + modifier = Modifier.fillMaxSize(), + contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp) + ) { + items(records) { record -> + Card( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 2.dp) + .clickable { onRecordClick(record) }, + elevation = CardDefaults.cardElevation(defaultElevation = 1.dp) + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(8.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + + Column { + Row( + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = record.train, + fontWeight = FontWeight.Bold, + fontSize = 15.sp + ) + + Spacer(modifier = Modifier.width(4.dp)) + + + val directionText = when (record.direction) { + 1 -> "下行" + 3 -> "上行" + else -> "未知" + } + + val directionColor = when(record.direction) { + 1 -> MaterialTheme.colorScheme.secondary + 3 -> MaterialTheme.colorScheme.primary + else -> MaterialTheme.colorScheme.onSurface + } + + Surface( + color = directionColor.copy(alpha = 0.1f), + shape = MaterialTheme.shapes.small + ) { + Text( + text = directionText, + modifier = Modifier.padding(horizontal = 4.dp, vertical = 1.dp), + fontSize = 11.sp, + color = directionColor + ) + } + } + + Spacer(modifier = Modifier.height(2.dp)) + + + Text( + text = "位置: ${record.position} km", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + + + Column( + horizontalAlignment = Alignment.End + ) { + Text( + text = "${record.speed} km/h", + fontWeight = FontWeight.Medium, + fontSize = 14.sp + ) + + Spacer(modifier = Modifier.height(2.dp)) + + + val timeStr = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(record.timestamp) + Text( + text = timeStr, + fontSize = 11.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + } + } + } + } + } +} + +@Composable +fun TrainRecordsListWithToolbar( + records: List, + onRecordClick: (TrainRecord) -> Unit, + onFilterClick: () -> Unit, + onExportClick: () -> Unit, + onClearClick: () -> Unit, + onDeleteRecords: (List) -> Unit, + modifier: Modifier = Modifier +) { + var selectedRecords by remember { mutableStateOf>(mutableSetOf()) } + var selectionMode by remember { mutableStateOf(false) } + + Column(modifier = modifier.fillMaxSize()) { + + @OptIn(ExperimentalMaterial3Api::class) + Surface( + modifier = Modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surface, + tonalElevation = 3.dp, + shadowElevation = 3.dp + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 12.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = if (selectionMode) "已选择 ${selectedRecords.size} 条" else "历史记录 (${records.size})", + style = MaterialTheme.typography.titleMedium + ) + + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + if (selectionMode) { + TextButton( + onClick = { + if (selectedRecords.isNotEmpty()) { + onDeleteRecords(selectedRecords.toList()) + } + selectionMode = false + selectedRecords = mutableSetOf() + }, + colors = ButtonDefaults.textButtonColors( + contentColor = MaterialTheme.colorScheme.error + ) + ) { + Text("删除") + } + TextButton(onClick = { + selectionMode = false + selectedRecords = mutableSetOf() + }) { + Text("取消") + } + } else { + IconButton(onClick = onFilterClick) { + Icon( + imageVector = Icons.Default.FilterList, + contentDescription = "筛选" + ) + } + IconButton(onClick = onExportClick) { + Icon( + imageVector = Icons.Default.Share, + contentDescription = "导出" + ) + } + } + } + } + } + + + LazyColumn( + modifier = Modifier.weight(1f), + contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp), + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + items(records.chunked(2)) { rowRecords -> + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 4.dp), + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + rowRecords.forEach { record -> + val isSelected = selectedRecords.contains(record) + Card( + modifier = Modifier + .weight(1f) + .clickable { + if (selectionMode) { + if (isSelected) { + selectedRecords.remove(record) + } else { + selectedRecords.add(record) + } + if (selectedRecords.isEmpty()) { + selectionMode = false + } + } else { + onRecordClick(record) + } + } + .padding(vertical = 2.dp), + elevation = CardDefaults.cardElevation(defaultElevation = 1.dp) + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(8.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + + Column(modifier = Modifier.weight(1f)) { + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.fillMaxWidth() + ) { + if (selectionMode) { + Checkbox( + checked = isSelected, + onCheckedChange = { checked -> + if (checked) { + selectedRecords.add(record) + } else { + selectedRecords.remove(record) + } + if (selectedRecords.isEmpty()) { + selectionMode = false + } + }, + modifier = Modifier.padding(end = 8.dp) + ) + } + + Text( + text = record.train, + fontWeight = FontWeight.Bold, + fontSize = 15.sp, + modifier = Modifier.weight(1f) + ) + + if (!selectionMode) { + IconButton( + onClick = { + selectionMode = true + selectedRecords = mutableSetOf(record) + }, + modifier = Modifier.size(32.dp) + ) { + Icon( + imageVector = Icons.Default.Clear, + contentDescription = "删除", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.error + ) + } + } + } + + if (record.speed.isNotEmpty() || record.position.isNotEmpty()) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + if (record.speed.isNotEmpty()) { + Text( + text = "${record.speed} km/h", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + if (record.position.isNotEmpty()) { + Text( + text = "${record.position} km", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + } + + val timeStr = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(record.timestamp) + Text( + text = timeStr, + fontSize = 11.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/screens/HistoryScreen.kt b/app/src/main/java/receiver/lbj/ui/screens/HistoryScreen.kt new file mode 100644 index 0000000..d719349 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/screens/HistoryScreen.kt @@ -0,0 +1,565 @@ +package receiver.lbj.ui.screens + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInVertically +import androidx.compose.animation.slideOutVertically +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.combinedClickable +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.filled.FilterList +import androidx.compose.material.icons.filled.SignalCellular4Bar +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.input.pointer.positionChange +import androidx.compose.ui.geometry.Offset +import androidx.compose.foundation.gestures.detectTransformGestures +import androidx.compose.ui.input.pointer.util.VelocityTracker +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.viewinterop.AndroidView +import kotlinx.coroutines.delay +import org.osmdroid.tileprovider.MapTileProviderBasic +import org.osmdroid.tileprovider.tilesource.TileSourceFactory +import org.osmdroid.tileprovider.tilesource.XYTileSource +import org.osmdroid.views.MapView +import org.osmdroid.views.overlay.Marker +import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider +import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay +import org.osmdroid.views.overlay.TilesOverlay +import receiver.lbj.model.TrainRecord +import receiver.lbj.util.LocoInfoUtil +import java.text.SimpleDateFormat +import java.util.* + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class) +@Composable +fun HistoryScreen( + records: List, + latestRecord: TrainRecord?, + lastUpdateTime: Date?, + temporaryStatusMessage: String? = null, + locoInfoUtil: LocoInfoUtil? = null, + onClearRecords: () -> Unit = {}, + onExportRecords: () -> Unit = {}, + onRecordClick: (TrainRecord) -> Unit = {}, + onClearLog: () -> Unit = {}, + onDeleteRecords: (List) -> Unit = {} +) { + + val refreshKey = latestRecord?.timestamp?.time ?: 0 + + var isInEditMode by remember { mutableStateOf(false) } + val selectedRecords = remember { mutableStateListOf() } + + val expandedStates = remember { mutableStateMapOf() } + + + val timeSinceLastUpdate = remember { mutableStateOf(null) } + LaunchedEffect(key1 = lastUpdateTime) { + if (lastUpdateTime != null) { + while (true) { + val now = Date() + val diffInSec = (now.time - lastUpdateTime.time) / 1000 + timeSinceLastUpdate.value = when { + diffInSec < 60 -> "${diffInSec}秒前" + diffInSec < 3600 -> "${diffInSec / 60}分钟前" + else -> "${diffInSec / 3600}小时前" + } + delay(1000) + } + } + } + val filteredRecords = remember(records, refreshKey) { + records + } + + fun exitEditMode() { + isInEditMode = false + selectedRecords.clear() + } + + LaunchedEffect(selectedRecords.size) { + if (selectedRecords.isEmpty() && isInEditMode) { + exitEditMode() + } + } + + Box(modifier = Modifier.fillMaxSize()) { + Column(modifier = Modifier.fillMaxSize()) { + + Box( + modifier = Modifier + .fillMaxSize() + .padding(16.dp) + .weight(1.0f) + ) { + if (filteredRecords.isEmpty()) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Text( + "暂无列车信息", + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.outline + ) + + if (lastUpdateTime != null) { + Spacer(modifier = Modifier.height(8.dp)) + Text( + "上次接收数据: ${ + SimpleDateFormat( + "HH:mm:ss", + Locale.getDefault() + ).format(lastUpdateTime) + }", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f) + ) + } + } + } + } else { + LazyColumn( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + items(filteredRecords) { record -> + val isSelected = selectedRecords.contains(record) + val cardColor = when { + isSelected -> MaterialTheme.colorScheme.primaryContainer + else -> MaterialTheme.colorScheme.surface + } + + Card( + modifier = Modifier.fillMaxWidth(), + elevation = CardDefaults.cardElevation(defaultElevation = 2.dp), + colors = CardDefaults.cardColors( + containerColor = cardColor + ), + shape = RoundedCornerShape(8.dp) + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .combinedClickable( + onClick = { + if (isInEditMode) { + if (isSelected) { + selectedRecords.remove(record) + } else { + selectedRecords.add(record) + } + } else { + val id = record.timestamp.time.toString() + expandedStates[id] = + !(expandedStates[id] ?: false) + if (record == latestRecord) { + onRecordClick(record) + } + } + }, + onLongClick = { + if (!isInEditMode) { + isInEditMode = true + selectedRecords.clear() + selectedRecords.add(record) + } + }, + interactionSource = remember { MutableInteractionSource() }, + indication = rememberRipple(bounded = true) + ) + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp) + ) { + val recordMap = record.toMap() + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + val trainDisplay = + recordMap["train"]?.toString() ?: "未知列车" + + val formattedInfo = when { + record.locoType.isNotEmpty() && record.loco.isNotEmpty() -> { + val shortLoco = if (record.loco.length > 5) { + record.loco.takeLast(5) + } else { + record.loco + } + "${record.locoType}-${shortLoco}" + } + + record.locoType.isNotEmpty() -> record.locoType + record.loco.isNotEmpty() -> record.loco + else -> "" + } + + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(6.dp) + ) { + Text( + text = trainDisplay, + fontWeight = FontWeight.Bold, + fontSize = 20.sp, + color = MaterialTheme.colorScheme.primary + ) + + val directionText = when (record.direction) { + 1 -> "下" + 3 -> "上" + else -> "" + } + + if (directionText.isNotEmpty()) { + Surface( + shape = RoundedCornerShape(2.dp), + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.size(20.dp) + ) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text( + text = directionText, + fontSize = 12.sp, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.surface, + maxLines = 1, + modifier = Modifier.offset(y = (-2).dp) + ) + } + } + } + + if (formattedInfo.isNotEmpty() && formattedInfo != "") { + Text( + text = formattedInfo, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + + Text( + text = "${record.rssi} dBm", + fontSize = 10.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + + Spacer(modifier = Modifier.height(4.dp)) + + if (recordMap.containsKey("time")) { + recordMap["time"]?.split("\n")?.forEach { timeLine -> + Text( + text = timeLine, + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + + Spacer(modifier = Modifier.height(8.dp)) + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + val routeStr = record.route.trim() + val isValidRoute = + routeStr.isNotEmpty() && !routeStr.all { it == '*' } + + val position = record.position.trim() + val isValidPosition = position.isNotEmpty() && + !position.all { it == '-' || it == '.' } && + position != "" + + if (isValidRoute || isValidPosition) { + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.height(24.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp) + ) { + if (isValidRoute) { + Text( + text = "$routeStr", + fontSize = 16.sp, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.alignByBaseline() + ) + } + + if (isValidPosition) { + Text( + text = "${position}K", + fontSize = 16.sp, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.alignByBaseline() + ) + } + } + } + + val speed = record.speed.trim() + val isValidSpeed = speed.isNotEmpty() && + !speed.all { it == '*' || it == '-' } && + speed != "NUL" && + speed != "" + if (isValidSpeed) { + Text( + text = "${speed} km/h", + fontSize = 16.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + } + + if (locoInfoUtil != null && record.locoType.isNotEmpty() && record.loco.isNotEmpty()) { + val locoInfoText = locoInfoUtil.getLocoInfoDisplay( + record.locoType, + record.loco + ) + if (locoInfoText != null) { + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = locoInfoText, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + } + + val recordId = record.timestamp.time.toString() + if (expandedStates[recordId] == true) { + val coordinates = remember { record.getCoordinates() } + + if (coordinates != null) { + Spacer(modifier = Modifier.height(8.dp)) + } + + if (coordinates != null) { + + Box( + modifier = Modifier + .fillMaxWidth() + .height(220.dp) + .padding(vertical = 4.dp) + .clip(RoundedCornerShape(8.dp)), + contentAlignment = Alignment.Center + ) { + AndroidView( + modifier = Modifier.clickable( + indication = null, + interactionSource = remember { MutableInteractionSource() } + ) {}, + factory = { context -> + MapView(context).apply { + setTileSource(TileSourceFactory.MAPNIK) + setMultiTouchControls(true) + zoomController.setVisibility(org.osmdroid.views.CustomZoomButtonsController.Visibility.NEVER) + isHorizontalMapRepetitionEnabled = + false + isVerticalMapRepetitionEnabled = + false + setHasTransientState(true) + setOnTouchListener { v, event -> + v.parent?.requestDisallowInterceptTouchEvent( + true + ) + false + } + controller.setZoom(10.0) + controller.setCenter(coordinates) + this.isTilesScaledToDpi = true + this.setUseDataConnection(true) + + try { + val railwayTileSource = + XYTileSource( + "OpenRailwayMap", + 8, 16, + 256, + ".png", + arrayOf( + "https://a.tiles.openrailwaymap.org/standard/", + "https://b.tiles.openrailwaymap.org/standard/", + "https://c.tiles.openrailwaymap.org/standard/" + ), + "© OpenRailwayMap contributors, © OpenStreetMap contributors" + ) + + val railwayProvider = + MapTileProviderBasic(context) + railwayProvider.tileSource = + railwayTileSource + + val railwayOverlay = + TilesOverlay( + railwayProvider, + context + ) + railwayOverlay.loadingBackgroundColor = + android.graphics.Color.TRANSPARENT + railwayOverlay.loadingLineColor = + android.graphics.Color.TRANSPARENT + + overlays.add(railwayOverlay) + } catch (e: Exception) { + e.printStackTrace() + } + + + try { + val locationProvider = + GpsMyLocationProvider( + context + ).apply { + locationUpdateMinDistance = + 10f + locationUpdateMinTime = + 1000 + } + + MyLocationNewOverlay( + locationProvider, + this + ).apply { + enableMyLocation() + + }.also { overlays.add(it) } + } catch (e: Exception) { + e.printStackTrace() + } + + val marker = Marker(this) + marker.position = coordinates + + val latStr = String.format( + "%.4f", + coordinates.latitude + ) + val lonStr = String.format( + "%.4f", + coordinates.longitude + ) + val coordStr = + "${latStr}°N, ${lonStr}°E" + marker.title = + recordMap["train"]?.toString() + ?: "列车" + + marker.snippet = coordStr + + marker.setInfoWindowAnchor( + Marker.ANCHOR_CENTER, + 0f + ) + + overlays.add(marker) + marker.showInfoWindow() + } + }, + update = { mapView -> + mapView.invalidate() + } + ) + } + } + if (recordMap.containsKey("position_info")) { + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = recordMap["position_info"] ?: "", + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + } + } + } + } + } + } + } + } + } + } + + if (isInEditMode) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.TopCenter + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .height(56.dp) + .background(MaterialTheme.colorScheme.primary) + ) { + Row( + modifier = Modifier + .fillMaxSize() + .padding(horizontal = 16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + IconButton(onClick = { exitEditMode() }) { + Icon( + imageVector = Icons.Default.Close, + contentDescription = "取消", + tint = MaterialTheme.colorScheme.onPrimary + ) + } + Text( + "已选择 ${selectedRecords.size} 条记录", + color = MaterialTheme.colorScheme.onPrimary + ) + } + + IconButton( + onClick = { + if (selectedRecords.isNotEmpty()) { + onDeleteRecords(selectedRecords.toList()) + exitEditMode() + } + } + ) { + Icon( + imageVector = Icons.Default.Delete, + contentDescription = "删除所选记录", + tint = MaterialTheme.colorScheme.onPrimary + ) + } + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/screens/MapScreen.kt b/app/src/main/java/receiver/lbj/ui/screens/MapScreen.kt new file mode 100644 index 0000000..390a2a4 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/screens/MapScreen.kt @@ -0,0 +1,559 @@ +package receiver.lbj.ui.screens + +import android.Manifest +import android.content.Context +import android.graphics.Color +import android.graphics.drawable.Drawable +import android.graphics.PorterDuff +import android.graphics.PorterDuffColorFilter +import android.location.Location +import android.location.LocationListener +import android.util.Log +import android.location.LocationManager +import android.view.View +import android.view.ViewGroup +import androidx.compose.foundation.layout.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Refresh +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.filled.MyLocation +import androidx.compose.material.icons.filled.Layers +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalLifecycleOwner +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.viewinterop.AndroidView +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import kotlinx.coroutines.launch +import org.osmdroid.config.Configuration +import org.osmdroid.tileprovider.MapTileProviderBasic +import org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase +import org.osmdroid.tileprovider.tilesource.TileSourceFactory +import org.osmdroid.tileprovider.tilesource.XYTileSource +import org.osmdroid.util.GeoPoint +import org.osmdroid.views.MapView +import org.osmdroid.views.overlay.* +import org.osmdroid.views.overlay.compass.CompassOverlay +import org.osmdroid.views.overlay.compass.InternalCompassOrientationProvider +import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider +import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay +import receiver.lbj.model.TrainRecord +import java.io.File +import java.util.* + + +@Composable +fun MapScreen( + records: List, + onCenterMap: () -> Unit = {}, + onLocationError: (String) -> Unit = {} +) { + val context = LocalContext.current + val lifecycleOwner = LocalLifecycleOwner.current + val coroutineScope = rememberCoroutineScope() + + + LaunchedEffect(Unit) { + try { + + val osmCacheDir = File(context.cacheDir, "osm").apply { mkdirs() } + val tileCache = File(osmCacheDir, "tiles").apply { mkdirs() } + + + Configuration.getInstance().apply { + userAgentValue = context.packageName + load(context, context.getSharedPreferences("osmdroid", Context.MODE_PRIVATE)) + osmdroidBasePath = osmCacheDir + osmdroidTileCache = tileCache + expirationOverrideDuration = 86400000L + gpsWaitTime = 0L + tileDownloadThreads = 2 + tileFileSystemThreads = 2 + } + } catch (e: Exception) { + e.printStackTrace() + onLocationError("地图初始化失败:${e.localizedMessage}") + } + } + + + val validRecords = records.filter { it.getCoordinates() != null } + + val defaultPosition = GeoPoint(39.0851, 117.2015) + + var isMapInitialized by remember { mutableStateOf(false) } + val mapViewRef = remember { mutableStateOf(null) } + + + + val railwayOverlayRef = remember { mutableStateOf(null) } + val myLocationOverlayRef = remember { mutableStateOf(null) } + var currentLocation by remember { mutableStateOf(null) } + var showDetailDialog by remember { mutableStateOf(false) } + var selectedRecord by remember { mutableStateOf(null) } + var dialogPosition by remember { mutableStateOf(null) } + + var railwayLayerVisible by remember { mutableStateOf(true) } + + + DisposableEffect(lifecycleOwner) { + val observer = LifecycleEventObserver { _, event -> + try { + when (event) { + Lifecycle.Event.ON_RESUME -> { + mapViewRef.value?.onResume() + myLocationOverlayRef.value?.enableMyLocation() + } + Lifecycle.Event.ON_PAUSE -> { + mapViewRef.value?.onPause() + myLocationOverlayRef.value?.disableMyLocation() + } + Lifecycle.Event.ON_DESTROY -> { + mapViewRef.value?.onDetach() + } + else -> {} + } + } catch (e: Exception) { + e.printStackTrace() + } + } + + lifecycleOwner.lifecycle.addObserver(observer) + + onDispose { + try { + lifecycleOwner.lifecycle.removeObserver(observer) + myLocationOverlayRef.value?.disableMyLocation() + mapViewRef.value?.onDetach() + } catch (e: Exception) { + e.printStackTrace() + } + } + } + + + fun updateMarkers() { + val mapView = mapViewRef.value ?: return + + + mapView.overlays.removeAll { it is Marker } + + + validRecords.forEach { record -> + record.getCoordinates()?.let { point -> + val marker = Marker(mapView).apply { + position = point + + setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM) + + val recordMap = record.toMap() + title = recordMap["train"]?.toString() ?: "列车" + + val latStr = String.format("%.4f", point.latitude) + val lonStr = String.format("%.4f", point.longitude) + val coordStr = "${latStr}°N, ${lonStr}°E" + snippet = coordStr + + setInfoWindowAnchor(Marker.ANCHOR_CENTER, 0f) + + setOnMarkerClickListener { clickedMarker, _ -> + selectedRecord = record + dialogPosition = point + showDetailDialog = true + true + } + } + + mapView.overlays.add(marker) + marker.showInfoWindow() + } + } + + + mapView.invalidate() + + + if (!isMapInitialized && validRecords.isNotEmpty()) { + validRecords.firstOrNull()?.getCoordinates()?.let { point -> + mapView.controller.setZoom(12.0) + mapView.controller.setCenter(point) + isMapInitialized = true + } + } + } + + + fun updateRailwayLayerVisibility(visible: Boolean) { + railwayOverlayRef.value?.let { overlay -> + overlay.isEnabled = visible + + if (!visible) { + + val transparentFilter = PorterDuffColorFilter( + Color.argb(0, 255, 255, 255), + PorterDuff.Mode.SRC_IN + ) + overlay.setColorFilter(transparentFilter) + } else { + + overlay.setColorFilter(null) + } + mapViewRef.value?.invalidate() + Log.d("MapScreen", "OpenRailwayMap layer ${if (visible) "shown" else "hidden"}") + } + } + + Box(modifier = Modifier.fillMaxSize()) { + + AndroidView( + factory = { ctx -> + try { + MapView(ctx).apply { + layoutParams = ViewGroup.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT + ) + + + setTileSource(TileSourceFactory.MAPNIK) + setMultiTouchControls(true) + zoomController.setVisibility(org.osmdroid.views.CustomZoomButtonsController.Visibility.NEVER) + isTilesScaledToDpi = true + setUseDataConnection(true) + minZoomLevel = 4.0 + maxZoomLevel = 18.0 + + + + + try { + val provider = MapTileProviderBasic(ctx) + provider.tileSource = TileSourceFactory.MAPNIK + val tileOverlay = TilesOverlay(provider, ctx) + tileOverlay.loadingBackgroundColor = Color.TRANSPARENT + tileOverlay.loadingLineColor = Color.TRANSPARENT + overlays.add(tileOverlay) + } catch (e: Exception) { + e.printStackTrace() + } + + + try { + + + val railwayTileSource = XYTileSource( + "OpenRailwayMap", + 8, 16, + 256, + ".png", + arrayOf( + "https://a.tiles.openrailwaymap.org/standard/", + "https://b.tiles.openrailwaymap.org/standard/", + "https://c.tiles.openrailwaymap.org/standard/" + ), + "© OpenRailwayMap contributors, © OpenStreetMap contributors" + ) + + + val railwayProvider = MapTileProviderBasic(ctx) + railwayProvider.tileSource = railwayTileSource + + + val railwayOverlay = TilesOverlay(railwayProvider, ctx) + + + val railwayColorFilter = PorterDuffColorFilter( + Color.rgb(0, 51, 153), + PorterDuff.Mode.MULTIPLY + ) + railwayOverlay.setColorFilter(railwayColorFilter) + railwayOverlay.loadingBackgroundColor = Color.TRANSPARENT + railwayOverlay.loadingLineColor = Color.TRANSPARENT + + + overlays.add(railwayOverlay) + + railwayOverlayRef.value = railwayOverlay + + Log.d("MapScreen", "OpenRailwayMap layer loaded") + } catch (e: Exception) { + e.printStackTrace() + Log.e("MapScreen", "Failed to load OpenRailwayMap layer: ${e.message}") + } + + + controller.setZoom(10.0) + + + try { + + val locationProvider = GpsMyLocationProvider(ctx).apply { + locationUpdateMinDistance = 10f + locationUpdateMinTime = 1000 + } + + val myLocationOverlay = MyLocationNewOverlay(locationProvider, this).apply { + enableMyLocation() + + runOnFirstFix { + try { + myLocation?.let { location -> + currentLocation = GeoPoint(location.latitude, location.longitude) + + if (!isMapInitialized) { + controller.animateTo(location) + + isMapInitialized = true + } + } ?: run { + + if (!isMapInitialized) { + controller.animateTo(defaultPosition) + } + } + } catch (e: Exception) { + e.printStackTrace() + + if (!isMapInitialized) { + controller.animateTo(defaultPosition) + } + } + } + } + overlays.add(myLocationOverlay) + myLocationOverlayRef.value = myLocationOverlay + + + + + ScaleBarOverlay(this).apply { + setCentred(false) + setScaleBarOffset(5, ctx.resources.displayMetrics.heightPixels - 50) + setTextSize(10.0f) + setEnableAdjustLength(true) + setAlignBottom(true) + setLineWidth(2.0f) + }.also { overlays.add(it) } + } catch (e: Exception) { + e.printStackTrace() + onLocationError("地图组件初始化失败:${e.localizedMessage}") + } + + mapViewRef.value = this + } + } catch (e: Exception) { + e.printStackTrace() + onLocationError("地图创建失败:${e.localizedMessage}") + + MapView(ctx).apply { + layoutParams = ViewGroup.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT + ) + } + } + }, + modifier = Modifier.fillMaxSize(), + update = { mapView -> + + coroutineScope.launch { + updateMarkers() + updateRailwayLayerVisibility(railwayLayerVisible) + } + } + ) + + + if (!isMapInitialized) { + CircularProgressIndicator( + modifier = Modifier + .size(24.dp) + .align(Alignment.Center), + strokeWidth = 2.dp + ) + } + + + Column( + modifier = Modifier + .align(Alignment.TopEnd) + .padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + + + + FloatingActionButton( + onClick = { + myLocationOverlayRef.value?.let { overlay -> + overlay.enableFollowLocation() + overlay.enableMyLocation() + overlay.myLocation?.let { location -> + mapViewRef.value?.controller?.animateTo(location) + } + } + }, + modifier = Modifier.size(40.dp), + containerColor = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f), + contentColor = MaterialTheme.colorScheme.onPrimaryContainer + ) { + Icon( + imageVector = Icons.Filled.MyLocation, + contentDescription = "定位", + modifier = Modifier.size(20.dp) + ) + } + + + FloatingActionButton( + onClick = { + railwayLayerVisible = !railwayLayerVisible + updateRailwayLayerVisibility(railwayLayerVisible) + }, + modifier = Modifier.size(40.dp), + containerColor = if (railwayLayerVisible) + MaterialTheme.colorScheme.primary.copy(alpha = 0.9f) + else + MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f), + contentColor = if (railwayLayerVisible) + MaterialTheme.colorScheme.onPrimary + else + MaterialTheme.colorScheme.onPrimaryContainer + ) { + Icon( + imageVector = Icons.Filled.Layers, + contentDescription = "铁路图层", + modifier = Modifier.size(20.dp) + ) + } + + + FloatingActionButton( + onClick = { + mapViewRef.value?.let { mapView -> + if (validRecords.isNotEmpty()) { + validRecords.firstOrNull()?.getCoordinates()?.let { point -> + mapView.controller.animateTo(point) + mapView.controller.setZoom(12.0) + } + } else { + mapView.controller.animateTo(defaultPosition) + mapView.controller.setZoom(10.0) + } + } + onCenterMap() + }, + modifier = Modifier.size(40.dp), + containerColor = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f), + contentColor = MaterialTheme.colorScheme.onPrimaryContainer + ) { + Icon( + imageVector = Icons.Filled.Refresh, + contentDescription = "居中地图", + modifier = Modifier.size(20.dp) + ) + } + } + + + Surface( + modifier = Modifier + .align(Alignment.TopStart) + .padding(8.dp) + .height(32.dp), + color = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f), + shape = MaterialTheme.shapes.small + ) { + Text( + text = "${validRecords.size}条记录", + modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp), + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onPrimaryContainer + ) + } + + + if (showDetailDialog && selectedRecord != null) { + TrainMarkerDialog( + record = selectedRecord!!, + position = dialogPosition, + onDismiss = { showDetailDialog = false } + ) + } + } +} + + +fun Context.getCompactMarkerDrawable(color: Int): Drawable { + + val drawable = this.resources.getDrawable(android.R.drawable.ic_menu_mylocation, this.theme) + drawable.setTint(color) + return drawable +} + + +private fun Int.directionText(): String = when (this) { + 1 -> "↓" + 3 -> "↑" + else -> "?" +} + +@Composable +private fun TrainMarkerDialog( + record: TrainRecord, + position: GeoPoint?, + onDismiss: () -> Unit +) { + AlertDialog( + onDismissRequest = onDismiss, + title = { + + val recordMap = record.toMap() + Row(verticalAlignment = Alignment.CenterVertically) { + Text(text = recordMap["train"]?.toString() ?: "列车", style = MaterialTheme.typography.titleLarge) + recordMap["direction"]?.let { direction -> + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = direction, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + }, + text = { + Column { + + record.toMap().forEach { (key, value) -> + if (key != "train" && key != "direction") { + Text( + text = value, + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier.padding(vertical = 2.dp) + ) + } + } + + + position?.let { + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = "坐标: ${String.format("%.6f", it.latitude)}, ${String.format("%.6f", it.longitude)}", + style = MaterialTheme.typography.bodyMedium + ) + } + } + }, + confirmButton = { + TextButton(onClick = onDismiss) { + Text("确定") + } + } + ) +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/screens/MonitorScreen.kt b/app/src/main/java/receiver/lbj/ui/screens/MonitorScreen.kt new file mode 100644 index 0000000..35a4af1 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/screens/MonitorScreen.kt @@ -0,0 +1,252 @@ +package receiver.lbj.ui.screens + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Clear +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight + +import androidx.compose.ui.unit.TextUnit +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import kotlinx.coroutines.delay +import receiver.lbj.model.TrainRecord +import receiver.lbj.ui.components.TrainDetailDialog +import java.text.SimpleDateFormat +import java.util.* + +@Composable +fun MonitorScreen( + latestRecord: TrainRecord?, + recentRecords: List, + lastUpdateTime: Date?, + temporaryStatusMessage: String? = null, + onRecordClick: (TrainRecord) -> Unit, + onClearLog: () -> Unit +) { + var showDetailDialog by remember { mutableStateOf(false) } + var selectedRecord by remember { mutableStateOf(null) } + + + val timeSinceLastUpdate = remember { mutableStateOf(null) } + LaunchedEffect(key1 = lastUpdateTime) { + if (lastUpdateTime != null) { + while (true) { + val now = Date() + val diffInSec = (now.time - lastUpdateTime.time) / 1000 + timeSinceLastUpdate.value = when { + diffInSec < 60 -> "${diffInSec}秒前" + diffInSec < 3600 -> "${diffInSec / 60}分钟前" + else -> "${diffInSec / 3600}小时前" + } + delay(1000) + } + } + } + + + Box(modifier = Modifier.fillMaxSize().padding(16.dp)) { + Card(modifier = Modifier.fillMaxSize()) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(20.dp) + ) { + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.End, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = timeSinceLastUpdate.value ?: "暂无数据", + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + + Spacer(modifier = Modifier.height(16.dp)) + + + Box( + modifier = Modifier + .fillMaxWidth() + .weight(1f) + ) { + if (latestRecord != null) { + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(8.dp) + .clickable { + selectedRecord = latestRecord + showDetailDialog = true + onRecordClick(latestRecord) + } + ) { + + val recordMap = latestRecord.toMap() + + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + Text( + text = recordMap["train"]?.toString() ?: "", + fontWeight = FontWeight.Bold, + fontSize = 20.sp, + color = MaterialTheme.colorScheme.primary + ) + + Text( + text = recordMap["direction"]?.toString() ?: "", + fontWeight = FontWeight.Bold, + fontSize = 16.sp, + color = when(recordMap["direction"]?.toString()) { + "上行" -> MaterialTheme.colorScheme.primary + "下行" -> MaterialTheme.colorScheme.secondary + else -> MaterialTheme.colorScheme.onSurface + } + ) + } + + Spacer(modifier = Modifier.height(6.dp)) + + + if (recordMap.containsKey("time")) { + recordMap["time"]?.split("\n")?.forEach { timeLine -> + Text( + text = timeLine, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + Spacer(modifier = Modifier.height(4.dp)) + } + } + + HorizontalDivider(thickness = 0.5.dp) + Spacer(modifier = Modifier.height(8.dp)) + + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + recordMap["speed"]?.let { speed -> + Text( + text = speed, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + recordMap["position"]?.let { position -> + Text( + text = position, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + } + Spacer(modifier = Modifier.height(8.dp)) + + + Row( + modifier = Modifier.fillMaxWidth() + ) { + Column(modifier = Modifier.fillMaxWidth()) { + recordMap.forEach { (key, value) -> + when (key) { + "timestamp", "train", "direction", "time", "speed", "position", "position_info" -> {} + else -> { + Text( + text = value, + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + Spacer(modifier = Modifier.height(4.dp)) + } + } + } + + + if (recordMap.containsKey("position_info")) { + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = recordMap["position_info"] ?: "", + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onSurface + ) + } + } + } + } + } else { + + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Text( + "暂无列车信息", + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.outline + ) + + if (lastUpdateTime != null) { + Spacer(modifier = Modifier.height(8.dp)) + Text( + "上次接收数据: ${SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(lastUpdateTime)}", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f) + ) + } + } + } + } + } + + } + } + } + + + if (showDetailDialog && selectedRecord != null) { + TrainDetailDialog( + trainRecord = selectedRecord!!, + onDismiss = { showDetailDialog = false } + ) + } +} + +@Composable +private fun InfoItem( + label: String, + value: String, + fontSize: TextUnit = 14.sp +) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 2.dp) + ) { + Text( + text = "$label: ", + fontWeight = FontWeight.Medium, + fontSize = fontSize, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + + Text( + text = value, + fontSize = fontSize, + color = MaterialTheme.colorScheme.onSurface + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/screens/SettingsScreen.kt b/app/src/main/java/receiver/lbj/ui/screens/SettingsScreen.kt new file mode 100644 index 0000000..2ae5c33 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/screens/SettingsScreen.kt @@ -0,0 +1,38 @@ +package receiver.lbj.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun SettingsScreen( + deviceName: String, + onDeviceNameChange: (String) -> Unit, + onApplySettings: () -> Unit +) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + Text("设置", style = MaterialTheme.typography.headlineMedium) + + OutlinedTextField( + value = deviceName, + onValueChange = onDeviceNameChange, + label = { Text("蓝牙设备名称") }, + modifier = Modifier.fillMaxWidth() + ) + + Button(onClick = onApplySettings, modifier = Modifier.fillMaxWidth()) { + Text("应用设备名称") + } + + } +} diff --git a/app/src/main/java/receiver/lbj/ui/theme/Color.kt b/app/src/main/java/receiver/lbj/ui/theme/Color.kt new file mode 100644 index 0000000..0b750f6 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package receiver.lbj.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Purple40 = Color(0xFF6650a4) +val PurpleGrey40 = Color(0xFF625b71) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/theme/Theme.kt b/app/src/main/java/receiver/lbj/ui/theme/Theme.kt new file mode 100644 index 0000000..7c804bb --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/theme/Theme.kt @@ -0,0 +1,50 @@ +package receiver.lbj.ui.theme + +import android.app.Activity +import android.os.Build +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext + +private val DarkColorScheme = darkColorScheme( + primary = Purple80, + secondary = PurpleGrey80, + tertiary = Pink80 +) + +private val LightColorScheme = lightColorScheme( + primary = Purple40, + secondary = PurpleGrey40, + tertiary = Pink40 + + +) + +@Composable +fun LBJReceiverTheme( + darkTheme: Boolean = true, + + dynamicColor: Boolean = true, + content: @Composable () -> Unit +) { + val colorScheme = when { + dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { + val context = LocalContext.current + if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) + } + + darkTheme -> DarkColorScheme + else -> LightColorScheme + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/ui/theme/Type.kt b/app/src/main/java/receiver/lbj/ui/theme/Type.kt new file mode 100644 index 0000000..6ffa1b1 --- /dev/null +++ b/app/src/main/java/receiver/lbj/ui/theme/Type.kt @@ -0,0 +1,19 @@ +package receiver.lbj.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + + +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + +) \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/util/LocationUtils.kt b/app/src/main/java/receiver/lbj/util/LocationUtils.kt new file mode 100644 index 0000000..34b0d6b --- /dev/null +++ b/app/src/main/java/receiver/lbj/util/LocationUtils.kt @@ -0,0 +1,70 @@ +package receiver.lbj.util + +import android.util.Log +import org.osmdroid.util.GeoPoint +import kotlin.math.abs + + +object LocationUtils { + private const val TAG = "LocationUtils" + + + fun parsePositionInfo(positionInfo: String): GeoPoint? { + try { + if (positionInfo.isEmpty() || positionInfo == "--") { + return null + } + + Log.d(TAG, "Parsing position info=$positionInfo") + + + val parts = positionInfo.split(" ") + if (parts.size != 2) { + Log.e(TAG, "Invalid position format=$positionInfo") + return null + } + + val latitude = convertDmsToDecimal(parts[0]) + val longitude = convertDmsToDecimal(parts[1]) + + if (latitude != null && longitude != null) { + Log.d(TAG, "Parsed coordinates lat=$latitude lon=$longitude") + return GeoPoint(latitude, longitude) + } + + return null + } catch (e: Exception) { + Log.e(TAG, "Position parse error: ${e.message}", e) + return null + } + } + + + private fun convertDmsToDecimal(dmsString: String): Double? { + try { + + val degreeIndex = dmsString.indexOf('°') + if (degreeIndex == -1) { + return null + } + + val degrees = dmsString.substring(0, degreeIndex).toDouble() + + + val minuteEndIndex = dmsString.indexOf('′') + if (minuteEndIndex == -1) { + return degrees + } + + val minutes = dmsString.substring(degreeIndex + 1, minuteEndIndex).toDouble() + + + val decimalDegrees = degrees + (minutes / 60.0) + + return decimalDegrees + } catch (e: Exception) { + Log.e(TAG, "转换DMS到十进制度出错: ${e.message}", e) + return null + } + } +} \ No newline at end of file diff --git a/app/src/main/java/receiver/lbj/util/LocoInfoUtil.kt b/app/src/main/java/receiver/lbj/util/LocoInfoUtil.kt new file mode 100644 index 0000000..aae6301 --- /dev/null +++ b/app/src/main/java/receiver/lbj/util/LocoInfoUtil.kt @@ -0,0 +1,117 @@ +package receiver.lbj.util + +import android.content.Context +import android.util.Log +import java.io.BufferedReader +import java.io.InputStreamReader +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext + + +class LocoInfoUtil(private val context: Context) { + + + data class LocoInfo( + val model: String, + val start: Int, + val end: Int, + val owner: String, + val alias: String = "", + val manufacturer: String = "" + ) + + + private var locoData: List = emptyList() + + + suspend fun loadLocoData() = withContext(Dispatchers.IO) { + try { + val inputStream = context.assets.open("loco_info.csv") + val reader = BufferedReader(InputStreamReader(inputStream)) + val data = mutableListOf() + + reader.lineSequence().forEach { line -> + val fields = line.split(",").map { it.trim() } + if (fields.size >= 4) { + try { + val model = fields[0] + val start = fields[1].toInt() + val end = fields[2].toInt() + val owner = fields[3] + val alias = if (fields.size > 4) fields[4] else "" + val manufacturer = if (fields.size > 5) fields[5] else "" + + data.add(LocoInfo(model, start, end, owner, alias, manufacturer)) + } catch (e: Exception) { + Log.e("LocoInfoUtil", "CSV parse error line=$line", e) + } + } + } + + reader.close() + locoData = data + Log.d("LocoInfoUtil", "Loaded records=${data.size}") + } catch (e: Exception) { + Log.e("LocoInfoUtil", "Load CSV failed", e) + locoData = emptyList() + } + } + + + suspend fun refreshData() { + loadLocoData() + } + + + fun findLocoInfo(model: String, number: String): LocoInfo? { + if (model.isEmpty() || number.isEmpty()) { + Log.d("LocoInfoUtil", "Query failed empty model/number") + return null + } + + + try { + + val cleanNumber = number.trim().replace("-", "").replace(" ", "") + val num = if (cleanNumber.length > 4) { + cleanNumber.takeLast(4).toInt() + } else { + cleanNumber.toInt() + } + + locoData.forEach { info -> + if (info.model == model) { + val inRange = num in info.start..info.end + Log.d("LocoInfoUtil", "Checking model=${info.model} range=${info.start}-${info.end} num=$num match=$inRange") + if (inRange) { + Log.d("LocoInfoUtil", "Matched owner=${info.owner} alias=${info.alias}") + } + } + } + + return locoData.find { info -> + info.model == model && num in info.start..info.end + } + } catch (e: Exception) { + Log.e("LocoInfoUtil", "Query failed model=$model number=$number", e) + return null + } + } + + fun getLocoInfoDisplay(model: String, number: String): String? { + val info = findLocoInfo(model, number) ?: return null + + val sb = StringBuilder() + sb.append(info.owner) + + if (info.alias.isNotEmpty()) { + sb.append(" - ${info.alias}") + } + + if (info.manufacturer.isNotEmpty()) { + sb.append(" - ${info.manufacturer}") + } + + return sb.toString() + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c209e78ecd372343283f4157dcfd918ec5165bb3 GIT binary patch literal 1404 zcmV-?1%vuhNk&F=1pok7MM6+kP&il$0000G0000-002h-06|PpNX!5L00Dqw+t%{r zzW2vH!KF=w&cMnnN@{whkTw+#mAh0SV?YL=)3MimFYCWp#fpdtz~8$hD5VPuQgtcN zXl<@<#Cme5f5yr2h%@8TWh?)bSK`O z^Z@d={gn7J{iyxL_y_%J|L>ep{dUxUP8a{byupH&!UNR*OutO~0{*T4q5R6@ApLF! z5{w?Z150gC7#>(VHFJZ-^6O@PYp{t!jH(_Z*nzTK4 zkc{fLE4Q3|mA2`CWQ3{8;gxGizgM!zccbdQoOLZc8hThi-IhN90RFT|zlxh3Ty&VG z?Fe{#9RrRnxzsu|Lg2ddugg7k%>0JeD+{XZ7>Z~{=|M+sh1MF7~ zz>To~`~LVQe1nNoR-gEzkpe{Ak^7{{ZBk2i_<+`Bq<^GB!RYG+z)h;Y3+<{zlMUYd zrd*W4w&jZ0%kBuDZ1EW&KLpyR7r2=}fF2%0VwHM4pUs}ZI2egi#DRMYZPek*^H9YK zay4Iy3WXFG(F14xYsoDA|KXgGc5%2DhmQ1gFCkrgHBm!lXG8I5h*uf{rn48Z!_@ z4Bk6TJAB2CKYqPjiX&mWoW>OPFGd$wqroa($ne7EUK;#3VYkXaew%Kh^3OrMhtjYN?XEoY`tRPQsAkH-DSL^QqyN0>^ zmC>{#F14jz4GeW{pJoRpLFa_*GI{?T93^rX7SPQgT@LbLqpNA}<@2wH;q493)G=1Y z#-sCiRNX~qf3KgiFzB3I>4Z%AfS(3$`-aMIBU+6?gbgDb!)L~A)je+;fR0jWLL-Fu z4)P{c7{B4Hp91&%??2$v9iRSFnuckHUm}or9seH6 z>%NbT+5*@L5(I9j@06@(!{ZI?U0=pKn8uwIg&L{JV14+8s2hnvbRrU|hZCd}IJu7*;;ECgO%8_*W Kmw_-CKmY()leWbG literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9 GIT binary patch literal 2898 zcmV-Y3$650Nk&FW3jhFDMM6+kP&il$0000G0000-002h-06|PpNWB9900E$G+qN-D z+81ABX7q?;bwx%xBg?kcwr$(C-Tex-ZCkHUw(Y9#+`E5-zuONG5fgw~E2WDng@Bc@ z24xy+R1n%~6xI#u9vJ8zREI)sb<&Il(016}Z~V1n^PU3-_H17A*Bf^o)&{_uBv}Py zulRfeE8g(g6HFhk_?o_;0@tz?1I+l+Y#Q*;RVC?(ud`_cU-~n|AX-b`JHrOIqn(-t&rOg-o`#C zh0LPxmbOAEb;zHTu!R3LDh1QO zZTf-|lJNUxi-PpcbRjw3n~n-pG;$+dIF6eqM5+L();B2O2tQ~|p{PlpNcvDbd1l%c zLtXn%lu(3!aNK!V#+HNn_D3lp z2%l+hK-nsj|Bi9;V*WIcQRTt5j90A<=am+cc`J zTYIN|PsYAhJ|=&h*4wI4ebv-C=Be#u>}%m;a{IGmJDU`0snWS&$9zdrT(z8#{OZ_Y zxwJx!ZClUi%YJjD6Xz@OP8{ieyJB=tn?>zaI-4JN;rr`JQbb%y5h2O-?_V@7pG_+y z(lqAsqYr!NyVb0C^|uclHaeecG)Sz;WV?rtoqOdAAN{j%?Uo%owya(F&qps@Id|Of zo@~Y-(YmfB+chv^%*3g4k3R0WqvuYUIA+8^SGJ{2Bl$X&X&v02>+0$4?di(34{pt* zG=f#yMs@Y|b&=HyH3k4yP&goF2LJ#tBLJNNDo6lG06r}ghC-pC4Q*=x3;|+W04zte zAl>l4kzUBQFYF(E`KJy?ZXd1tnfbH+Z~SMmA21KokJNs#eqcXWKUIC>{TuoKe^vhF z);H)o`t9j~`$h1D`#bxe@E`oE`cM9w(@)5Bp8BNukIwM>wZHfd0S;5bcXA*5KT3bj zc&_~`&{z7u{Et!Z_k78H75gXf4g8<_ul!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YW&*FHVt$ z$kRF9Nstj%KRzpjdd_9wO=4zO8ritN*NPk_9avYrsF(!4))tm{Ga#OY z(r{0buexOzu7+rw8E08Gxd`LTOID{*AC1m*6Nw@osfB%0oBF5sf<~wH1kL;sd zo)k6^VyRFU`)dt*iX^9&QtWbo6yE8XXH?`ztvpiOLgI3R+=MOBQ9=rMVgi<*CU%+d1PQQ0a1U=&b0vkF207%xU0ssI2 literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..4f0f1d64e58ba64d180ce43ee13bf9a17835fbca GIT binary patch literal 982 zcmV;{11bDcNk&G_0{{S5MM6+kP&il$0000G0000l001ul06|PpNU8t;00Dqo+t#w^ z^1csucXz7-Qrhzl9HuHB%l>&>1tG2^vb*E&k^T3$FG1eQZ51g$uv4V+kI`0<^1Z@N zk?Jjh$olyC%l>)Xq;7!>{iBj&BjJ`P&$fsCfpve_epJOBkTF?nu-B7D!hO=2ZR}

C%4 zc_9eOXvPbC4kzU8YowIA8cW~Uv|eB&yYwAObSwL2vY~UYI7NXPvf3b+c^?wcs~_t{ ze_m66-0)^{JdOMKPwjpQ@Sna!*?$wTZ~su*tNv7o!gXT!GRgivP}ec?5>l1!7<(rT zds|8x(qGc673zrvYIz;J23FG{9nHMnAuP}NpAED^laz3mAN1sy+NXK)!6v1FxQ;lh zOBLA>$~P3r4b*NcqR;y6pwyhZ3_PiDb|%n1gGjl3ZU}ujInlP{eks-#oA6>rh&g+!f`hv#_%JrgYPu z(U^&XLW^QX7F9Z*SRPpQl{B%x)_AMp^}_v~?j7 zapvHMKxSf*Mtyx8I}-<*UGn3)oHd(nn=)BZ`d$lDBwq_GL($_TPaS{UeevT(AJ`p0 z9%+hQb6z)U9qjbuXjg|dExCLjpS8$VKQ55VsIC%@{N5t{NsW)=hNGI`J=x97_kbz@ E0Of=7!TQj4N+cqN`nQhxvX7dAV-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R;;z~vOv-z&)&G)JQ{m!C9cmziu1^nHA z`#`0c>@PnQ9CJKgC5NjJD8HM3|KC(g5nnCq$n0Gsu_DXk36@ql%npEye|?%RmG)

FJ$wK}0tWNB{uH;AM~i literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..948a3070fe34c611c42c0d3ad3013a0dce358be0 GIT binary patch literal 1900 zcmV-y2b1_xNk&Fw2LJ$9MM6+kP&il$0000G0001A003VA06|PpNH75a00DqwTbm-~ zullQTcXxO9ki!OCRx^i?oR|n!<8G0=kI^!JSjFi-LL*`V;ET0H2IXfU0*i>o6o6Gy zRq6Ap5(_{XLdXcL-MzlN`ugSdZY_`jXhcENAu)N_0?GhF))9R;E`!bo9p?g?SRgw_ zEXHhFG$0{qYOqhdX<(wE4N@es3VIo$%il%6xP9gjiBri+2pI6aY4 zJbgh-Ud|V%3O!IcHKQx1FQH(_*TK;1>FQWbt^$K1zNn^cczkBs=QHCYZ8b&l!UV{K z{L0$KCf_&KR^}&2Fe|L&?1I7~pBENnCtCuH3sjcx6$c zwqkNkru);ie``q+_QI;IYLD9OV0ZxkuyBz|5<$1BH|vtey$> z5oto4=l-R-Aaq`Dk0}o9N0VrkqW_#;!u{!bJLDq%0092{Ghe=F;(kn} z+sQ@1=UlX30+2nWjkL$B^b!H2^QYO@iFc0{(-~yXj2TWz?VG{v`Jg zg}WyYnwGgn>{HFaG7E~pt=)sOO}*yd(UU-D(E&x{xKEl6OcU?pl)K%#U$dn1mDF19 zSw@l8G!GNFB3c3VVK0?uyqN&utT-D5%NM4g-3@Sii9tSXKtwce~uF zS&Jn746EW^wV~8zdQ1XC28~kXu8+Yo9p!<8h&(Q({J*4DBglPdpe4M_mD8AguZFn~ ztiuO~{6Bx?SfO~_ZV(GIboeR9~hAym{{fV|VM=77MxDrbW6`ujX z<3HF(>Zr;#*uCvC*bpoS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res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..1b9a6956b3acdc11f40ce2bb3f6efbd845cc243f GIT binary patch literal 3918 zcmV-U53%r4Nk&FS4*&pHMM6+kP&il$0000G0001A003VA06|PpNSy@$00HoY|G(*G z+qV7x14$dSO^Re!iqt-AAIE9iwr$(CZQJL$blA4B`>;C3fBY6Q8_YSjb2%a=fc}4E zrSzssacq<^nmW|Rs93PJni30R<8w<(bK_$LO4L?!_OxLl$}K$MUEllnMK|rg=f3;y z*?;3j|Nh>)p0JQ3A~rf(MibH2r+)3cyV1qF&;8m{w-S*y+0mM){KTK^M5}ksc`qX3 zy>rf^b>~l>SSHds8(I@hz3&PD@LmEs4&prkT=BjsBCXTMhN$_)+kvnl0bLKW5rEsj z*d#KXGDB4P&>etx0X+`R19yC=LS)j!mgs5M0L~+o-T~Jl!p!AJxnGAhV%~rhYUL4hlWhgES3Kb5oA&X z{}?3OBSS-{!v$nCIGj->(-TAG)8LR{htr41^gxsT8yqt2@DEG6Yl`Uma3Nd4;YUoW zTbkYl3CMU5ypMF3EIkYmWL|*BknM`0+Kq6CpvO(y$#j94e+q{vI{Zp8cV_6RK!`&C zob$*5Q|$IZ09dW=L!V zw@#2wviu|<#3lgGE8GEhcx+zBt`} zOwP8j9X%^f7i_bth4PiJ$LYtFJSCN$3xwDN;8mr*B;CJwBP2G0TMq0uNt7S^DO_wE zepk!Wrn#Z#03j{`c*Rf~y3o7?J}w?tEELRUR2cgxB*Y{LzA#pxHgf}q?u5idu>077 zd^=p)`nA}6e`|@`p?u}YU66PP_MA}Zqqe!c{nK&z%Jwq1N4e_q<#4g^xaz=ao;u|6 zwpRcW2Lax=ZGbx=Q*HhlJ`Ns#Y*r0*%!T?P*TTiX;rb)$CGLz=rSUum$)3Qyv{BL2 zO*=OI2|%(Yz~`pNEOnLp>+?T@glq-DujlIp?hdJeZ7ctP4_OKx|5@EOps3rr(pWzg zK4d3&oN-X2qN(d_MkfwB4I)_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ckR3tsM+jsck3`oG!uMS}|eAwVXv>}qxwq?QY%QJ0}r@^;fhuUA9W z*BVl>TGo&N004@xSiwDUXUvp51sVmqO3m)=B55aPwf@0=e}cN+$-BdKxY`YrT_4)0 z_d10#i44Q*rFr8MC>*)v$EJvz``(pb{e&*6k+b zsMz%($|1+8hn8c2?P(l@;Rb&CsZeYoCI3?2!LqjbwPXW3z4G$Qfj=cT5Yb%vY0(AX oeb?AaKtwrnc|$|zzw9vfvn^aJJ!zd)XFXqqy0000001=f@-~a#s literal 0 HcmV?d00001 diff --git a/app/src/main/res/raw/loco_info.csv b/app/src/main/res/raw/loco_info.csv new file mode 100644 index 0000000..ef91c59 --- /dev/null +++ b/app/src/main/res/raw/loco_info.csv @@ -0,0 +1,590 @@ +6G,51,90,· ,, +6K,1,85,й·֣ݾּ޹˾ ,, +8G,1,1,й·̫ԭּ޹˾ ̫ԭΡΡʯׯ,, +8G,2,2,й,, +8G,3,75,й·̫ԭּ޹˾ ̫ԭΡΡʯׯ,, +8G,76,76,й·̫ԭּ޹˾ ̫ԭα,, +8G,77,96,й·̫ԭּ޹˾ ̫ԭΡΡʯׯ,, +8G,97,97,й·̫ԭּ޹˾ ܴλ۷,, +8G,98,100,й·̫ԭּ޹˾ ̫ԭΡΡʯׯ,, +8K,1,1,й·ּ޹˾ ̨,, +8K,2,7,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,8,8,й,*Ƽ, +8K,9,17,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,18,18,*· ̨,, +8K,19,23,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,24,24,й·̫ԭּ޹˾ ͬó,, +8K,25,64,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,65,65,ְҵѧԺ,, +8K,66,71,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,72,72,й·ּ޹˾ ̨,, +8K,73,90,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +8K,91,91,й·̫ԭּ޹˾ ̫ԭα չ,, +8K,92,100,*· ̨Ρ̨Σ̫ԭ· ͬΡ,, +CR400AF,21,21,й·ּ޹˾ ,CR400AF-G, +CR400AF,207,208,й·ּ޹˾ ,, +CR400AF,1001,1002,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,1003,1003,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1004,1004,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,1005,1005,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1006,1006,й·ݾּ޹˾ ϶,, +CR400AF,1007,1009,й·ݾּ޹˾ ݶ,, +CR400AF,1010,1010,й·ݾּ޹˾ ϶,, +CR400AF,1011,1014,й·ݾּ޹˾ ݶ,, +CR400AF,1015,1020,й·ݾּ޹˾ ϶,, +CR400AF,1021,1021,й·ݾּ޹˾ ݶ,, +CR400AF,1022,1025,й·ݾּ޹˾ ϶,, +CR400AF,1026,1027,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1028,1029,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,1030,1030,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1031,1031,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,1032,1032,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1033,1033,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,1034,1038,й·ݾּ޹˾ ϶,CR400AF-A, +CR400AF,1039,1039,й·ݾּ޹˾ ݶ,, +CR400AF,1040,1040,й·ݾּ޹˾ ϶,, +CR400AF,2002,2002,й·ּ޹˾ ,, +CR400AF,2004,2004,й·ּ޹˾ ,, +CR400AF,2005,2005,й·ɶּ޹˾ ,, +CR400AF,2006,2007,й·ּ޹˾ ,, +CR400AF,2008,2008,й·ּ޹˾ ۰,, +CR400AF,2009,2010,й·ּ޹˾ ,, +CR400AF,2011,2011,й·ݾּ޹˾ ɳ,, +CR400AF,2012,2012,й·ּ޹˾ ,, +CR400AF,2013,2013,й·ɶּ޹˾ ,, +CR400AF,2014,2016,й·ּ޹˾ ,, +CR400AF,2017,2017,й·ݾּ޹˾ ɳ,, +CR400AF,2023,2023,й·ּ޹˾ ,, +CR400AF,2024,2024,й·ݾּ޹˾ ɳ,, +CR400AF,2025,2025,й·ɶּ޹˾ ,, +CR400AF,2026,2028,й·ݾּ޹˾ ɳ,, +CR400AF,2030,2030,й·ּ޹˾ ۰,, +CR400AF,2031,2032,й·ɶּ޹˾ ,, +CR400AF,2033,2033,й·ּ޹˾ ۰,, +CR400AF,2034,2034,й·ּ޹˾ ,, +CR400AF,2035,2038,й·ݾּ޹˾ ɳ,, +CR400AF,2040,2046,й·ݾּ޹˾ ɳ,, +CR400AF,2047,2048,й·ּ޹˾ ,, +CR400AF,2049,2049,й·ɶּ޹˾ ,, +CR400AF,2051,2051,й·ݾּ޹˾ ɳ,, +CR400AF,2053,2055,й·ݾּ޹˾ ɳ,, +CR400AF,2057,2057,й·ݾּ޹˾ ɳ,, +CR400AF,2058,2058,й·ּ޹˾ ۰,, +CR400AF,2060,2062,й·ݾּ޹˾ ɳ,, +CR400AF,2064,2064,й·ݾּ޹˾ ɳ,, +CR400AF,2065,2066,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2067,2068,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2069,2069,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2070,2070,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2071,2071,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2072,2072,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2073,2073,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2074,2076,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2077,2079,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2080,2084,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2085,2085,й·Ͼּ޹˾ ϶,, +CR400AF,2086,2086,й·Ͼּ޹˾ ൺ,, +CR400AF,2087,2087,й·Ͼּ޹˾ ϶,, +CR400AF,2088,2090,й·Ͼּ޹˾ ൺ,, +CR400AF,2091,2094,й·Ͼּ޹˾ ϶,, +CR400AF,2095,2097,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2098,2098,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2099,2100,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2102,2102,й·Ͼּ޹˾ ϶,CR400AF-A, +CR400AF,2103,2104,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2105,2105,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2106,2106,й·ݾּ޹˾ ɳ,CR400AF-A, +CR400AF,2107,2115,й·Ͼּ޹˾ ϶,CR400AF-A, +CR400AF,2116,2123,й·ּ޹˾ ϶,CR400AF-B, +CR400AF,2124,2124,й·人ּ޹˾ 人,, +CR400AF,2125,2125,й·人ּ޹˾ 人,, +CR400AF,2126,2127,й·人ּ޹˾ ڶ,, +CR400AF,2128,2128,й·人ּ޹˾ 人,, +CR400AF,2130,2131,й·ݾּ޹˾ ɳ,, +CR400AF,2133,2133,й·ݾּ޹˾ ɳ,, +CR400AF,2134,2134,й·Ͼּ޹˾ ൺ,, +CR400AF,2135,2135,й·ɶּ޹˾ ,, +CR400AF,2136,2138,й·Ͼּ޹˾ ൺ,, +CR400AF,2139,2139,й·Ͼּ޹˾ ϶,, +CR400AF,2140,2140,й·ɶּ޹˾ ,, +CR400AF,2141,2141,й·Ͼּ޹˾ ϶,, +CR400AF,2142,2144,й·ּ޹˾ ,, +CR400AF,2145,2146,й·ּ޹˾ ۰,, +CR400AF,2148,2150,й·人ּ޹˾ ڶ,, +CR400AF,2151,2151,й·人ּ޹˾ 人,, +CR400AF,2152,2153,й·人ּ޹˾ ڶ,, +CR400AF,2154,2156,й·人ּ޹˾ 人,, +CR400AF,2159,2159,й·人ּ޹˾ 人,, +CR400AF,2160,2161,й·人ּ޹˾ ڶ,, +CR400AF,2162,2163,й·Ͼּ޹˾ ϶,, +CR400AF,2164,2164,й·人ּ޹˾ 人,, +CR400AF,2171,2172,й·人ּ޹˾ 人,, +CR400AF,2173,2173,й·人ּ޹˾ ڶ,, +CR400AF,2174,2177,й·人ּ޹˾ 人,, +CR400AF,2178,2178,й·ּ޹˾ ۰,, +CR400AF,2179,2179,й·ּ޹˾ ,, +CR400AF,2180,2180,й·ּ޹˾ ۰,, +CR400AF,2181,2182,й·ּ޹˾ ,, +CR400AF,2183,2187,й·ּ޹˾ ϶,, +CR400AF,2190,2192,й·人ּ޹˾ 人,CR400AF-A, +CR400AF,2193,2193,й·Ͼּ޹˾ ϶,CR400AF-A, +CR400AF,2194,2195,й·ݾּ޹˾ ڶ,CR400AF-A, +CR400AF,2196,2200,й·人ּ޹˾ 人,CR400AF-A, +CR400AF,2201,2205,й·Ͼּ޹˾ ϶,CR400AF-A, +CR400AF,2206,2210,й·ּ޹˾ ϶,CR400AF-B, +CR400AF,2211,2212,й·Ͼּ޹˾ ϶,CR400AF-A, +CR400AF,2213,2213,й·ּ޹˾ ,, +CR400AF,2215,2217,й·ּ޹˾ ,CR400AF-G, +CR400AF,2222,2225,й·Ϻּ޹˾ Ϻ϶,, +CR400AF,2226,2226,й·ݾּ޹˾ ϶,, +CR400AF,2227,2227,й·ݾּ޹˾ ɳ,, +CR400AF,2228,2228,й·ݾּ޹˾ ϶,, +CR400AF,2229,2229,й·ݾּ޹˾ ɳ,, +CR400AF,2230,2231,й·Ͼּ޹˾ ϶,, +CR400AF,2232,2235,й·Ϻּ޹˾ Ϻ϶,, +CR400AF,2236,2236,й·ɶּ޹˾ ,, +CR400AF,2237,2243,й·Ϻּ޹˾ Ϻ϶,, +CR400AF,2244,2248,й·ɶּ޹˾ ,, +CR400AF,2254,2256,й·ɶּ޹˾ ,, +DJ1,1,1,йѧоԺ ,, +DJ1,2,2,ǣ豸޹˾,, +DJ1,3,3,· 븽Ӷ ,, +DJ2,1,1,й·֣ݾּ޹˾ ֣ݻξ쳵,, +DJ2,2,3,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,1,15,й·人ּ޹˾ ϻ,, +HXD1D,16,16,й·Ϻּ޹˾ ݻ,, +HXD1D,17,17,й·ϲּ޹˾ ϲ,, +HXD1D,18,18,й·ϲּ޹˾ ӥ̶,, +HXD1D,19,19,й·Ϻּ޹˾ ݻ,, +HXD1D,20,20,й·ϲּ޹˾ ϲ,, +HXD1D,21,21,й·Ϻּ޹˾ ݻ,, +HXD1D,22,24,й·ϲּ޹˾ ϲ,, +HXD1D,25,25,й·ϲּ޹˾ ӥ̶,, +HXD1D,26,26,й·ϲּ޹˾ ϲ,, +HXD1D,27,27,й·Ϻּ޹˾ ݻ,, +HXD1D,28,28,й·ϲּ޹˾ ӥ̶,, +HXD1D,29,34,й·ϲּ޹˾ ϲ,, +HXD1D,35,35,й·Ϻּ޹˾ ݻ,, +HXD1D,36,38,й·ݾּ޹˾ ,, +HXD1D,39,39,й·Ͼּ޹˾ ϻ,, +HXD1D,40,50,й·ݾּ޹˾ ,, +HXD1D,51,75,й·³ľּ޹˾ ³ľ,, +HXD1D,76,105,й·ݾּ޹˾ ,, +HXD1D,106,137,й·Ϻּ޹˾ Ϻ,, +HXD1D,138,168,й·Ϻּ޹˾ ݻ,, +HXD1D,169,175,й·Ϻּ޹˾ Ϻ,, +HXD1D,176,185,й·人ּ޹˾ ϻ,, +HXD1D,186,187,й·ϲּ޹˾ ӥ̶,, +HXD1D,188,188,й·ϲּ޹˾ ϲ,, +HXD1D,189,190,й·ϲּ޹˾ ӥ̶,, +HXD1D,191,232,й·ϲּ޹˾ ϲ,, +HXD1D,233,233,й·ϲּ޹˾ ӥ̶,, +HXD1D,234,237,й·ϲּ޹˾ ϲ,, +HXD1D,238,257,й·ݾּ޹˾ ݻ,, +HXD1D,258,270,й·人ּ޹˾ ϻ,, +HXD1D,271,275,й·³ľּ޹˾ ³ľ,, +HXD1D,276,279,й·Ϻּ޹˾ Ϻ,, +HXD1D,280,289,й·Ϻּ޹˾ ݻ,, +HXD1D,290,291,й·ϲּ޹˾ ϲ,, +HXD1D,292,293,й·ϲּ޹˾ ӥ̶,, +HXD1D,294,295,й·ϲּ޹˾ ϲ,, +HXD1D,296,300,й·ݾּ޹˾ ݻ,, +HXD1D,301,310,й·人ּ޹˾ ϻ,, +HXD1D,311,320,й·³ľּ޹˾ ³ľ,, +HXD1D,321,340,й·ؼ޹˾ ,, +HXD1D,341,362,й·³ľּ޹˾ ³ľ,, +HXD1D,363,382,й·ݾּ޹˾ ݻ,, +HXD1D,383,392,й·ϲּ޹˾ ϲ,, +HXD1D,393,405,й·Ϻּ޹˾ Ϻ,, +HXD1D,406,415,й·ݾּ޹˾ ,, +HXD1D,416,430,й·ݾּ޹˾ ɳ,, +HXD1D,431,440,й·ϲּ޹˾ ϲ,, +HXD1D,441,445,й·ϲּ޹˾ ϲ,, +HXD1D,446,450,й·³ľּ޹˾ ³ľ,, +HXD1D,451,460,й·人ּ޹˾ ϻ,, +HXD1D,461,470,й·ݾּ޹˾ ݻ,, +HXD1D,471,478,й·ݾּ޹˾ ,, +HXD1D,479,483,й·Ϻּ޹˾ Ϻ,, +HXD1D,484,488,й·Ϻּ޹˾ ݻ,, +HXD1D,489,490,й·Ϻּ޹˾ ݻ,, +HXD1D,491,510,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,511,512,й·Ϻּ޹˾ ݻ,, +HXD1D,513,515,й·Ϻּ޹˾ Ϻ,, +HXD1D,516,520,й·ϲּ޹˾ ϲ,, +HXD1D,521,534,й·ݾּ޹˾ ݻ,, +HXD1D,522,522,·ְҵѧԺ,, +HXD1D,535,544,й·ϲּ޹˾ ϲ,, +HXD1D,545,551,й·Ϻּ޹˾ Ϻ,, +HXD1D,552,554,й·Ϻּ޹˾ ݻ,, +HXD1D,555,559,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,560,564,й·³ľּ޹˾ ³ľ,, +HXD1D,565,570,й·ݾּ޹˾ ݻ,, +HXD1D,571,585,й·ϲּ޹˾ ϲ,, +HXD1D,586,595,й·Ϻּ޹˾ ݻ,, +HXD1D,596,613,й·ݾּ޹˾ ,, +HXD1D,614,623,й·ݾּ޹˾ ݻ,, +HXD1D,624,633,й·Ϻּ޹˾ Ϻ,, +HXD1D,634,636,й·³ľּ޹˾ ³ľ,, +HXD1D,637,644,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,645,660,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,661,668,й·人ּ޹˾ ϻ,, +HXD1D,669,673,й·³ľּ޹˾ ³ľ,, +HXD1D,674,678,й·֣ݾּ޹˾ ֣ݻ,, +HXD1D,679,682,й·Ϻּ޹˾ Ϻ,, +HXD1D,683,683,й·Ϻּ޹˾ ݻ,, +HXD1D,684,684,й·Ϻּ޹˾ ݻ,, +HXD1D,685,689,й·ؼ޹˾ ľ,, +HXD1D,1898,1898,й·Ϻּ޹˾ Ϻ,ܶ, +HXD1D-J,1,3,й·ؼ޹˾ ,, +HXD1D-J,1001,1009,й·ּ޹˾ ,, +HXD1D-J,1010,1013,й·ؼ޹˾ ľ,, +HXD1D-J,1014,1019,й·ɶּ޹˾ ɶ,, +HXD1D-J,1020,1027,й·ּ޹˾ ,, +HXD3C,1,9,й·ּ޹˾ ,, +HXD3C,10,10,й·ּ޹˾ ,, +HXD3C,11,15,й·Ͼּ޹˾ ϻ,, +HXD3C,16,20,й·人ּ޹˾ Σ֧䣩,, +HXD3C,21,25,й·ϲּ޹˾ ϲ,, +HXD3C,26,30,й·֣ݾּ޹˾ ֣ݻ,, +HXD3C,31,35,й·Ϻּ޹˾ ΣϺ֧䣩,, +HXD3C,36,41,й·人ּ޹˾ Σϻ֧䣩,, +HXD3C,42,45,й·人ּ޹˾ Σ֧䣩,, +HXD3C,46,55,й·ϲּ޹˾ ϲ,, +HXD3C,56,60,й·֣ݾּ޹˾ ֣ݻ,, +HXD3C,61,61,й·ּ޹˾ ,, +HXD3C,62,62,й·Ͼּ޹˾ ϻ,, +HXD3C,63,63,й·ּ޹˾ ,, +HXD3C,64,70,й·Ͼּ޹˾ ϻ,, +HXD3C,71,85,й·人ּ޹˾ ,, +HXD3C,86,95,й·֣ݾּ޹˾ ֣ݻ,, +HXD3C,96,100,й·Ͼּ޹˾ ϻ,, +HXD3C,101,110,й·人ּ޹˾ ,, +HXD3C,111,120,й·ּ޹˾ ,, +HXD3C,121,125,й·Ϻּ޹˾ ΣϺ֧䣩,, +HXD3C,126,130,й·ϲּ޹˾ ϲ,, +HXD3C,131,135,й·Ͼּ޹˾ ϻ,, +HXD3C,136,140,й·֣ݾּ޹˾ ֣ݻ,, +HXD3C,141,165,й·人ּ޹˾ ,, +HXD3C,166,180,й·ɶּ޹˾ ,, +HXD3C,181,182,й·Ͼּ޹˾ ϻ,, +HXD3C,183,190,й·ּ޹˾ ,, +HXD3C,191,195,й·Ͼּ޹˾ ϻ,, +HXD3C,198,200,й·Ϻּ޹˾ ,, +HXD3C,201,220,й·人ּ޹˾ ,, +HXD3C,221,225,й·Ϻּ޹˾ ,, +HXD3C,226,229,й·ּ޹˾ ,, +HXD3C,238,238,й·ݾּ޹˾ ޻,, +HXD3C,271,300,й·Ϻּ޹˾ ,, +HXD3C,446,446,й·ݾּ޹˾ ݻ,, +HXD3C,805,809,й·ݾּ޹˾ ,, +HXD3C,810,819,й·ּ޹˾,, +HXD3C,820,829,й·人ּ޹˾,, +HXD3C,896,925,й·ּ޹˾,, +HXD3C,926,930,й·ּ޹˾,, +HXD3C,931,945,й·ּ޹˾,, +HXD3C,946,955,й·Ͼּ޹˾,, +HXD3C,956,965,й·֣ݾּ޹˾,, +HXD3C,966,974,й·Ͼּ޹˾,, +HXD3D,1,10,й·ּ޹˾ ,, +HXD3D,11,25,·ּ޹˾ ,, +HXD3D,26,34,й·ݾּ޹˾ ,, +HXD3D,35,35,й·ݾּ޹˾ ӭˮŻ,׷, +HXD3D,36,38,й·ݾּ޹˾ ,, +HXD3D,39,39,й·Ͼּ޹˾ ϻ,ź, +HXD3D,40,40,й·ݾּ޹˾ ,, +HXD3D,41,50,·ּ޹˾ ,, +HXD3D,51,70,й·ּ޹˾ ,, +HXD3D,71,90,й·ϲּ޹˾ ϲ,, +HXD3D,91,115,й·ݾּ޹˾ ,, +HXD3D,116,135,й·ּ޹˾ ,, +HXD3D,136,145,й·ּ޹˾ ,, +HXD3D,146,150,ͺ·ּ޹˾ ,, +HXD3D,151,155,й·ּ޹˾ ,, +HXD3D,156,160,й·ϲּ޹˾ ϲ,, +HXD3D,161,165,й·ּ޹˾ ,, +HXD3D,166,170,·ּ޹˾ ,, +HXD3D,171,180,й·ݾּ޹˾ ,, +HXD3D,181,190,й·Ͼּ޹˾ ϻ,, +HXD3D,191,245,й·ּ޹˾ ,, +HXD3D,246,255,й·ּ޹˾ ,, +HXD3D,256,265,ͺ·ּ޹˾ ,, +HXD3D,266,290,й·ݾּ޹˾ ,, +HXD3D,291,300,й·ּ޹˾ ,, +HXD3D,301,310,й·Ͼּ޹˾ ϻ,, +HXD3D,310,315,й·ּ޹˾ ,, +HXD3D,316,320,й·ϲּ޹˾ ϲ,, +HXD3D,321,322,ͺ·ּ޹˾ ,, +HXD3D,323,325,й·ּ޹˾ ,, +HXD3D,326,333,·ּ޹˾ ,, +HXD3D,334,340,·ּ޹˾ ,, +HXD3D,341,345,й·ּ޹˾ ,, +HXD3D,346,346,й·ɶּ޹˾ ,, +HXD3D,351,351,й·ɶּ޹˾ ,, +HXD3D,356,365,·ּ޹˾ ,, +HXD3D,366,369,й·ּ޹˾ ,, +HXD3D,370,382,ͺ·ּ޹˾ ,, +HXD3D,383,392,й·ּ޹˾ ,, +HXD3D,393,397,й·ݾּ޹˾ ,, +HXD3D,398,402,·ּ޹˾ ,, +HXD3D,403,417,·ּ޹˾ ,, +HXD3D,418,419,й·ּ޹˾ ĵ,, +HXD3D,420,424,й·ּ޹˾ ,, +HXD3D,425,429,ͺ·ּ޹˾ ,, +HXD3D,430,433,й·ּ޹˾ ĵ,, +HXD3D,434,443,й·ϲּ޹˾ ϲ,, +HXD3D,444,449,й·Ͼּ޹˾ ϻ,, +HXD3D,450,464,·ּ޹˾ ,, +HXD3D,465,468,й·Ͼּ޹˾ ϻ,, +HXD3D,469,473,й·Ͼּ޹˾ ϻ,, +HXD3D,474,479,й·ּ޹˾ ,, +HXD3D,480,484,й·ϲּ޹˾ ϲ,, +HXD3D,485,489,·ּ޹˾ ,, +HXD3D,490,499,й·ּ޹˾ ,, +HXD3D,500,503,й·ּ޹˾ ĵ,, +HXD3D,504,514,й·ּ޹˾ ,, +HXD3D,515,515,й·ɶּ޹˾ ,, +HXD3D,516,518,й·ּ޹˾ ,, +HXD3D,519,528,·ּ޹˾ ,, +HXD3D,529,538,й·ּ޹˾ ,, +HXD3D,539,541,ͺ·ּ޹˾ ,, +HXD3D,542,553,·ּ޹˾ ,, +HXD3D,554,563,й·Ͼּ޹˾ ϻ,, +HXD3D,564,568,й·ּ޹˾ ,, +HXD3D,569,573,й·ɶּ޹˾ ,, +HXD3D,574,583,й·Ͼּ޹˾ ϻ,, +HXD3D,584,584,й·ּ޹˾ ,, +HXD3D,585,609,й·ּ޹˾ ,, +HXD3D,610,611,й·ּ޹˾ ,, +HXD3D,612,621,й·ϲּ޹˾ ϲ,, +HXD3D,622,626,й·ϲּ޹˾ ϲ,, +HXD3D,627,629,й·ּ޹˾ ,, +HXD3D,630,630,й·ּ޹˾ ,, +HXD3D,631,631,·ּ޹˾ ,š, +HXD3D,632,653,й·ּ޹˾ ,, +HXD3D,654,673,й·ּ޹˾ ,, +HXD3D,674,681,й·ּ޹˾ ,, +HXD3D,682,688,й·ݾּ޹˾ ,, +HXD3D,1886,1886,й·ּ޹˾ ,ºš, +HXD3D,1893,1893,й·ּ޹˾ ̨,ë󶫺š, +HXD3D,1921,1921,й·ּ޹˾ ,Ա, +HXD3D,7001,7002,غ·ɷ޹˾ ϻö,, +HXD3D,7003,7003,ְҵѧԺ,, +HXD3D,8001,8025,й·ּ޹˾ ,,ͬ +HXD3D,8026,8028,й·̫ԭּ޹˾ ̫ԭϻ,,ͬ +2,1,50,,, +,1201,1830,,,ɶ +,2001,2094,,, +11,1,459,,, +12,8001,8001,ְҵѧԺ,, +2,3201,3348,,, +21,1,5,й·ּ޹˾ ,, +21,6,6,й·ּ޹˾ ,״Ԫ, +21,7,7,й·ּ޹˾ ,, +21,8,8,й·ּ޹˾ ,ˮų, +21,9,100,й·ּ޹˾ ,, +21,101,101,й·ּ޹˾ ,, +21,102,102,й·ּ޹˾ ,, +21,1001,1002,ϸ,, +2Z,3251,3251,*· Ӹ,, +3,3243,3243,гǻ԰,, +4,3247,3247,гɶͨҵ԰,, +4B,1001,1999,,, +4B,1963,1963,*· ̨,, +4B,2101,2685,,, +4B,2104,2104,*Ϻ· ,, +4B,2376,2376,*ϲ· ӥ̶,, +4B,3101,3999,,, +4B,3214,3214,*㽭޹˾ ݻ,, +4B,3249,3249,*· ,, +4B,3390,3390,*ɶ· ,, +4B,3593,3593,*й·ݾּ޹˾ ޻,, +4B,6001,6587,,,ͬ +4B,6530,6530,*· ,, +4B,7001,7363,,, +4B,7364,7365,,,ķ +4B,7366,7796,,, +4B,7701,7732,,,߸ +4B,9001,9702,,, +4B,9167,9167,*ϲ· ,, +4B,9531,9531,*³·˾,, +4C,1,10,,,ͬ +4C,11,11,й·ּ޹˾ ̨,, +4C,12,40,,,ͬ +4C,2001,2006,,,ķ +4C,4001,4465,,, +4C,4466,4466,ķ,,ķ +4C,5001,5273,,, +4C,5274,5275,ï·˾ ˮ,4CK, +4C,5276,5335,,, +4D,7001,7021,й·ּ޹˾,, +5,1,1,й·ּ޹˾ ,, +5,1974,1975,й·ݾּ޹˾ ,,ɽ +5,1976,2082,,,ɽ +5,2083,2083,йʯʯ˾,,ɽ +5,3279,3279,·,, +6,1,2,*· ,, +6,3,3,·й,, +6,4,4,*· ,, +7,174,174,й·̫ԭּ޹˾ ̫ԭα,, +7B,3006,3006,й,, +7B,3015,3015,ƺ·԰,, +7B,6001,6072,*· Σ֣· ,, +7D,1,1,й,, +7D,3001,3001,й,, +7E,1,1,й·֣ݾּ޹˾ ,, +7E,2,2,й·֣ݾּ޹˾ ֣ݻ,, +7G,9001,9004,ͺ· ֶ,, +8,1,1,й,, +9,1,2,й·ݾּ޹˾ݻ,, +ɽ1,8,8,й,, +ɽ1,156,156,֣ͻ԰,, +ɽ1,160,160,·ѧУ,, +ɽ1,227,227,й·ݾּ޹˾ ,, +ɽ1,254,254,й·ּ޹˾ ̨ ,, +ɽ1,307,307,й·̫ԭּ޹˾ ܴλ۷,, +ɽ1,309,309,й·̫ԭּ޹˾ ̫ԭα,, +ɽ1,321,321,人·ְҵѧԺ,, +ɽ1,681,681,й,, +ɽ1,695,695,·й,, +ɽ1,762,762,й·ݾּ޹˾ ¦ó䴢,, +ɽ1,818,818,Ͻͨѧ ԰,, +ɽ1,821,821,عػʵѵ,, +ɽ1,826,826,عػʵѵ,, +ɽ3,454,454,й·ɶּ޹˾ ,ȷ, +ɽ3,524,524,й·人ּ޹˾ ,, +ɽ3,4160,4160,غ·˾ ϻö,ź, +ɽ3,4178,4178,غ·˾ ϻö,ź, +ɽ3,4235,4235,й·ɶּ޹˾ ,, +ɽ3,4258,4258,й·ɶּ޹˾ ,Աȷ, +ɽ3,5080,5080,·,, +ɽ3,6005,6005,ϽͨѧԺ,, +ɽ3,8050,8050,人·ַ԰,, +ɽ3B,16,16,· ,, +ɽ3B,5001,5001,й·ɶּ޹˾ ,*ȷ, +ɽ3B,5035,5035,й·ݾּ޹˾ ӭˮŻ,׷ (), +ɽ3B,5038,5038,й·ݾּ޹˾ ӭˮŻ,, +ɽ3B,5151,5151,й·ɶּ޹˾ ,ƶȷ, +ɽ3B,5162,5162,й·ּ޹˾ ,, +ɽ3B,5235,5235,й·ɶּ޹˾ ,*ź, +ɽ3C,1,1,й·ɶּ޹˾ ,, +ɽ4,6,6,й,, +ɽ4,10,10,й·ɶּ޹˾ ,, +ɽ4,50,50,й·֣ݾּ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,ͬ +ɽ7E,6001,6002,й·ּ޹˾,,ͬ +ɽ7E,7001,7004,,, +ɽ8,1,1,й·ݾּ޹˾ ݻ,, +ɽ8,2,2,й·ݾּ޹˾ ݻ,, +ɽ8,3,4,й·Ϻּ޹˾ Ϻ,, +ɽ8,5,5,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,9,9,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,11,11,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,12,12,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,15,16,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,17,17,й·Ϻּ޹˾ Ϻ,, +ɽ8,20,20,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,24,25,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,27,27,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,29,32,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,33,35,й·Ϻּ޹˾ Ϻ,, +ɽ8,36,36,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,38,38,й·Ϻּ޹˾ Ϻ,, +ɽ8,39,39,й·Ϻּ޹˾ Ϻ,, +ɽ8,40,40,й·Ϻּ޹˾ Ϻ,, +ɽ8,41,41,й·ּ޹˾ ,, +ɽ8,43,43,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,44,44,й·ּ޹˾ ,, +ɽ8,45,45,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,48,48,й·ּ޹˾ ,, +ɽ8,49,49,й·ϲּ޹˾ ϲ,, +ɽ8,50,50,й·ϲּ޹˾ ϲ,, +ɽ8,51,51,й·ּ޹˾ ,, +ɽ8,52,52,й·Ϻּ޹˾ Ϻ,, +ɽ8,55,55,й·ϲּ޹˾ ϲ,, +ɽ8,56,57,й·ּ޹˾ ,, +ɽ8,64,64,й·ݾּ޹˾ ݻ,, +ɽ8,72,72,й·ּ޹˾ ,, +ɽ8,73,73,й·ּ޹˾ ,, +ɽ8,74,74,й·ּ޹˾ ,, +ɽ8,81,81,й·ּ޹˾ ,, +ɽ8,83,84,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,85,85,й·ּ޹˾ ,, +ɽ8,88,103,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,104,104,й·ּ޹˾ ,, +ɽ8,109,111,й·ϲּ޹˾ ϲ,, +ɽ8,114,116,й·ϲּ޹˾ ϲ,, +ɽ8,118,119,й·ּ޹˾ ,, +ɽ8,121,126,й·ּ޹˾ ,, +ɽ8,127,128,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,130,130,й·ϲּ޹˾ ϲ,, +ɽ8,131,131,й·ݾּ޹˾ ɳ,, +ɽ8,132,132,й·ݾּ޹˾ ɳ,, +ɽ8,133,133,й·ݾּ޹˾ ɳ,, +ɽ8,134,134,й·ݾּ޹˾ ɳ,, +ɽ8,136,136,й·ݾּ޹˾ ɳ,, +ɽ8,141,141,й·ݾּ޹˾ ݻ,, +ɽ8,144,144,й·ݾּ޹˾ ɳ,, +ɽ8,148,148,й·ݾּ޹˾ ݻ,, +ɽ8,156,156,й·ݾּ޹˾ ݻ,, +ɽ8,163,163,й·ݾּ޹˾ ݻ,, +ɽ8,166,166,й·ݾּ޹˾ ݻ,ͽ, +ɽ8,171,171,й·Ϻּ޹˾ Ϻ,, +ɽ8,172,172,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,173,173,й·ݾּ޹˾ ݻ,, +ɽ8,181,181,й·ݾּ޹˾ ݻ,, +ɽ8,186,186,й·ݾּ޹˾ ݻ,, +ɽ8,191,191,й·ݾּ޹˾ ݻ,, +ɽ8,192,192,й·ݾּ޹˾ ݻ,, +ɽ8,197,197,й·֣ݾּ޹˾ ֣ݻ,, +ɽ8,200,204,й·Ϻּ޹˾ Ϻ,, +ɽ8,205,205,й·ݾּ޹˾ ɳ,, +ɽ8,214,214,й·֣ݾּ޹˾ ֣ݻ,, +ɽ9,1,3,й·ּ޹˾ Σй·Ϻּ޹˾ Ϻ,, +ɽ9,5,29,й·ּ޹˾ Σй·Ϻּ޹˾ Ϻ,, +ɽ9,30,30,й·ּ޹˾ ͨɻ,, +ɽ9,31,37,й·ּ޹˾ Σй·Ϻּ޹˾ Ϻ,, +ɽ9,38,38,й·ּ޹˾ ͨɻ,, +ɽ9,39,43,й·ּ޹˾ Σй·Ϻּ޹˾ Ϻ,, diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..ab831ab --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + LBJ Receiver + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..08a9d46 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +