From 033d6b43878cdf8a2a28d922746e7a791d140e4c Mon Sep 17 00:00:00 2001 From: WandererAstro Date: Sat, 17 Feb 2024 08:17:31 +0800 Subject: [PATCH] Driver for WandererBox Pro V3 updated --- drivers/auxiliary/wandererbox_pro_v3.cpp | 8 ++++---- drivers/auxiliary/wandererbox_pro_v3.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/auxiliary/wandererbox_pro_v3.cpp b/drivers/auxiliary/wandererbox_pro_v3.cpp index 06055fa30b..e535ca7f81 100644 --- a/drivers/auxiliary/wandererbox_pro_v3.cpp +++ b/drivers/auxiliary/wandererbox_pro_v3.cpp @@ -205,11 +205,11 @@ bool WandererBoxProV3::getData() throw std::exception(); // Frimware version///////////////////////////////////////////////////////////////////////////////////////////// int nbytes_read_version = 0; - version[64] = {0}; + char version[64] = {0}; tty_read_section(PortFD, version, 'A', 5, &nbytes_read_version); version[nbytes_read_version - 1] = '\0'; - + firmware=std::atoi(version); // Temp probe 1////////////////////////////////////////////////////////////////////////////////////////// @@ -697,10 +697,10 @@ bool WandererBoxProV3::updateProperties() if (isConnected()) { - if(std::stoi(version)>=20240216) + if(firmware>=20240216) { defineProperty(CalibrateSP); - LOGF_INFO("Firmware version: %s", version); + LOGF_INFO("Firmware version: %d", firmware); } else { diff --git a/drivers/auxiliary/wandererbox_pro_v3.h b/drivers/auxiliary/wandererbox_pro_v3.h index f5aaf9247c..5a0e26315a 100644 --- a/drivers/auxiliary/wandererbox_pro_v3.h +++ b/drivers/auxiliary/wandererbox_pro_v3.h @@ -54,7 +54,7 @@ class WandererBoxProV3 : public INDI::DefaultDevice private: - char version[64] = {0}; + int firmware=0; bool sendCommand(std::string command); bool DC5DIFFMODE=false; bool DC5CONSTMODE=false;