| | |
| | | import { confingInfoStore } from '@/stores/StoresConfing' |
| | | |
| | | const initPort=(path:String,baudRate:Number)=>{ |
| | | |
| | | // 是否清零了 |
| | | let sfqingling=true |
| | | // 配置文件定义的对此次数 |
| | | const yanjiancishu=confingInfoStore().confingInfo.jianyancishu===undefined?4:confingInfoStore().confingInfo.jianyancishu |
| | | console.log('初始化打开XK3190-A12体重秤端口',yanjiancishu) |
| | |
| | | duibinum=0 |
| | | } |
| | | // 对比4次结果都一致 |
| | | if(duibinum>=yanjiancishu){ |
| | | if(duibinum>=yanjiancishu&&sfqingling){ |
| | | // 数据发送 体重没有清零 下次就不播报不发送 |
| | | sfqingling=false |
| | | const res=Number(list) |
| | | console.log(res,'获取到的体重') |
| | | sockteStore().setweightSockte( |
| | |
| | | |
| | | |
| | | }else{ |
| | | sfqingling=true |
| | | console.log('小于20') |
| | | } |
| | | }) // all data after READY is received |