commit 2a6712381f7af64c446e2120dcd27697180cffae Author: 玖叁 Date: Thu Dec 19 00:32:20 2024 +0800 init 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..f80b637 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +esp32-car \ No newline at end of file diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml new file mode 100644 index 0000000..371f2e2 --- /dev/null +++ b/.idea/appInsightsSettings.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b589d56 --- /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/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..0897082 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ 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..6806f5a --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,53 @@ + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..fdf8d99 --- /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..0ad17cb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ 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/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..6eeb3d7 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,69 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) +} + +android { + namespace = "icu.fur93.esp32_car" + compileSdk = 34 + + defaultConfig { + applicationId = "icu.fur93.esp32_car" + minSdk = 28 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary = true + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = "1.5.1" + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +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) +} \ 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/icu/fur93/esp32_car/ExampleInstrumentedTest.kt b/app/src/androidTest/java/icu/fur93/esp32_car/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..2ee868e --- /dev/null +++ b/app/src/androidTest/java/icu/fur93/esp32_car/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package icu.fur93.esp32_car + +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.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("icu.fur93.esp32_car", 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..8b73cd9 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/icu/fur93/esp32_car/MainActivity.kt b/app/src/main/java/icu/fur93/esp32_car/MainActivity.kt new file mode 100644 index 0000000..6c3c9ff --- /dev/null +++ b/app/src/main/java/icu/fur93/esp32_car/MainActivity.kt @@ -0,0 +1,406 @@ +package icu.fur93.esp32_car + +import android.Manifest +import android.bluetooth.BluetoothAdapter +import android.bluetooth.BluetoothGatt +import android.bluetooth.BluetoothGattCallback +import android.bluetooth.BluetoothGattCharacteristic +import android.bluetooth.le.BluetoothLeScanner +import android.bluetooth.le.ScanCallback +import android.bluetooth.le.ScanFilter +import android.bluetooth.le.ScanResult +import android.bluetooth.le.ScanSettings +import android.content.pm.ActivityInfo +import android.content.pm.PackageManager +import android.os.Bundle +import android.os.Handler +import android.os.Looper +import android.os.ParcelUuid +import android.util.Log +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.gestures.Orientation +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.unit.dp +import androidx.core.app.ActivityCompat +import java.util.UUID +import kotlin.reflect.KFunction1 + +class MainActivity : ComponentActivity() { + private val serviceUUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E" + private val rxCharUUID = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E" + private val txCharUUID = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E" + + private var bluetoothGatt: BluetoothGatt? = null + private var rxCharacteristic: BluetoothGattCharacteristic? = null + private var bleScanner: BluetoothLeScanner? = null + + // 将deviceList移动到Activity作用域内并使用MutableList + private val deviceList = mutableListOf() + + // 添加可观察的连接状态 + private val _isConnected = mutableStateOf(false) + val isConnected: State = _isConnected + + private val scanCallback = object : ScanCallback() { + override fun onScanResult(callbackType: Int, result: ScanResult) { + super.onScanResult(callbackType, result) + Log.d("MainActivity", "onScanResult: ${result.device.name} - ${result.device.address}") + if (!deviceList.any { it.device.address == result.device.address }) { + deviceList.add(result) + } + } + + override fun onScanFailed(errorCode: Int) { + super.onScanFailed(errorCode) + Log.e("MainActivity", "扫描失败,错误码: $errorCode") + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + // 设置横屏 + requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE + + // 检查并请求所有必要的权限 + val requiredPermissions = arrayOf( + Manifest.permission.BLUETOOTH_SCAN, + Manifest.permission.BLUETOOTH_CONNECT, + Manifest.permission.ACCESS_FINE_LOCATION, + Manifest.permission.ACCESS_COARSE_LOCATION + ) + + val missingPermissions = requiredPermissions.filter { + ActivityCompat.checkSelfPermission(this, it) != PackageManager.PERMISSION_GRANTED + } + + if (missingPermissions.isNotEmpty()) { + ActivityCompat.requestPermissions( + this, + missingPermissions.toTypedArray(), + BLUETOOTH_PERMISSION_REQUEST_CODE + ) + } else { + // 如果已经有所有权限,直接开始扫描 + val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() + bleScanner = bluetoothAdapter?.bluetoothLeScanner + startBleScan() + } + + setContent { + GamepadScreen( + deviceList = deviceList, + isConnected = isConnected.value, + onStartScan = ::startBleScan, + onConnect = ::connectToDevice, + onSendCommand = ::sendCommand + ) + } + } + + private fun sendCommand(command: ByteArray) { + rxCharacteristic?.let { characteristic -> + characteristic.value = command; + if (ActivityCompat.checkSelfPermission( + this, + Manifest.permission.BLUETOOTH_CONNECT + ) != PackageManager.PERMISSION_GRANTED + ) { + // 请求蓝牙连接权限 + ActivityCompat.requestPermissions( + this, + arrayOf(Manifest.permission.BLUETOOTH_CONNECT), + BLUETOOTH_PERMISSION_REQUEST_CODE + ) + return + } + bluetoothGatt?.writeCharacteristic(characteristic) + } + } + + private fun connectToDevice(result: ScanResult) { + if (ActivityCompat.checkSelfPermission( + this, + Manifest.permission.BLUETOOTH_CONNECT + ) != PackageManager.PERMISSION_GRANTED + ) { + ActivityCompat.requestPermissions( + this, + arrayOf(Manifest.permission.BLUETOOTH_CONNECT), + BLUETOOTH_PERMISSION_REQUEST_CODE + ) + return + } + + result.device.connectGatt(this, false, object : BluetoothGattCallback() { + override fun onConnectionStateChange(gatt: BluetoothGatt?, status: Int, newState: Int) { + super.onConnectionStateChange(gatt, status, newState) + when (newState) { + BluetoothGatt.STATE_CONNECTED -> { + bluetoothGatt = gatt + _isConnected.value = true + gatt?.discoverServices() + } + + BluetoothGatt.STATE_DISCONNECTED -> { + _isConnected.value = false + bluetoothGatt = null + } + } + } + + override fun onServicesDiscovered(gatt: BluetoothGatt?, status: Int) { + super.onServicesDiscovered(gatt, status) + if (status == BluetoothGatt.GATT_SUCCESS) { + gatt?.getService(UUID.fromString(serviceUUID))?.let { service -> + rxCharacteristic = service.getCharacteristic(UUID.fromString(rxCharUUID)) + } + } + } + }) + } + + private fun startBleScan() { + if (ActivityCompat.checkSelfPermission( + this, + Manifest.permission.BLUETOOTH_SCAN + ) != PackageManager.PERMISSION_GRANTED + ) { + ActivityCompat.requestPermissions( + this, + arrayOf( + Manifest.permission.BLUETOOTH_SCAN, + Manifest.permission.ACCESS_FINE_LOCATION + ), + BLUETOOTH_PERMISSION_REQUEST_CODE + ) + return + } + + // 先停止当前扫描 + try { + bleScanner?.stopScan(scanCallback) + } catch (e: Exception) { + Log.e("MainActivity", "停止扫描失败: ${e.message}") + } + + // 清空之前的扫描结果 + deviceList.clear() + + Log.d("MainActivity", "开始扫描...") + + // 添加UUID过滤器 + val scanFilter = ScanFilter.Builder() + .setServiceUuid(ParcelUuid.fromString(serviceUUID)) + .build() + + val scanSettings = ScanSettings.Builder() + .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY) + .build() + + try { +// bleScanner?.startScan(listOf(scanFilter), scanSettings, scanCallback) + bleScanner?.startScan(scanCallback) + } catch (e: Exception) { + Log.e("MainActivity", "开始扫描失败: ${e.message}") + } + + // 10秒后停止扫描 + Handler(Looper.getMainLooper()).postDelayed({ + stopBleScan() + Log.d("MainActivity", "停止扫描,发现 ${deviceList.size} 个设备") + }, 10000) + } + + private fun stopBleScan() { + if (ActivityCompat.checkSelfPermission( + this, + Manifest.permission.BLUETOOTH_SCAN + ) != PackageManager.PERMISSION_GRANTED + ) { + return + } + try { + bleScanner?.stopScan(scanCallback) + } catch (e: Exception) { + Log.e("MainActivity", "停止扫描失败: ${e.message}") + } + } + + // 添加权限请求结果处理 + override fun onRequestPermissionsResult( + requestCode: Int, + permissions: Array, + grantResults: IntArray + ) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults) + if (requestCode == BLUETOOTH_PERMISSION_REQUEST_CODE) { + if (grantResults.all { it == PackageManager.PERMISSION_GRANTED }) { + Log.d("MainActivity", "所有权限已获得") + // 权限获得后重新初始化蓝牙 + val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() + bleScanner = bluetoothAdapter?.bluetoothLeScanner + } else { + Log.e("MainActivity", "部分权限未获得") + } + } + } + + override fun onDestroy() { + super.onDestroy() + // 确保在Activity销毁时停止扫描 + stopBleScan() + } + + companion object { + private const val BLUETOOTH_PERMISSION_REQUEST_CODE = 1 + } +} + +@Composable +fun GamepadScreen( + deviceList: List, + isConnected: Boolean, + onStartScan: () -> Unit, + onConnect: (ScanResult) -> Unit, + onSendCommand: KFunction1 +) { + var showDeviceList by remember { mutableStateOf(false) } + var sliderValue by remember { mutableStateOf(0f) } + + Box(modifier = Modifier.fillMaxSize()) { + // 设备选择按钮 + Button( + onClick = { showDeviceList = true }, + modifier = Modifier + .align(Alignment.TopEnd) + .padding(16.dp) + ) { + Text(if (isConnected) "已连接" else "选择设备") + } + + // 方向控制布局 + Row( + modifier = Modifier.fillMaxSize(), + horizontalArrangement = Arrangement.SpaceEvenly, + verticalAlignment = Alignment.CenterVertically + ) { + // 左侧控制区 + Column( + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + modifier = Modifier.weight(1f) + ) { + Row( + horizontalArrangement = Arrangement.spacedBy(16.dp), + modifier = Modifier.padding(vertical = 16.dp) + ) { + Button(onClick = { + onSendCommand( + byteArrayOf( + 0x00, 0x06, 0x21, 0x00, 0x10, 0xff.toByte(), + 0xff.toByte() + ) + ) + }) { Text("左转") } + Button(onClick = { + onSendCommand( + byteArrayOf( + 0x00, 0x06, 0x20, 0x01, 0x10, 0xff.toByte(), + 0xff.toByte() + ) + ) + }) { Text("右转") } + } + } + + // 右侧控制区 + Column( + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + modifier = Modifier.weight(1f) + ) { + // 垂直滑杆 + Slider( + value = sliderValue, + onValueChange = { newValue -> + sliderValue = newValue + val speed = (newValue * 255).toInt() + val command = if (speed >= 0) { + byteArrayOf( + 0x00, 0x06, 0x20, 0x01, speed.toByte(), + 0xff.toByte() + ) + } else { + byteArrayOf( + 0x00, 0x06, 0x20, 0x02, (-speed).toByte(), + 0xff.toByte() + ) + } + onSendCommand(command) + }, + valueRange = -1f..1f, + modifier = Modifier + .height(20.dp) + .width(200.dp) + .padding(vertical = 16.dp) + .graphicsLayer(rotationZ = 270f) // 旋转 270 度 + ) + } + + } + + // 设备列表对话框 + if (showDeviceList) { + AlertDialog( + onDismissRequest = { showDeviceList = false }, + title = { Text("选择设备") }, + text = { + // 设备列表 + LazyColumn { + items(deviceList) { device -> + TextButton( + onClick = { + onConnect(device) + showDeviceList = false + }, + modifier = Modifier.fillMaxWidth() + ) { + Column( + modifier = Modifier.fillMaxWidth(), + horizontalAlignment = Alignment.Start + ) { + Text(device.device.name ?: "未知设备") + Text( + device.device.address, + style = MaterialTheme.typography.bodySmall + ) + } + } + } + } + }, + dismissButton = { + TextButton( + onClick = { onStartScan() } + ) { + Text("扫描设备") + } + }, + confirmButton = { + TextButton(onClick = { showDeviceList = false }) { + Text("取消") + } + } + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/icu/fur93/esp32_car/ui/theme/Color.kt b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Color.kt new file mode 100644 index 0000000..37c8969 --- /dev/null +++ b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package icu.fur93.esp32_car.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/icu/fur93/esp32_car/ui/theme/Theme.kt b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Theme.kt new file mode 100644 index 0000000..2368595 --- /dev/null +++ b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Theme.kt @@ -0,0 +1,58 @@ +package icu.fur93.esp32_car.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 + + /* Other default colors to override + background = Color(0xFFFFFBFE), + surface = Color(0xFFFFFBFE), + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Color(0xFF1C1B1F), + onSurface = Color(0xFF1C1B1F), + */ +) + +@Composable +fun Esp32carTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + // Dynamic color is available on Android 12+ + 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/icu/fur93/esp32_car/ui/theme/Type.kt b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Type.kt new file mode 100644 index 0000000..cac3bc5 --- /dev/null +++ b/app/src/main/java/icu/fur93/esp32_car/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package icu.fur93.esp32_car.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 + +// Set of Material typography styles to start with +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + /* Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ), + labelSmall = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Medium, + fontSize = 11.sp, + lineHeight = 16.sp, + letterSpacing = 0.5.sp + ) + */ +) \ 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 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ 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 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ 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 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ 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 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ 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..92b14e1 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + esp32-car + \ 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..aa4199d --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +