core: hid: Add cammera support
This commit is contained in:
parent
cc83e0a600
commit
57311b2c8b
6 changed files with 423 additions and 3 deletions
|
@ -270,6 +270,20 @@ Common::Input::AnalogStatus TransformToAnalog(const Common::Input::CallbackStatu
|
|||
return status;
|
||||
}
|
||||
|
||||
Common::Input::CameraStatus TransformToCamera(const Common::Input::CallbackStatus& callback) {
|
||||
Common::Input::CameraStatus camera{};
|
||||
switch (callback.type) {
|
||||
case Common::Input::InputType::IrSensor:
|
||||
camera = callback.camera_status;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(Input, "Conversion from type {} to camera not implemented", callback.type);
|
||||
break;
|
||||
}
|
||||
|
||||
return camera;
|
||||
}
|
||||
|
||||
void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) {
|
||||
const auto& properties = analog.properties;
|
||||
float& raw_value = analog.raw_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue