You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
500 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package m9zApi
import "tgk-touch/internal/library/m9z"
// 开始任务用于日落开灯,结束任务用于日出关灯。
// rise/set 的协议语义保持不变rise 始终是日出set 始终是日落。
func applyStartTaskSolarTime(task *m9z.ControlTask, sunTimes *m9z.SunTimes) {
if task.TimeType == 1 {
task.ExecTime = sunTimes.Sunset
}
}
func applyStopTaskSolarTime(task *m9z.ControlTask, sunTimes *m9z.SunTimes) {
if task.TimeType == 1 {
task.ExecTime = sunTimes.Sunrise
}
}