package main

import (
	"github.com/gogf/gf/v2/errors/gerror"
	"go.uber.org/zap"
	"tgk-touch/internal/library/meterControl"
	"tgk-touch/internal/module/maincontrollerClient"
)

func main() {
	err := maincontrollerClient.UseSerialPort(`/dev/ttyS2`, 8600)
	if err != nil {
		panic(gerror.Wrap(err, "串口启动失败"))
	}
	power, err := meterControl.GetMeterControls(meterControl.ADL400).ReadTotalPower("", 0x04)
	if err != nil {
		panic(err)
		return
	}
	zap.S().Debugf("power: %+v", power)
}
