zhaochongyi
2024-08-26 d1849709bd583ca114e632ec5197991c5febae7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Controller } from "ee-core";
import { SerialPort } from "serialport";
const Services = require('ee-core/services')
 
class Port extends Controller{
 
  constructor(ctx){
    super(ctx)
  }
 
  async initPort(bool){
      console.log(bool)
    if(bool){
       SerialPort.list().then((ports)=>{
        setTimeout(()=>{
        })
       })
    }
  }
 
}