buildSettings = { | buildSettings = { | ||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 20230206; | |||||
CURRENT_PROJECT_VERSION = 20230209; | |||||
DEVELOPMENT_TEAM = YEU77XR292; | DEVELOPMENT_TEAM = YEU77XR292; | ||||
FRAMEWORK_SEARCH_PATHS = ( | FRAMEWORK_SEARCH_PATHS = ( | ||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | "$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | ||||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/BhBodyComposition120", | "$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/BhBodyComposition120", | ||||
); | ); | ||||
MARKETING_VERSION = 1.5.9; | |||||
MARKETING_VERSION = 1.5.10_beta01; | |||||
OTHER_LDFLAGS = "-ObjC"; | OTHER_LDFLAGS = "-ObjC"; | ||||
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
buildSettings = { | buildSettings = { | ||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 20230206; | |||||
CURRENT_PROJECT_VERSION = 20230209; | |||||
DEVELOPMENT_TEAM = YEU77XR292; | DEVELOPMENT_TEAM = YEU77XR292; | ||||
FRAMEWORK_SEARCH_PATHS = ( | FRAMEWORK_SEARCH_PATHS = ( | ||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | "$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | ||||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/BhBodyComposition120", | "$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/BhBodyComposition120", | ||||
); | ); | ||||
MARKETING_VERSION = 1.5.9; | |||||
MARKETING_VERSION = 1.5.10_beta01; | |||||
OTHER_LDFLAGS = "-ObjC"; | OTHER_LDFLAGS = "-ObjC"; | ||||
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; |
[[ELToothbrushBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdTypeGetBatteryState)]; | [[ELToothbrushBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdTypeGetBatteryState)]; | ||||
//获取蓝牙和wifi连接状态 | //获取蓝牙和wifi连接状态 | ||||
[[ELToothbrushBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdTypeGetConnectState)]; | [[ELToothbrushBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdTypeGetConnectState)]; | ||||
//离线历史记录-步骤1:获取条数 | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataCount]; | |||||
} | } | ||||
} | } | ||||
#pragma mark ============ ELBluetoothManagerDelegate ============== | #pragma mark ============ ELBluetoothManagerDelegate ============== | ||||
//离线历史记录-步骤2:返回条数 | |||||
- (void)toothbrushtReceiveToothbrushOfflineDataCount:(unsigned char)count result:(unsigned char)result { | |||||
[self addLog:[NSString stringWithFormat:@"离线历史记录:%d条,结果:%d", count, result]]; | |||||
BOOL success = (result == 0); | |||||
if (success && count > 0) { | |||||
//离线历史记录-步骤3:请求接收 | |||||
[self addLog:@"请求接收离线历史记录"]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataStart]; | |||||
} | |||||
} | |||||
//离线历史记录-步骤4:上报给APP | |||||
- (void)toothbrushtReceiveToothbrushOfflineData:(ToothbrushOfflineData)data { | |||||
//离线历史记录-步骤5:通知模块发下一组数据 | |||||
[self addLog:@"app通知模块可以发送下一组离线历史记录数据"]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineNextRecord]; | |||||
} | |||||
//离线历史记录-步骤6:发送过程 | |||||
- (void)toothbrushReceiveRecordDataStatus:(enum ToothbrushOfflineRecrodStatusType)status { | |||||
switch (status) { | |||||
case ToothbrushOfflineRecrodStatusType_DataCompleted_00: { | |||||
[self addLog:@"离线历史记录数据全部发送完成"]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataCancel]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataClear]; | |||||
} | |||||
break; | |||||
case ToothbrushOfflineRecrodStatusType_DataAbnormal_01: { | |||||
[self addLog:@"离线历史记录数据发送异常"]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataCancel]; | |||||
[[ELToothbrushBleManager shareManager] getOfflineDataClear]; | |||||
} | |||||
break; | |||||
case ToothbrushOfflineRecrodStatusType_SendNextData_02: | |||||
break; | |||||
default: | |||||
break; | |||||
} | |||||
} | |||||
// | // | ||||
-(void)bluetoothManagerReceiveDeviceAuthorizeResult:(ELBluetoothDeviceAuthorizeResult)result{ | -(void)bluetoothManagerReceiveDeviceAuthorizeResult:(ELBluetoothDeviceAuthorizeResult)result{ | ||||
if (result == ELBluetoothDeviceAuthorizeResultNoAuth) { | if (result == ELBluetoothDeviceAuthorizeResultNoAuth) { |
#import "ELCoffeeScaleBleDataModel.h" | #import "ELCoffeeScaleBleDataModel.h" | ||||
#import "ELCoffeeScaleBleHeader.h" | #import "ELCoffeeScaleBleHeader.h" | ||||
#import "ELCoffeeScaleBleManager.h" | #import "ELCoffeeScaleBleManager.h" | ||||
#import "AILinkBleSDK_Version.h" | |||||
#import "ELBlePublicTool.h" | #import "ELBlePublicTool.h" | ||||
#import "ELBluetoothManager+BleWifi.h" | #import "ELBluetoothManager+BleWifi.h" | ||||
#import "ELBluetoothManager+BleWifi_Callback.h" | #import "ELBluetoothManager+BleWifi_Callback.h" |
// | |||||
// AILinkBleSDK_Version.h | |||||
// Pods | |||||
// | |||||
// Created by LarryZhang on 2023/2/9. | |||||
// | |||||
#ifndef AILinkBleSDK_Version_h | |||||
#define AILinkBleSDK_Version_h | |||||
//版本号 SDK Version | |||||
#define AiLinkBleSDKVersion @"1.5.10_beta01" //20230209 优化牙刷 | |||||
#endif /* AILinkBleSDK_Version_h */ |
#import "ELBlePublicTool.h" | #import "ELBlePublicTool.h" | ||||
#import "ELBluetoothManager+Settings_Callback.h" | #import "ELBluetoothManager+Settings_Callback.h" | ||||
#import "ELBluetoothManager+BleWifi_Callback.h" | #import "ELBluetoothManager+BleWifi_Callback.h" | ||||
//版本号 SDK Version | |||||
#define AiLinkBleSDKVersion @"1.5.9" //20230206 增加身高体脂秤 (Add Height Body Fat Scale) | |||||
#import "AILinkBleSDK_Version.h" | |||||
NS_ASSUME_NONNULL_BEGIN | NS_ASSUME_NONNULL_BEGIN |
//Get supported gear(获取支持的档位) | //Get supported gear(获取支持的档位) | ||||
- (void)getGear; | - (void)getGear; | ||||
/// Set brushing mode(设置刷牙模式) | |||||
/// Set brushing mode(设置刷牙模式) //******** wifi 牙刷专用方法 | |||||
/// @param gearType Brushing mode(刷牙模式) | /// @param gearType Brushing mode(刷牙模式) | ||||
/// @param interval Brushing time (0: do not modify the working time, before keeping)(刷牙时间(0:不修改工作时长,保留之前)) | /// @param interval Brushing time (0: do not modify the working time, before keeping)(刷牙时间(0:不修改工作时长,保留之前)) | ||||
/// @param supportType Which gear is it(是哪个档位) | /// @param supportType Which gear is it(是哪个档位) | ||||
- (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType; | - (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType withCid:(ELSupportDeviceType)cid; | - (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType withCid:(ELSupportDeviceType)cid; | ||||
/// Get the current working gear(获取当前工作的档位) | |||||
/// Get the current working gear(获取当前工作的档位) //******** wifi 牙刷专用方法 | |||||
- (void)getWorkGear; | - (void)getWorkGear; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)getWorkGearWithCid:(ELSupportDeviceType)cid; | - (void)getWorkGearWithCid:(ELSupportDeviceType)cid; | ||||
/// try out(试用) | |||||
/// try out(试用) //******** wifi 牙刷专用方法 | |||||
/// @param gear Gear (ToothbrushGearTypeStop_00 means stop trial)(档位(ToothbrushGearTypeStop_00 表示停止试用)) | /// @param gear Gear (ToothbrushGearTypeStop_00 means stop trial)(档位(ToothbrushGearTypeStop_00 表示停止试用)) | ||||
/// @param supportType Which gear(第几档) | /// @param supportType Which gear(第几档) | ||||
/// @param frequency 频率 | /// @param frequency 频率 | ||||
/// @param duty 占空比 | /// @param duty 占空比 | ||||
- (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty; | - (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty withCid:(ELSupportDeviceType)cid; | - (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty withCid:(ELSupportDeviceType)cid; | ||||
/// Get the current work stage(获取当前工作阶段) | |||||
/// Get the current work stage(获取当前工作阶段) //******** wifi 牙刷专用方法 | |||||
- (void)getWorkPhase; | - (void)getWorkPhase; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)getWorkPhaseWithCid:(ELSupportDeviceType)cid; | - (void)getWorkPhaseWithCid:(ELSupportDeviceType)cid; | ||||
/// Set manual setting gear(设置手动设置档位) | |||||
/// Set manual setting gear(设置手动设置档位) //******** wifi 牙刷专用方法 | |||||
/// @param frequency 频率 | /// @param frequency 频率 | ||||
/// @param duty 占空比 | /// @param duty 占空比 | ||||
/// @param interval 时间 | /// @param interval 时间 | ||||
- (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval; | - (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval withCid:(ELSupportDeviceType)cid; | - (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval withCid:(ELSupportDeviceType)cid; | ||||
/// Get manual profile data(获取手动设置档数据) | /// Get manual profile data(获取手动设置档数据) | ||||
//Get three-axis data(获取三轴数据) | //Get three-axis data(获取三轴数据) | ||||
- (void)getTriaxialData; | - (void)getTriaxialData; | ||||
//Set the second gear default gear(设置二档默认档位) | |||||
//Set the second gear default gear(设置二档默认档位) //******** wifi 牙刷专用方法 | |||||
- (void)setTwoGearDefaultGear:(ToothbrushGearType)gear; | - (void)setTwoGearDefaultGear:(ToothbrushGearType)gear; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)setTwoGearDefaultGear:(ToothbrushGearType)gear withCid:(ELSupportDeviceType)cid; | - (void)setTwoGearDefaultGear:(ToothbrushGearType)gear withCid:(ELSupportDeviceType)cid; | ||||
//Get the second gear default gear(获取二档默认档位) | //Get the second gear default gear(获取二档默认档位) | ||||
- (void)getTwoGearDefualt; | - (void)getTwoGearDefualt; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)getTwoGearDefualtWithCid:(ELSupportDeviceType)cid; | - (void)getTwoGearDefualtWithCid:(ELSupportDeviceType)cid; | ||||
//Report the results of receiving brushing data(上报刷牙数据接收结果) | |||||
//Report the results of receiving brushing data(上报刷牙数据接收结果) //******** wifi 牙刷专用方法 | |||||
- (void)reportReceiveResultOfToothbrushData:(BOOL)result; | - (void)reportReceiveResultOfToothbrushData:(BOOL)result; | ||||
//******** 通用牙刷专用方法 | |||||
- (void)reportReceiveResultOfToothbrushData:(BOOL)result withCid:(ELSupportDeviceType)cid; | - (void)reportReceiveResultOfToothbrushData:(BOOL)result withCid:(ELSupportDeviceType)cid; | ||||
///清除wifi记录指令 | ///清除wifi记录指令 |