Some checks are pending
Build Android (APK + AAB) / build-android (push) Waiting to run
Identificado pelo diagnóstico: BMS do Karlão (bat2) usa protocolo JBD (Jiabaida) — service ff00, notify ff01, write ff02. Padrão de mercado para BMS chineses (Overkill Solar, Hankzor, JBD oficial, LLT Power, Xiaoxiang) — cobre ~80% dos BMS BLE de lítio. Implementação: - Auto-detect: ao parear, se device tem service ff00 → ativa parser JBD - bmsAttachJBD() subscribe na char ff01 (notify) + envia comando 0x03 - Comando: DD A5 03 00 FF FD 77 (Read Basic Info) - Reassembly de chunks BLE (max 20 bytes/chunk) até receber 0x77 (end) - Parser decodifica: voltage (uint16/100), current (int16/100, signed), remaining/total capacity (Ah), cycle count, protection bitfield, SoC (%), FET status, cell count, temperatures (kelvin*10 → °C) - Re-poll a cada 30s pra atualizar dados em tempo real - Auto-sync lastBattery com BMS soc pra card resumido UI expandida: - Card BMS com 3 stats grandes: TENSÃO (V) · CORRENTE (A) · POTÊNCIA (W) - Cor dinâmica: verde se carregando (current>0), amarelo se descarregando - Linha extra: status flow + capacidade (remain/total Ah) + ciclos + temps - Block de células individuais (4S/8S/16S detectado automaticamente) - Border-left do card colorido conforme estado de fluxo Protocolo de referência: gitlab.com/bms-tools/bms-tools Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
63 lines
2.4 KiB
Groovy
63 lines
2.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "br.com.pontualtech.shivao"
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "br.com.pontualtech.shivao"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode 16
|
|
versionName "1.10.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
aaptOptions {
|
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
|
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
|
}
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
storeFile file('shivao-release.keystore')
|
|
storePassword 'ShivaoKeystore2026!'
|
|
keyAlias 'shivao'
|
|
keyPassword 'ShivaoKeystore2026!'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
flatDir{
|
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
|
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
|
implementation project(':capacitor-android')
|
|
testImplementation "junit:junit:$junitVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
implementation project(':capacitor-cordova-android-plugins')
|
|
}
|
|
|
|
apply from: 'capacitor.build.gradle'
|
|
|
|
try {
|
|
def servicesJSON = file('google-services.json')
|
|
if (servicesJSON.text) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|
|
} catch(Exception e) {
|
|
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
}
|