early-access version 2182
This commit is contained in:
@@ -75,9 +75,9 @@ Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatu
|
||||
switch (callback.type) {
|
||||
case Common::Input::InputType::Button: {
|
||||
Common::Input::AnalogProperties properties{
|
||||
.deadzone = 0.0,
|
||||
.deadzone = 0.0f,
|
||||
.range = 1.0f,
|
||||
.offset = 0.0,
|
||||
.offset = 0.0f,
|
||||
};
|
||||
status.delta_timestamp = 5000;
|
||||
status.force_update = true;
|
||||
@@ -96,6 +96,21 @@ Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatu
|
||||
.raw_value = -1.0f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.x = {
|
||||
.value = 0.0f,
|
||||
.raw_value = 0.0f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.y = {
|
||||
.value = 0.0f,
|
||||
.raw_value = 0.0f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.z = {
|
||||
.value = 0.0f,
|
||||
.raw_value = 0.0f,
|
||||
.properties = properties,
|
||||
};
|
||||
if (TransformToButton(callback).value) {
|
||||
std::random_device device;
|
||||
std::mt19937 gen(device());
|
||||
@@ -103,21 +118,9 @@ Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatu
|
||||
status.accel.x.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
status.accel.y.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
status.accel.z.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
status.gyro.x = {
|
||||
.value = 0,
|
||||
.raw_value = static_cast<f32>(distribution(gen)) * 0.001f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.y = {
|
||||
.value = 0,
|
||||
.raw_value = static_cast<f32>(distribution(gen)) * 0.001f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.z = {
|
||||
.value = 0,
|
||||
.raw_value = static_cast<f32>(distribution(gen)) * 0.001f,
|
||||
.properties = properties,
|
||||
};
|
||||
status.gyro.x.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
status.gyro.y.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
status.gyro.z.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user