...
This commit is contained in:
@@ -142,4 +142,33 @@ AsibFM700ServoController::error_t AsibFM700ServoController::hardwareGetState(har
|
||||
}
|
||||
|
||||
|
||||
void AsibFM700ServoController::hardwareUpdateConfig(conf_t cfg)
|
||||
{
|
||||
_hardwareConfig.devConfig = std::move(cfg);
|
||||
|
||||
_hardwareConfig.devConfig.MountDevPath = const_cast<char*>(_hardwareConfig.MountDevPath.c_str());
|
||||
_hardwareConfig.devConfig.EncoderDevPath = const_cast<char*>(_hardwareConfig.EncoderDevPath.c_str());
|
||||
_hardwareConfig.devConfig.EncoderXDevPath = const_cast<char*>(_hardwareConfig.EncoderXDevPath.c_str());
|
||||
_hardwareConfig.devConfig.EncoderYDevPath = const_cast<char*>(_hardwareConfig.EncoderYDevPath.c_str());
|
||||
}
|
||||
|
||||
|
||||
AsibFM700ServoController::error_t AsibFM700ServoController::hardwareUpdateConfig(hardware_configuration_t cfg)
|
||||
{
|
||||
_hardwareConfig.hwConfig = std::move(cfg);
|
||||
return static_cast<AsibFM700ServoControllerErrorCode>(Mount.saveHWconfig(&_hardwareConfig.hwConfig));
|
||||
}
|
||||
|
||||
|
||||
AsibFM700ServoController::error_t AsibFM700ServoController::hardwareUpdateConfig()
|
||||
{
|
||||
return static_cast<AsibFM700ServoControllerErrorCode>(Mount.getHWconfig(&_hardwareConfig.hwConfig));
|
||||
}
|
||||
|
||||
|
||||
AsibFM700ServoController::hardware_config_t AsibFM700ServoController::hardwareConfig() const
|
||||
{
|
||||
return _hardwareConfig;
|
||||
}
|
||||
|
||||
} // namespace asibfm700
|
||||
|
||||
Reference in New Issue
Block a user