完成待机基本功能

This commit is contained in:
2024-11-06 16:01:03 +08:00
parent ab0678aa3b
commit 239d542edc
2 changed files with 10 additions and 10 deletions

View File

@@ -5,25 +5,25 @@ type WaitType int
const ( const (
WaitAudio WaitType = iota WaitAudio WaitType = iota
WaitVideo WaitVideo
WaitWeb
WaitTTS WaitTTS
WaitRelay WaitRelay
WaitWeb
) )
type TimeModel struct { type TimeModel struct {
Start int64 Start int64 `json:"start"`
End int64 End int64 `json:"end"`
} }
type WaitItemModel struct { type WaitItemModel struct {
TimeModel TimeModel
Type WaitType Type WaitType `json:"type"`
Data string Data string `json:"data"`
Interval int64 Interval int64 `json:"interval"`
} }
type WaitModel struct { type WaitModel struct {
JsonModel JsonModel
TimeModel TimeModel
Items []WaitItemModel Items []WaitItemModel `json:"items"`
} }

View File

@@ -136,10 +136,10 @@ Payload:
"start": 1730793361, "start": 1730793361,
// 结束时间戳(s), 默认根的时间戳, 只有在根执行时间内才会执行 // 结束时间戳(s), 默认根的时间戳, 只有在根执行时间内才会执行
"end": 1730793368, "end": 1730793368,
// 间隔时间(s), default 0 // 间隔时间(s), 类型>2时, 该项无效, default 0
"interval": 0, "interval": 0,
// 事件类型(0: 音频; 1: 视频; 2: 网页; 3: TTS; 4: 继电器), default 0 // 事件类型(0: 音频; 1: 视频; 2: TTS; 3: 继电器; 4: 网页), default 0
"type": 3, "type": 2,
// 事件数据(TTS为文字, 继电器为端口号, 其他都为地址链接。支持 file:// 本地文件地址、 http(s):// 远程文件地址) // 事件数据(TTS为文字, 继电器为端口号, 其他都为地址链接。支持 file:// 本地文件地址、 http(s):// 远程文件地址)
"data": "", "data": "",
}, },