From e7ba99c1b63398dd7211892e6ae4e41e52971919 Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Sat, 28 Jan 2023 23:34:31 +0100 Subject: [PATCH] axis manuel control --- posctl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posctl.cc b/posctl.cc index b56d11c..50e2f15 100644 --- a/posctl.cc +++ b/posctl.cc @@ -636,12 +636,15 @@ void PosCtl::OutputWriteValue (int axis, double value) { std::string s = setlocale(LC_ALL, NULL); setlocale (LC_ALL, "C"); - snprintf(outbuf, 254, "FIXME: dd:%f\n", value); + if (axis == 0) snprintf(outbuf, 254, "RA:%08.4f#\n", value); + else snprintf(outbuf, 254, "RR:%08.4f#\n", value); outbuf[254] = 0; // reset language setting to default setlocale (LC_ALL, s.c_str()); + 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__,