// PublishOnce core themperature only once
PublishOnce core themperature only once
// PublishOnce core themperature only once
func (t *themperature) PublishOnce(qos byte) {
	cpuTemp := vcgencmd.Clean(service.CmdExec("vcgencmd", "measure_temp"), "temp=", "'C")
	if cpuTemp != "" {
		if token := t.client.Publish(t.topic, qos, false, cpuTemp); token.Wait() && token.Error() != nil {
			log.Println(token.Error())
		}
		if t.debug {
			log.Println("[PUB]", qos, t.topic, cpuTemp)
		}
	}
}
func ( t * themperature ) PublishOnce ( qos byte ) { cpuTemp := vcgencmd . Clean ( service . CmdExec ( " " , " " ) , " " , " " ) if cpuTemp != " " { if token := t . client . Publish ( t . topic , qos , false , cpuTemp ) ; token . Wait ( ) && token . Error ( ) != nil { log . Println ( token . Error ( ) ) } if t . debug { log . Println ( " " , qos , t . topic , cpuTemp ) } } }
PublishOnce core themperature only once
PublishOnce core themperature only once
// debug