├── cat-drive-android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── arrays.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── themes.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── bg.jpg │ │ │ │ │ ├── catface.png │ │ │ │ │ ├── roundabout.bmp │ │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ │ ├── ic_notifications_black_24dp.xml │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── menu │ │ │ │ │ └── bottom_nav_menu.xml │ │ │ │ ├── xml │ │ │ │ │ ├── backup_rules.xml │ │ │ │ │ ├── data_extraction_rules.xml │ │ │ │ │ └── root_preferences.xml │ │ │ │ ├── navigation │ │ │ │ │ └── mobile_navigation.xml │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ ├── layout │ │ │ │ │ ├── activity_device_selection.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── device_row_item.xml │ │ │ │ │ └── fragment_home.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── meomeo │ │ │ │ │ └── catdrive │ │ │ │ │ ├── ui │ │ │ │ │ ├── home │ │ │ │ │ │ ├── HomeViewModel.kt │ │ │ │ │ │ └── HomeFragment.kt │ │ │ │ │ ├── ActivityViewModel.kt │ │ │ │ │ ├── DeviceSelectionActivity.kt │ │ │ │ │ └── settings │ │ │ │ │ │ └── SettingsFragment.kt │ │ │ │ │ ├── lib │ │ │ │ │ ├── Intents.kt │ │ │ │ │ ├── NavigationNotification.kt │ │ │ │ │ ├── NavigationData.kt │ │ │ │ │ ├── ParserHelper.kt │ │ │ │ │ ├── BluetoothSerial.kt │ │ │ │ │ ├── IntrospectionUtils.kt │ │ │ │ │ ├── BitmapHelper.kt │ │ │ │ │ ├── GMapsNotification.kt │ │ │ │ │ └── CustomSerializers.kt │ │ │ │ │ ├── MeowGoogleMapNotificationListener.kt │ │ │ │ │ ├── utils │ │ │ │ │ ├── ServiceManager.kt │ │ │ │ │ └── PermissionCheck.kt │ │ │ │ │ ├── service │ │ │ │ │ ├── NavigationListener.kt │ │ │ │ │ └── BroadcastService.kt │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ ├── ic_launcher-playstore.png │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ ├── release │ │ ├── baselineProfiles │ │ │ ├── 0 │ │ │ │ └── app-release.dm │ │ │ └── 1 │ │ │ │ └── app-release.dm │ │ └── output-metadata.json │ ├── proguard-rules.pro │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── settings.gradle ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew ├── images └── arduino-v2-config.png ├── binaries └── cat-drive-esp32.ino.merged.bin ├── cat-drive-esp32 ├── convert_font.sh ├── ota.h ├── Scheduler.h ├── splash.h ├── pages │ └── index.html.h ├── ota.cpp ├── scrollabletext.h └── .gitignore ├── LICENSE └── README.md /cat-drive-android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /images/arduino-v2-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/images/arduino-v2-config.png -------------------------------------------------------------------------------- /binaries/cat-drive-esp32.ino.merged.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/binaries/cat-drive-esp32.ino.merged.bin -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/drawable/bg.jpg -------------------------------------------------------------------------------- /cat-drive-android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/catface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/drawable/catface.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/ic_launcher-playstore.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/roundabout.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/drawable/roundabout.bmp -------------------------------------------------------------------------------- /cat-drive-android/app/release/baselineProfiles/0/app-release.dm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/release/baselineProfiles/0/app-release.dm -------------------------------------------------------------------------------- /cat-drive-android/app/release/baselineProfiles/1/app-release.dm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/release/baselineProfiles/1/app-release.dm -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maisonsmd/esp32-google-maps-oled-non-ble/HEAD/cat-drive-android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /cat-drive-esp32/convert_font.sh: -------------------------------------------------------------------------------- 1 | ./otf2bdf/otf2bdf -r 48 -p 16 NotoSans-Regular.otf -o notosans.bdf && ./bdfconv/bdfconv.exe -v -f 1 -m '$00-$7f, $80-$ff, $100-$24f, $1e00-$1eff, $300-$36f, $20ab' -n notosans -o notosans.c notosans.bdf -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | -------------------------------------------------------------------------------- /cat-drive-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /cat-drive-android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | id 'com.android.application' version '8.8.0' apply false 4 | id 'com.android.library' version '8.8.0' apply false 5 | id 'org.jetbrains.kotlin.android' version '1.7.20' apply false 6 | } -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /cat-drive-android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | rootProject.name = "CatDrive" 16 | include ':app' 17 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/java/com/meomeo/catdrive/ui/home/HomeViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.meomeo.catdrive.ui.home 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.ViewModel 6 | 7 | class HomeViewModel : ViewModel() { 8 | 9 | private val _text = MutableLiveData().apply { 10 | value = "This is home Fragment" 11 | } 12 | val text: LiveData = _text 13 | } -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /cat-drive-android/.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Log/OS Files 9 | *.log 10 | 11 | # Android Studio generated files and folders 12 | captures/ 13 | .externalNativeBuild/ 14 | .cxx/ 15 | *.apk 16 | output.json 17 | 18 | # IntelliJ 19 | *.iml 20 | .idea/ 21 | misc.xml 22 | deploymentTargetDropDown.xml 23 | render.experimental.xml 24 | 25 | # Keystore files 26 | *.jks 27 | *.keystore 28 | 29 | # Google Services (e.g. APIs or Firebase) 30 | google-services.json 31 | 32 | # Android Profiling 33 | *.hprof -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /cat-drive-esp32/ota.h: -------------------------------------------------------------------------------- 1 | #ifndef CATDRIVEOTA_H 2 | #define CATDRIVEOTA_H 3 | 4 | #ifdef USE_OTA 5 | 6 | #include 7 | 8 | enum class UpdateStatus { 9 | None, 10 | UpdateStart, 11 | Updating, 12 | UpdateSuccedded, 13 | UpdateFailed 14 | }; 15 | 16 | typedef void (*OtaUpdateCallback)(UpdateStatus, String, int, int); 17 | 18 | namespace CatDriveOTA { 19 | void begin(const char* host, const char* ssid, const char* password); 20 | void handle(); 21 | String getAPIP(); 22 | 23 | UpdateStatus status(); 24 | size_t uploadedSize(); 25 | size_t totalSize(); 26 | String fileName(); 27 | 28 | void attachUpdateCallback(OtaUpdateCallback callback); 29 | } 30 | 31 | #endif 32 | #endif -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/java/com/meomeo/catdrive/ui/ActivityViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.meomeo.catdrive.ui 2 | 3 | import android.bluetooth.BluetoothDevice 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.ViewModel 6 | import com.meomeo.catdrive.lib.NavigationData 7 | 8 | class ActivityViewModel : ViewModel() { 9 | val permissionUpdatedTimestamp = MutableLiveData().apply { value = 0 } 10 | val navigationData = MutableLiveData().apply { value = NavigationData() } 11 | val speed = MutableLiveData().apply { value = 0 } 12 | val connectedDevice = MutableLiveData().apply { value = null } 13 | val serviceRunInBackground = MutableLiveData().apply { value = false } 14 | } -------------------------------------------------------------------------------- /cat-drive-esp32/Scheduler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SCHEDULER_GUARD(__current__, __var__) \ 4 | if (__var__ > __current__) __var__ = __current__ 5 | #define SCHEDULER_CREATE(__name__) static uint32_t __name__ = 0 6 | 7 | #define TOKENPASTE(x, y) x##y 8 | #define TOKENPASTE2(x, y) TOKENPASTE(x, y) 9 | #define DO_EVERY(duration) \ 10 | SCHEDULER_CREATE(TOKENPASTE2(scheduler_, __LINE__)); \ 11 | if (onSchedule(SCHEDULER_SOURCE, TOKENPASTE2(scheduler_, __LINE__), duration)) 12 | 13 | // this function already guard timekeeper variable 14 | static bool onSchedule(const uint32_t& current, uint32_t& var, const uint32_t& interval) { 15 | SCHEDULER_GUARD(current, var); 16 | if (current < var + interval) return false; 17 | 18 | var = current; 19 | return true; 20 | } -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/navigation/mobile_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 17 | -------------------------------------------------------------------------------- /cat-drive-android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /cat-drive-android/app/release/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "com.meomeo.catdrive", 8 | "variantName": "release", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 1, 15 | "versionName": "1.0", 16 | "outputFile": "app-release.apk" 17 | } 18 | ], 19 | "elementType": "File", 20 | "baselineProfiles": [ 21 | { 22 | "minApi": 28, 23 | "maxApi": 30, 24 | "baselineProfiles": [ 25 | "baselineProfiles/1/app-release.dm" 26 | ] 27 | }, 28 | { 29 | "minApi": 31, 30 | "maxApi": 2147483647, 31 | "baselineProfiles": [ 32 | "baselineProfiles/0/app-release.dm" 33 | ] 34 | } 35 | ], 36 | "minSdkVersionForDexing": 31 37 | } -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/java/com/meomeo/catdrive/lib/Intents.kt: -------------------------------------------------------------------------------- 1 | package com.meomeo.catdrive.lib 2 | 3 | import com.meomeo.catdrive.BuildConfig 4 | 5 | class Intents { 6 | companion object { 7 | private const val appId = BuildConfig.APPLICATION_ID 8 | 9 | const val EnableServices = "${appId}.intent.ENABLE_SERVICES" 10 | const val DisableServices = "${appId}.intent.DISABLE_SERVICES" 11 | const val BindLocalService = "${appId}.intent.LOCAL_BIND" 12 | const val BackgroundServiceStatus = "${appId}.intent.SERVICE_RUNNING" 13 | 14 | const val ConnectDevice = "${appId}.intent.CONNECT_DEVICE" 15 | const val ConnectionUpdate = "${appId}.intent.CONNECTION_UPDATE" 16 | 17 | const val NavigationUpdate = "${appId}.intent.NAVIGATION_UPDATE" 18 | const val GpsUpdate = "${appId}.intent.GPS_UPDATE" 19 | 20 | const val OpenNotificationListenerSettings = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/java/com/meomeo/catdrive/lib/NavigationNotification.kt: -------------------------------------------------------------------------------- 1 | package com.meomeo.catdrive.lib 2 | 3 | import android.app.Notification 4 | import android.content.Context 5 | import android.service.notification.StatusBarNotification 6 | 7 | open class NavigationNotification(context: Context, statusBarNotification: StatusBarNotification) { 8 | protected val mNotification: Notification = statusBarNotification.notification 9 | protected val mContext = context 10 | protected var mAppSourceContext: Context = mContext.createPackageContext( 11 | statusBarNotification.packageName, 12 | Context.CONTEXT_IGNORE_SECURITY 13 | ) 14 | 15 | private var mNavigationData: NavigationData = NavigationData() 16 | var navigationData 17 | get() = mNavigationData 18 | set(value) { 19 | if (value == mNavigationData) 20 | return 21 | mNavigationData = value 22 | } 23 | 24 | init { 25 | mNavigationData.postTime = NavigationTimestamp(statusBarNotification.postTime) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Son H. Mai (Mason) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /cat-drive-android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | android.defaults.buildfeatures.buildconfig=true 25 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CatDrive 3 | Home 4 | Settings 5 | Devices 6 | 7 | 8 | Device 9 | Service 10 | 11 | Select a device 12 | No device connected 13 | 14 | 15 | Run services 16 | Requires all permissions allowed & bluetooth turned on 17 | Missing permissions 18 | Go to notification settings 19 | 20 | Accessing notifications 21 | Posting notifications 22 | Accessing location 23 | Accessing bluetooth 24 | Turn light theme on or off 25 | Display light mode 26 | Change device LCD contrast to improve visibility 27 | Display contrast 28 | Speed warning limit 29 | 30 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/layout/activity_device_selection.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | \n" 24 | " \n" 25 | " \n" 26 | " \n" 79 | "\n" 80 | "\n" 81 | "\n" 82 | "\n" 83 | ; -------------------------------------------------------------------------------- /cat-drive-esp32/ota.cpp: -------------------------------------------------------------------------------- 1 | #ifdef USE_OTA 2 | #include "ota.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "pages/index.html.h" 10 | 11 | WebServer server(80); 12 | OtaUpdateCallback gUpdateCallback = nullptr; 13 | size_t gUploadedSize = 0; 14 | size_t gFileSize = 0; 15 | String gFileName; 16 | UpdateStatus gUpdateStatus = UpdateStatus::None; 17 | 18 | const char* redirect_html = ""; 21 | 22 | void CatDriveOTA::begin(const char* host, const char* ssid, const char* password) { 23 | WiFi.mode(WIFI_AP_STA); 24 | WiFi.softAP(ssid, password); 25 | 26 | server.on("/", HTTP_GET, []() { 27 | server.sendHeader("Connection", "close"); 28 | server.send(200, "text/html", redirect_html); 29 | }); 30 | 31 | server.on("/main", HTTP_GET, []() { 32 | server.sendHeader("Connection", "close"); 33 | server.send(200, "text/html", index_html); 34 | }); 35 | 36 | server.on("/updateFileSize", HTTP_PUT, []() { 37 | if (server.hasArg("plain")) { 38 | gFileSize = server.arg("plain").toInt(); 39 | } 40 | server.sendHeader("Connection", "close"); 41 | server.send(200, "text/plain", "OK"); 42 | }); 43 | 44 | server.on( 45 | "/update", HTTP_POST, []() { 46 | server.sendHeader("Connection", "close"); 47 | server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK"); 48 | ESP.restart(); 49 | }, 50 | []() { 51 | HTTPUpload& upload = server.upload(); 52 | UpdateStatus status; 53 | 54 | if (upload.status == UPLOAD_FILE_START) { 55 | Serial.printf("Update: %s\n", upload.filename.c_str()); 56 | status = UpdateStatus::UpdateStart; 57 | 58 | if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { 59 | Update.printError(Serial); 60 | status = UpdateStatus::UpdateFailed; 61 | } 62 | } else if (upload.status == UPLOAD_FILE_WRITE) { 63 | status = UpdateStatus::Updating; 64 | if (Update.write(upload.buf, upload.currentSize) != upload.currentSize) { 65 | Update.printError(Serial); 66 | status = UpdateStatus::UpdateFailed; 67 | } 68 | } else if (upload.status == UPLOAD_FILE_END) { 69 | status = UpdateStatus::UpdateSuccedded; 70 | // true to set the size to the current progress 71 | if (Update.end(true)) { 72 | Serial.printf("Update Success: %u\nRebooting...\n", upload.totalSize); 73 | } else { 74 | Update.printError(Serial); 75 | status = UpdateStatus::UpdateFailed; 76 | } 77 | } 78 | 79 | gFileName = upload.filename; 80 | gUploadedSize = upload.totalSize; 81 | gUpdateStatus = status; 82 | if (gUpdateCallback) 83 | gUpdateCallback(status, upload.filename, upload.totalSize, gFileSize); 84 | }); 85 | server.begin(); 86 | } 87 | 88 | void CatDriveOTA::handle() { 89 | server.handleClient(); 90 | } 91 | 92 | String CatDriveOTA::getAPIP() { 93 | return WiFi.softAPIP().toString(); 94 | } 95 | 96 | UpdateStatus CatDriveOTA::status() { 97 | return UpdateStatus(); 98 | } 99 | 100 | size_t CatDriveOTA::uploadedSize() { 101 | return gUploadedSize; 102 | } 103 | 104 | size_t CatDriveOTA::totalSize() { 105 | return gFileSize; 106 | } 107 | 108 | String CatDriveOTA::fileName() { 109 | return gFileName; 110 | } 111 | 112 | void CatDriveOTA::attachUpdateCallback(OtaUpdateCallback callback) { 113 | gUpdateCallback = callback; 114 | } 115 | 116 | #endif -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/res/layout/fragment_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 31 | 32 | 42 | 43 | 53 | 54 | 64 | 65 | 75 | 76 | 86 | 87 | -------------------------------------------------------------------------------- /cat-drive-android/app/src/main/java/com/meomeo/catdrive/ui/DeviceSelectionActivity.kt: -------------------------------------------------------------------------------- 1 | package com.meomeo.catdrive.ui 2 | 3 | import android.annotation.SuppressLint 4 | import android.bluetooth.BluetoothDevice 5 | import android.bluetooth.BluetoothManager 6 | import android.content.Context 7 | import android.content.Intent 8 | import android.os.Bundle 9 | import android.os.Parcelable 10 | import android.view.LayoutInflater 11 | import android.view.View 12 | import android.view.ViewGroup 13 | import android.widget.Button 14 | import android.widget.FrameLayout 15 | import android.widget.TextView 16 | import androidx.appcompat.app.AppCompatActivity 17 | import androidx.recyclerview.widget.RecyclerView 18 | import com.meomeo.catdrive.R 19 | import com.meomeo.catdrive.utils.PermissionCheck 20 | import kotlinx.parcelize.Parcelize 21 | import kotlinx.serialization.Serializable 22 | import timber.log.Timber 23 | 24 | class CustomAdapter(onSelectCallback: (BluetoothDevice) -> Unit) : RecyclerView.Adapter() { 25 | private var mDataSet: List = mutableListOf() 26 | private val mOnSelectCallback = onSelectCallback 27 | 28 | var dataSet 29 | get() = mDataSet 30 | set(value) { 31 | if (value == mDataSet) 32 | return 33 | mDataSet = value 34 | notifyDataSetChanged() 35 | } 36 | 37 | class ViewHolder(view: View) : RecyclerView.ViewHolder(view) { 38 | val txtDeviceName: TextView 39 | val txtDeviceAddress: TextView 40 | val frame: FrameLayout 41 | 42 | init { 43 | txtDeviceName = view.findViewById(R.id.txtItemDeviceName) 44 | txtDeviceAddress = view.findViewById(R.id.txtItemMacAddress) 45 | frame = view.findViewById(R.id.frame) 46 | } 47 | } 48 | 49 | // Create new views (invoked by the layout manager) 50 | override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder { 51 | // Create a new view, which defines the UI of the list item 52 | val view = LayoutInflater.from(viewGroup.context) 53 | .inflate(R.layout.device_row_item, viewGroup, false) 54 | 55 | return ViewHolder(view) 56 | } 57 | 58 | // Replace the contents of a view (invoked by the layout manager) 59 | @SuppressLint("MissingPermission") 60 | override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) { 61 | 62 | // Get element from your dataset at this position and replace the 63 | // contents of the view with that element 64 | viewHolder.txtDeviceName.text = dataSet[position].name 65 | viewHolder.txtDeviceAddress.text = dataSet[position].address 66 | 67 | viewHolder.frame.setOnClickListener { _ -> mOnSelectCallback(dataSet[position]) } 68 | } 69 | 70 | // Return the size of your dataset (invoked by the layout manager) 71 | override fun getItemCount() = dataSet.size 72 | } 73 | 74 | class DeviceSelectionActivity : AppCompatActivity() { 75 | private lateinit var mViewDeviceAdapter: CustomAdapter 76 | 77 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 78 | super.onActivityResult(requestCode, resultCode, data) 79 | getDeviceList() 80 | } 81 | 82 | private fun onDeviceSelected(device: BluetoothDevice) { 83 | Timber.w(device.toString()) 84 | setResult(RESULT_OK, Intent().apply { putExtra("device", device) }) 85 | finish() 86 | } 87 | 88 | override fun onCreate(savedInstanceState: Bundle?) { 89 | super.onCreate(savedInstanceState) 90 | setContentView(R.layout.activity_device_selection) 91 | 92 | supportActionBar?.setDisplayHomeAsUpEnabled(true) 93 | 94 | mViewDeviceAdapter = CustomAdapter(this::onDeviceSelected) 95 | findViewById(R.id.viewDeviceList).apply { adapter = mViewDeviceAdapter } 96 | findViewById