设置压力开关

功能表:setPressureData 【getPressureNotifyFlagMode,v2SendCalibrationThreshold(SDK待补充)】

Flutter示例:

/// 设置压力开关事件号
setStressSwitch(
  evtBase: _VBusEvtBase.base_app_set,
  evtType: _VBusEvtType.app_set_pressure),

/// 设置压力开关
libManager.send(evt: CmdEvtType.setStressSwitch, json: jsonEncode(json));

App下发的json字段

字段名 字段类型 字段说明
on_off int 总开关
1开 0关闭
start_hour int 开始时间 时
start_minute int 开始时间 分
end_hour int 结束时间 时
end_minute int 结束时间 分
remind_on_off int 压力提醒开关
1开 0关
on_off为关则提醒不起作用
repeat int 预留
interval int 提醒间隔,单位分钟 默认60分钟
high_threshold int 压力过高阈值
stress_threshold int 压力校准阈值,默认是80
需要固件开启功能表支持 v2_send_calibration_threshold
notify_flag int 通知类型
0:无效
1:允许通知
2:静默通知
3:关闭通知
需要固件开启功能表支持 V3_pressure_add_notify_flag_and_mode

示例:

{
   "on_off":1,
   "start_hour":14,
   "start_minute":0,
   "end_hour":20,
   "end_minute":0,
   "remind_on_off":1,
   "repeat":127,
   "interval":60,
   "high_threshold":170,
   "stress_threshold":80,
   "notify_flag":1
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by Gitbook修订时间: 2026-04-07 16:03:47

results matching ""

    No results matching ""