diff --git a/posctl.cc b/posctl.cc index 9911605..6f9bfcc 100644 --- a/posctl.cc +++ b/posctl.cc @@ -650,9 +650,13 @@ void PosCtl::OutputWriteValue (int axis, double value) { printf ("%s:%d %s send: '%s'\n", __FILE__, __LINE__, __FUNCTION__, outbuf); len = write (device_fd, outbuf, strlen(outbuf)); - if ((size_t) len != strlen(outbuf) || len < 0) - printf ("%s:%d could not open device:%s Error:%s\n", __FILE__, __LINE__, + if ((size_t) len != strlen(outbuf) || len < 0) { + printf ("%s:%d could not write data to device:%s Error:%s\n", __FILE__, __LINE__, + device.c_str(), strerror(errno)); + errormessage_display ((char *)"window-posctl", (char *)"OutputWriteValue", + "%s:%d could not write data to device:%s Error:%s\n", __FILE__, __LINE__, device.c_str(), strerror(errno)); + } }; void PosCtl::OutputWriteStop (int axis) {