tpms_processor 0.0.7 copy "tpms_processor: ^0.0.7" to clipboard
tpms_processor: ^0.0.7 copied to clipboard

This is a tool for parsing tpms data

example/lib/main.dart

import 'package:tpms_processor/tpms_processor.dart';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';

void main() async {
  final tpms = TpmsProcessor();

  // 1. 初始化配置
  await tpms.initializeWithConfig(Config(
      tireNum: 4,
      pStandardF: "230",
  ));
  final testData = [0x02, 0x10, 0x01, 0x42, 0x6E, 0xC4, 0xC1, 0xC7, 0x03, 0x66, 0x00, 0x54, 0x00, 0x00, 0x01, 0x5D];

  // 2. 处理蓝牙数据
  final bleData = ReceiveModel("TPMS", "AA:BB:CC",
      AdvertisementData(advName: "TPMS", appearance: 0, connectable:true, manufacturerData: {0x0B35: testData}, txPowerLevel:-50, serviceData:{}, serviceUuids:[]), -50);

  final result = await tpms.inputBleData(bleData);
  print("压力: ${result.pressure}kPa, 温度: ${result.temperature}℃");

  // 3. 更新车速
  await tpms.inputGpsSpeed(40.0);

  // 4. 重置状态
  await tpms.reset();
}
0
likes
85
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

This is a tool for parsing tpms data

Homepage
Repository (GitHub)

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_blue_plus, plugin_platform_interface

More

Packages that depend on tpms_processor

Packages that implement tpms_processor