Temperature Measurement & MODBUS Integration #17

Merged
rahix merged 13 commits from more-temps into main 2024-11-10 06:58:09 +00:00
Showing only changes of commit edb9051708 - Show all commits

View file

@ -233,6 +233,26 @@ func (s *webServer) viewMetrics(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "# HELP sem_vacuum_high_reached Whether a high vacuum has been reached (boolean)\n") fmt.Fprintf(w, "# HELP sem_vacuum_high_reached Whether a high vacuum has been reached (boolean)\n")
fmt.Fprintf(w, "# TYPE sem_vacuum_high_reached gauge\n") fmt.Fprintf(w, "# TYPE sem_vacuum_high_reached gauge\n")
fmt.Fprintf(w, "sem_vacuum_high_reached %f\n", boolToFloat(high)) fmt.Fprintf(w, "sem_vacuum_high_reached %f\n", boolToFloat(high))
fmt.Fprintf(w, "# HELP sem_environment_temperature_celsius Environmental temperature of the SEM, in degrees celsius\n")
fmt.Fprintf(w, "# TYPE sem_environment_temperature_celsius gauge\n")
fmt.Fprintf(w, "sem_environment_temperature_celsius %f\n", state.tempSEM)
fmt.Fprintf(w, "# HELP sem_environment_humidity_percent Environmental relative humidity of the SEM, in percent\n")
fmt.Fprintf(w, "# TYPE sem_environment_humidity_percent gauge\n")
fmt.Fprintf(w, "sem_environment_humidity_percent %f\n", state.humiditySEM)
fmt.Fprintf(w, "# HELP sem_dp_bottom_temperature_celsius Temperature of the DP bottom, in degrees celsius\n")
fmt.Fprintf(w, "# TYPE sem_dp_bottom_temperature_celsius gauge\n")
fmt.Fprintf(w, "sem_dp_bottom_temperature_celsius %f\n", state.tempDPBottom)
fmt.Fprintf(w, "# HELP sem_dp_top_temperature_celsius Temperature of the DP top, in degrees celsius\n")
fmt.Fprintf(w, "# TYPE sem_dp_top_temperature_celsius gauge\n")
fmt.Fprintf(w, "sem_dp_top_temperature_celsius %f\n", state.tempDPTop)
fmt.Fprintf(w, "# HELP sem_dp_inlet_temperature_celsius Temperature of the DP inlet flange, in degrees celsius\n")
fmt.Fprintf(w, "# TYPE sem_dp_inlet_temperature_celsius gauge\n")
fmt.Fprintf(w, "sem_dp_inlet_temperature_celsius %f\n", state.tempDPInlet)
} }
func (s *webServer) viewRoughingPumpEnable(w http.ResponseWriter, r *http.Request) { func (s *webServer) viewRoughingPumpEnable(w http.ResponseWriter, r *http.Request) {