|
|
@ -11,6 +11,7 @@ ApiResult HonaAPI::deviceReset() |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
|
|
|
|
@ -25,20 +26,14 @@ ApiResult HonaAPI::setConfig(HonaSettings& settings) |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
ApiResult HonaAPI::getConfig(HonaSettings& settings) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
settings = _honaLowLevelAPI.getConfig(); |
|
|
|
} |
|
|
|
catch(HonaException ex) |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
settings = _honaLowLevelAPI.getConfig(); |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
@ -46,14 +41,7 @@ ApiResult HonaAPI::getConfig(HonaSettings& settings) |
|
|
|
/*************************************************************************************************/ |
|
|
|
ApiResult HonaAPI::getSwVersion(QString& swVerion) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
swVerion = _honaLowLevelAPI.getSwVersion(); |
|
|
|
} |
|
|
|
catch(HonaException ex) |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
swVerion = _honaLowLevelAPI.getSwVersion(); |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
@ -61,14 +49,7 @@ ApiResult HonaAPI::getSwVersion(QString& swVerion) |
|
|
|
/*************************************************************************************************/ |
|
|
|
ApiResult HonaAPI::getDeviceId(QString& deviceId) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
deviceId = _honaLowLevelAPI.getDeviceId(); |
|
|
|
} |
|
|
|
catch(HonaException ex) |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
deviceId = _honaLowLevelAPI.getDeviceId(); |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
@ -114,21 +95,15 @@ ApiResult HonaAPI::hiruStart() |
|
|
|
/*************************************************************************************************/ |
|
|
|
ApiResult HonaAPI::hsruStop() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
_honaLowLevelAPI.hsruStop(); |
|
|
|
} |
|
|
|
catch(HonaException ex) |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
_honaLowLevelAPI.hsruStop(); |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
ApiResult HonaAPI::init() |
|
|
|
{ |
|
|
|
connect(&_honaLowLevelAPI, &HonaLowLevelAPI::lowLevelHonaData, this, &HonaAPI::honaDataResult,Qt::BlockingQueuedConnection); |
|
|
|
connect(&_honaLowLevelAPI, &HonaLowLevelAPI::lowLevelHonaData, this, &HonaAPI::honaDataResult); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
@ -138,6 +113,7 @@ ApiResult HonaAPI::init() |
|
|
|
{ |
|
|
|
return ApiResult::error; |
|
|
|
} |
|
|
|
|
|
|
|
return ApiResult::success; |
|
|
|
} |
|
|
|
|
|
|
|