|
2 년 전 | |
---|---|---|
Swift_TpmsBleSDKDemo | 2 년 전 | |
TPMSBleSDKDemo | 4 년 전 | |
README.md | 2 년 전 | |
README_CN.md | 2 년 전 |
Version | Update time | Author | Update information |
---|---|---|---|
v1.0 | 2019/07/08 | JosonXiong | Preliminary version |
v1.1.1 | 2023/06/26 | Larry | Document filing |
Minimum version iOS 8.0 The Bluetooth version used by the device requires 4.0 and above.
[ELTPMSBleManager shareManager].delegate = self;
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
-(void)TPMSBleManagerReceiveData:(ELTPMSDataModel *_Nonnull)model;
Proxy method:
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
Get the current Bluetooth status Or
[ELTPMSBleManager shareManager].isOn
Get current Bluetooth enabled is available;
[[ELTPMSBleManager shareManager] startScan];
[[ELTPMSBleManager shareManager] stopScan];
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
This method is used to get the current state of Bluetooth, where the parameter “state” is an enumeration TPMSBluetoothState The enumerated elements include: TPMSBluetoothStateAvailable (Bluetooth on TPMSBluetoothStateUnavailable), TPMSBluetoothStateBroadcasting, TPMSBluetoothStateStopBroadcasting
-(void)TPMSBleManagerReceiveData:(ELTPMSDataModel *_Nonnull)model;
This method is used to call back the TPMS Bluetooth module broadcast data. The model is an ELTPMSDataModel data model. For details on the ELTPMSDataModel class, please see “Remarks”.
ELTPMSDataModel(Broadcast data model) |Type |Parameter |Description| |---- |-------: |----------:| |ELTPMSDataType|type|Type of data| |int|classID|Product number| |double|v|Voltage coefficient (unit: V)| |double |p|Pressure coefficient (unit: kPa)| |int |t|Temperature coefficient (unit: °C)| |ELTPMSDeviceState|state|Tire pressure status| |int| mcuVersion|MCU version number| |int |startCount|Operation counts| |int |stopCount| Number of sneak stops| |NSString|bleVersion|Bluetooth version number| |NSString |macAddress|MAC address| |NSString| name|Bluetooth name| |NSInteger|createTime|Time when data was received|
ELTPMSHeader.h(head File) Provide tire pressure unit, temperature unit, and the conversion method between units and the name symbol of the corresponding unit.