From 732d51ad3593b24168aa596995b16843c7762f66 Mon Sep 17 00:00:00 2001 From: alufers Date: Thu, 30 May 2019 17:20:33 +0200 Subject: [PATCH] Added newlines to serial writes in heating service --- core/heating_service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/heating_service.go b/core/heating_service.go index 38f874a..e037257 100644 --- a/core/heating_service.go +++ b/core/heating_service.go @@ -155,13 +155,13 @@ func (hs *HeatingService) communicateWithPrinter() { hs.app.PrinterService.WaitForSerialReady() if hs.autoreportingAttempts < 5 { time.Sleep(4 * time.Second) - hs.app.PrinterService.consoleWriteSem <- "M155 S1" + hs.app.PrinterService.consoleWriteSem <- "M155 S1\r\n" hs.autoreportingAttempts++ } else { log.Printf("Failed to recieve temeprature report using auto-reporting %d times. Reverting to polling", hs.autoreportingAttempts) for { - hs.app.PrinterService.consoleWriteSem <- "M105" + hs.app.PrinterService.consoleWriteSem <- "M105\r\n" time.Sleep(time.Second) } }