DAP: Add intrin DAPSpecs
We now specify intrins as separate DAPS lines. This syntax is much nicer and well-grouped than the previous negtrin-*/postrin-* param names. Alas, we're about to replace it in the next few commits already though.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <opts.h>
|
||||
#include <user/senseApiDesc.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <user/intrinThresholdParams.h>
|
||||
#include <spinscale/callback.h>
|
||||
#include <livoxProto1/livoxProto1.h>
|
||||
#include <livoxProto1/device.h>
|
||||
@@ -513,6 +514,8 @@ static const StimBuffApiDesc livoxGen1ApiDesc = {
|
||||
{.name = "mesh"},
|
||||
{.name = "pcloudIntensity"},
|
||||
{.name = "pcloudAmbience"},
|
||||
{.name = "negtrin"},
|
||||
{.name = "postrin"},
|
||||
{.name = "gyro"},
|
||||
{.name = "accel"}
|
||||
},
|
||||
@@ -645,12 +648,24 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
smo::intrin::validateIntrinsQualeApiPolicy(
|
||||
desc->qualeIfaceApi, desc->qualeIfaceApiParams);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
std::cerr << __func__ << ": " << e.what() << std::endl;
|
||||
cb.callbackFn(false, desc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PcloudStimulusProducer::supportsQualeIfaceApi(qualeIfaceApi))
|
||||
{
|
||||
// Unknown qualeIfaceApi
|
||||
std::cerr << __func__ << ": Unsupported qualeIfaceApi '"
|
||||
<< qualeIfaceApi << "' for LivoxGen1. "
|
||||
"Supported values: mesh, pcloudIntensity, pcloudAmbience"
|
||||
"Supported values: mesh, pcloudIntensity, pcloudAmbience, "
|
||||
"negtrin, postrin"
|
||||
<< std::endl;
|
||||
cb.callbackFn(false, desc);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user