Skip to content

Commit

Permalink
fix gforce pro issue
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
  • Loading branch information
Andrey1994 committed Dec 2, 2021
1 parent 287c2ca commit 2a656b7
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions third_party/gForceSDKCXX/src/inc/gforce_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class GforceHandle : public HubListener
{
iSamplingRate = 500;
iTransactionSize = 128;
iNumPackages = iTransactionSize / GforceHandle::iADCResolution;
iNumPackages = 8;
iChannelMap = 0x00FF;
}
if (iBoardType == (int)BoardIds::GFORCE_DUAL_BOARD)
Expand Down Expand Up @@ -271,20 +271,23 @@ class GforceHandle : public HubListener

ds->setEMGRawDataConfig (iSamplingRate, (DeviceSetting::EMGRowDataChannels) (iChannelMap),
iTransactionSize, GforceHandle::iADCResolution,
[ds, flags, this] (ResponseResult result) {
[ds, flags, this] (ResponseResult result)
{
std::string res =
(result == ResponseResult::RREST_SUCCESS) ? ("sucess") : ("failed");
bIsEMGConfigured = (result == ResponseResult::RREST_SUCCESS) ? (true) : (false);
this->logger->info ("setEMGRawDataConfig result: {}", res);
if (bIsEMGConfigured)
{
ds->setDataNotifSwitch (flags, [this] (ResponseResult result) {
std::string res =
(result == ResponseResult::RREST_SUCCESS) ? ("sucess") : ("failed");
bIsFeatureMapConfigured =
(result == ResponseResult::RREST_SUCCESS) ? (true) : (false);
this->logger->info ("setDataNotifSwitch result: {}", res);
});
ds->setDataNotifSwitch (flags,
[this] (ResponseResult result)
{
std::string res =
(result == ResponseResult::RREST_SUCCESS) ? ("sucess") : ("failed");
bIsFeatureMapConfigured =
(result == ResponseResult::RREST_SUCCESS) ? (true) : (false);
this->logger->info ("setDataNotifSwitch result: {}", res);
});
}
});
}
Expand Down

0 comments on commit 2a656b7

Please sign in to comment.