diff --git a/Servo/include/ModbusConfig.h b/Servo/include/ModbusConfig.h index eab91b1..f7dceb1 100644 --- a/Servo/include/ModbusConfig.h +++ b/Servo/include/ModbusConfig.h @@ -11,7 +11,6 @@ struct ModbusConfig { int dataBits = QSerialPort::Data8; int stopBits = QSerialPort::OneStop; int responseTime = 1000; - int numberOfRetries = 3; }; #endif //SETTINGSERIALPARAMETERS_H diff --git a/Servo/src/ServoController.cpp b/Servo/src/ServoController.cpp index 6dce790..9a65949 100644 --- a/Servo/src/ServoController.cpp +++ b/Servo/src/ServoController.cpp @@ -121,7 +121,7 @@ double ServoController::getStopAngle() auto speedVector1 = _modbusWrapper.getHoldingRegister(SRV_STOP_ANGLE_INT_PART_REG, 1); auto speedVector2 = _modbusWrapper.getHoldingRegister(SRV_STOP_ANGLE_FRAC_PART_REG, 1); - return ((speedVector1[0] + speedVector2[0]) / SRV_ANGLE_FACTOR); + return (speedVector1[0] + speedVector2[0] / SRV_ANGLE_FACTOR); } /*************************************************************************************************/ @@ -130,7 +130,7 @@ double ServoController::getStartAngle() auto speedVector1 = _modbusWrapper.getHoldingRegister(SRV_START_ANGLE_INT_PART_REG, 1); auto speedVector2 = _modbusWrapper.getHoldingRegister(SRV_START_ANGLE_FRAC_PART_REG, 1); - return ((speedVector1[0] + speedVector2[0]) / SRV_ANGLE_FACTOR); + return (speedVector1[0] + speedVector2[0] / SRV_ANGLE_FACTOR); } /*************************************************************************************************/