@@ -295,15 +295,10 @@ ToolTemplate* HarmonicCalibration::createAcquisitionWidget()
295295 countWidget->contentLayout ()->addWidget (countSection);
296296 tempWidget->contentLayout ()->addWidget (tempSection);
297297
298- rotationValueLabel = new QLabel (rotationSection);
299- angleValueLabel = new QLabel (angleSection);
300- countValueLabel = new QLabel (countSection);
301- tempValueLabel = new QLabel (tempSection);
302-
303- rotationValueLabel->setText (" --.--°" );
304- angleValueLabel->setText (" --.--°" );
305- countValueLabel->setText (" --" );
306- tempValueLabel->setText (" --.-- °C" );
298+ rotationValueLabel = new QLabel (" --.--°" , rotationSection);
299+ angleValueLabel = new QLabel (" --.--°" , angleSection);
300+ countValueLabel = new QLabel (" --" , countSection);
301+ tempValueLabel = new QLabel (" --.-- °C" , tempSection);
307302
308303 rotationSection->contentLayout ()->addWidget (rotationValueLabel);
309304 angleSection->contentLayout ()->addWidget (angleValueLabel);
@@ -2079,8 +2074,8 @@ bool HarmonicCalibration::updateChannelValues(){
20792074void HarmonicCalibration::updateCountValue (){
20802075 uint32_t *absAngleRegValue = new uint32_t ;
20812076 bool success = false ;
2082- if (m_admtController->writeDeviceRegistry (m_admtController->getDeviceId (ADMTController::Device::ADMT4000), m_admtController->getConfigurationRegister (ADMTController::ConfigurationRegister::CNVPAGE), 0x0000 ) != - 1 ){
2083- if (m_admtController->readDeviceRegistry (m_admtController->getDeviceId (ADMTController::Device::ADMT4000), m_admtController->getSensorRegister (ADMTController::SensorRegister::ABSANGLE), absAngleRegValue) != - 1 ){
2077+ if (m_admtController->writeDeviceRegistry (m_admtController->getDeviceId (ADMTController::Device::ADMT4000), m_admtController->getConfigurationRegister (ADMTController::ConfigurationRegister::CNVPAGE), 0x0000 ) == 0 ){
2078+ if (m_admtController->readDeviceRegistry (m_admtController->getDeviceId (ADMTController::Device::ADMT4000), m_admtController->getSensorRegister (ADMTController::SensorRegister::ABSANGLE), absAngleRegValue) == 0 ){
20842079 count = m_admtController->getAbsAngleTurnCount (static_cast <uint16_t >(*absAngleRegValue));
20852080 success = true ;
20862081 }
@@ -3826,4 +3821,18 @@ double HarmonicCalibration::convertAMAXtoAccelTime(double amax)
38263821{
38273822 return ((rotate_vmax * 131072 ) / (amax * motorfCLK));
38283823}
3824+ #pragma endregion
3825+
3826+ #pragma region Debug Methods
3827+ QString HarmonicCalibration::readRegmapDumpAttributeValue ()
3828+ {
3829+ QString output = " " ;
3830+ char value[1024 ];
3831+ int result = -1 ;
3832+ result = m_admtController->getDeviceAttributeValueString (m_admtController->getDeviceId (ADMTController::Device::ADMT4000),
3833+ m_admtController->getDeviceAttribute (ADMTController::DeviceAttribute::REGMAP_DUMP),
3834+ value, 1024 );
3835+ output = QString (value);
3836+ return output;
3837+ }
38293838#pragma endregion
0 commit comments