From 88039e6d9f9624ed18e131e89b2ba4cae3a97fb3 Mon Sep 17 00:00:00 2001 From: Jabberrock Date: Mon, 10 Mar 2025 14:59:43 +0800 Subject: [PATCH] Stay Aligned --- .../generated/all_generated.h | 660 ++++++++++++++++-- .../data_feed/DataFeedConfig.java | 15 +- .../data_feed/DataFeedConfigT.java | 6 + .../data_feed/DataFeedUpdate.java | 17 +- .../data_feed/DataFeedUpdateT.java | 6 + .../stay_aligned/StayAlignedPose.java | 70 ++ .../stay_aligned/StayAlignedPoseT.java | 34 + .../stay_aligned/StayAlignedTracker.java | 84 +++ .../stay_aligned/StayAlignedTrackerT.java | 46 ++ .../data_feed/tracker/TrackerData.java | 12 +- .../data_feed/tracker/TrackerDataMask.java | 15 +- .../data_feed/tracker/TrackerDataMaskT.java | 6 + .../data_feed/tracker/TrackerDataT.java | 6 + .../rpc/ChangeSettingsRequest.java | 18 +- .../rpc/ChangeSettingsRequestT.java | 8 +- .../DetectStayAlignedRelaxedPoseRequest.java | 56 ++ .../DetectStayAlignedRelaxedPoseRequestT.java | 22 + .../rpc/EnableStayAlignedRequest.java | 56 ++ .../rpc/EnableStayAlignedRequestT.java | 22 + .../ResetStayAlignedRelaxedPoseRequest.java | 56 ++ .../ResetStayAlignedRelaxedPoseRequestT.java | 22 + .../src/solarxr_protocol/rpc/RpcMessage.java | 5 +- .../rpc/RpcMessageHeader.java | 12 + .../solarxr_protocol/rpc/RpcMessageUnion.java | 6 + .../rpc/SettingsResponse.java | 18 +- .../rpc/SettingsResponseT.java | 8 +- .../rpc/StayAlignedRelaxedPose.java | 16 + .../rpc/StayAlignedSettings.java | 154 ++++ .../rpc/StayAlignedSettingsT.java | 106 +++ .../rpc/YawCorrectionSettings.java | 63 -- .../rpc/YawCorrectionSettingsT.java | 28 - .../data_feed/DataFeedConfig.kt | 14 +- .../data_feed/DataFeedUpdate.kt | 18 +- .../data_feed/stay_aligned/StayAlignedPose.kt | 66 ++ .../stay_aligned/StayAlignedTracker.kt | 82 +++ .../data_feed/tracker/TrackerData.kt | 16 +- .../data_feed/tracker/TrackerDataMask.kt | 14 +- .../rpc/ChangeSettingsRequest.kt | 10 +- .../DetectStayAlignedRelaxedPoseRequest.kt | 50 ++ .../rpc/EnableStayAlignedRequest.kt | 50 ++ .../rpc/ResetStayAlignedRelaxedPoseRequest.kt | 50 ++ .../src/solarxr_protocol/rpc/RpcMessage.kt | 5 +- .../solarxr_protocol/rpc/SettingsResponse.kt | 10 +- .../rpc/StayAlignedRelaxedPose.kt | 15 + .../rpc/StayAlignedSettings.kt | 162 +++++ .../rpc/YawCorrectionSettings.kt | 58 -- protocol/rust/src/generated/mod.rs | 19 +- .../data_feed/data_feed_config_generated.rs | 17 + .../data_feed/data_feed_update_generated.rs | 17 + .../stay_aligned_pose_generated.rs | 142 ++++ .../stay_aligned_tracker_generated.rs | 176 +++++ .../tracker/tracker_data_generated.rs | 18 + .../tracker/tracker_data_mask_generated.rs | 17 + .../rpc/change_settings_request_generated.rs | 20 +- ..._aligned_relaxed_pose_request_generated.rs | 108 +++ .../enable_stay_aligned_request_generated.rs | 108 +++ ..._aligned_relaxed_pose_request_generated.rs | 108 +++ .../rpc/rpc_message_generated.rs | 18 +- .../rpc/rpc_message_header_generated.rs | 69 ++ .../rpc/settings_response_generated.rs | 20 +- .../stay_aligned_relaxed_pose_generated.rs | 100 +++ .../rpc/stay_aligned_settings_generated.rs | 346 +++++++++ .../rpc/yaw_correction_settings_generated.rs | 125 ---- protocol/typescript/src/all_generated.ts | 8 +- .../data-feed/data-feed-config.ts | 19 +- .../data-feed/data-feed-update.ts | 39 +- .../stay-aligned/stay-aligned-pose.ts | 100 +++ .../stay-aligned/stay-aligned-tracker.ts | 128 ++++ .../data-feed/tracker/tracker-data-mask.ts | 24 +- .../data-feed/tracker/tracker-data.ts | 24 +- .../rpc/change-settings-request.ts | 20 +- ...etect-stay-aligned-relaxed-pose-request.ts | 73 ++ .../rpc/enable-stay-aligned-request.ts | 72 ++ ...reset-stay-aligned-relaxed-pose-request.ts | 73 ++ .../rpc/rpc-message-header.ts | 5 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 22 +- .../solarxr-protocol/rpc/settings-response.ts | 20 +- .../rpc/stay-aligned-relaxed-pose.ts | 7 + .../rpc/stay-aligned-settings.ts | 268 +++++++ .../rpc/yaw-correction-settings.ts | 86 --- schema/data_feed/data_feed.fbs | 3 + schema/data_feed/stay_aligned.fbs | 15 + schema/data_feed/tracker.fbs | 7 +- schema/rpc.fbs | 42 +- 84 files changed, 4199 insertions(+), 557 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.java create mode 100644 protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPoseT.java create mode 100644 protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.java create mode 100644 protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTrackerT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/StayAlignedSettings.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/StayAlignedSettingsT.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettings.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettingsT.java create mode 100644 protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/EnableStayAlignedRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedSettings.kt delete mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/YawCorrectionSettings.kt create mode 100644 protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_pose_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_tracker_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/detect_stay_aligned_relaxed_pose_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/enable_stay_aligned_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/reset_stay_aligned_relaxed_pose_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_relaxed_pose_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_settings_generated.rs delete mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/yaw_correction_settings_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.ts create mode 100644 protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/enable-stay-aligned-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-relaxed-pose.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-settings.ts delete mode 100644 protocol/typescript/src/solarxr-protocol/rpc/yaw-correction-settings.ts create mode 100644 schema/data_feed/stay_aligned.fbs diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index acf44d68..781559be 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -66,6 +66,16 @@ struct Vec3f; } // namespace datatypes namespace data_feed { +namespace stay_aligned { + +struct StayAlignedPose; +struct StayAlignedPoseBuilder; + +struct StayAlignedTracker; +struct StayAlignedTrackerBuilder; + +} // namespace stay_aligned + namespace tracker { struct TrackerData; @@ -189,8 +199,8 @@ struct TapDetectionSettingsBuilder; struct ResetsSettings; struct ResetsSettingsBuilder; -struct YawCorrectionSettings; -struct YawCorrectionSettingsBuilder; +struct StayAlignedSettings; +struct StayAlignedSettingsBuilder; struct TapDetectionSetupNotification; struct TapDetectionSetupNotificationBuilder; @@ -411,6 +421,15 @@ struct VRCConfigStateRequestBuilder; struct VRCConfigStateChangeResponse; struct VRCConfigStateChangeResponseBuilder; +struct EnableStayAlignedRequest; +struct EnableStayAlignedRequestBuilder; + +struct DetectStayAlignedRelaxedPoseRequest; +struct DetectStayAlignedRelaxedPoseRequestBuilder; + +struct ResetStayAlignedRelaxedPoseRequest; +struct ResetStayAlignedRelaxedPoseRequestBuilder; + } // namespace rpc namespace pub_sub { @@ -1265,11 +1284,14 @@ enum class RpcMessage : uint8_t { RecordBVHStatusRequest = 65, VRCConfigStateRequest = 66, VRCConfigStateChangeResponse = 67, + EnableStayAlignedRequest = 68, + DetectStayAlignedRelaxedPoseRequest = 69, + ResetStayAlignedRelaxedPoseRequest = 70, MIN = NONE, - MAX = VRCConfigStateChangeResponse + MAX = ResetStayAlignedRelaxedPoseRequest }; -inline const RpcMessage (&EnumValuesRpcMessage())[68] { +inline const RpcMessage (&EnumValuesRpcMessage())[71] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -1338,13 +1360,16 @@ inline const RpcMessage (&EnumValuesRpcMessage())[68] { RpcMessage::ChangeMagToggleRequest, RpcMessage::RecordBVHStatusRequest, RpcMessage::VRCConfigStateRequest, - RpcMessage::VRCConfigStateChangeResponse + RpcMessage::VRCConfigStateChangeResponse, + RpcMessage::EnableStayAlignedRequest, + RpcMessage::DetectStayAlignedRelaxedPoseRequest, + RpcMessage::ResetStayAlignedRelaxedPoseRequest }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[69] = { + static const char * const names[72] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -1413,13 +1438,16 @@ inline const char * const *EnumNamesRpcMessage() { "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", + "EnableStayAlignedRequest", + "DetectStayAlignedRelaxedPoseRequest", + "ResetStayAlignedRelaxedPoseRequest", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::VRCConfigStateChangeResponse)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::ResetStayAlignedRelaxedPoseRequest)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -1696,6 +1724,18 @@ template<> struct RpcMessageTraits struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::EnableStayAlignedRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::DetectStayAlignedRelaxedPoseRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ResetStayAlignedRelaxedPoseRequest; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); @@ -2373,6 +2413,39 @@ inline const char *EnumNameVRCAvatarMeasurementType(VRCAvatarMeasurementType e) return EnumNamesVRCAvatarMeasurementType()[index]; } +enum class StayAlignedRelaxedPose : uint8_t { + STANDING = 0, + SITTING = 1, + FLAT = 2, + MIN = STANDING, + MAX = FLAT +}; + +inline const StayAlignedRelaxedPose (&EnumValuesStayAlignedRelaxedPose())[3] { + static const StayAlignedRelaxedPose values[] = { + StayAlignedRelaxedPose::STANDING, + StayAlignedRelaxedPose::SITTING, + StayAlignedRelaxedPose::FLAT + }; + return values; +} + +inline const char * const *EnumNamesStayAlignedRelaxedPose() { + static const char * const names[4] = { + "STANDING", + "SITTING", + "FLAT", + nullptr + }; + return names; +} + +inline const char *EnumNameStayAlignedRelaxedPose(StayAlignedRelaxedPose e) { + if (flatbuffers::IsOutRange(e, StayAlignedRelaxedPose::STANDING, StayAlignedRelaxedPose::FLAT)) return ""; + const size_t index = static_cast(e); + return EnumNamesStayAlignedRelaxedPose()[index]; +} + } // namespace rpc namespace pub_sub { @@ -3413,6 +3486,152 @@ inline flatbuffers::Offset CreateFirmwareStatusMask( } // namespace datatypes namespace data_feed { +namespace stay_aligned { + +struct StayAlignedPose FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StayAlignedPoseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_UPPER_LEG_ANGLE_IN_DEG = 4, + VT_LOWER_LEG_ANGLE_IN_DEG = 6, + VT_FOOT_ANGLE_IN_DEG = 8 + }; + float upper_leg_angle_in_deg() const { + return GetField(VT_UPPER_LEG_ANGLE_IN_DEG, 0.0f); + } + float lower_leg_angle_in_deg() const { + return GetField(VT_LOWER_LEG_ANGLE_IN_DEG, 0.0f); + } + float foot_angle_in_deg() const { + return GetField(VT_FOOT_ANGLE_IN_DEG, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_UPPER_LEG_ANGLE_IN_DEG, 4) && + VerifyField(verifier, VT_LOWER_LEG_ANGLE_IN_DEG, 4) && + VerifyField(verifier, VT_FOOT_ANGLE_IN_DEG, 4) && + verifier.EndTable(); + } +}; + +struct StayAlignedPoseBuilder { + typedef StayAlignedPose Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_upper_leg_angle_in_deg(float upper_leg_angle_in_deg) { + fbb_.AddElement(StayAlignedPose::VT_UPPER_LEG_ANGLE_IN_DEG, upper_leg_angle_in_deg, 0.0f); + } + void add_lower_leg_angle_in_deg(float lower_leg_angle_in_deg) { + fbb_.AddElement(StayAlignedPose::VT_LOWER_LEG_ANGLE_IN_DEG, lower_leg_angle_in_deg, 0.0f); + } + void add_foot_angle_in_deg(float foot_angle_in_deg) { + fbb_.AddElement(StayAlignedPose::VT_FOOT_ANGLE_IN_DEG, foot_angle_in_deg, 0.0f); + } + explicit StayAlignedPoseBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateStayAlignedPose( + flatbuffers::FlatBufferBuilder &_fbb, + float upper_leg_angle_in_deg = 0.0f, + float lower_leg_angle_in_deg = 0.0f, + float foot_angle_in_deg = 0.0f) { + StayAlignedPoseBuilder builder_(_fbb); + builder_.add_foot_angle_in_deg(foot_angle_in_deg); + builder_.add_lower_leg_angle_in_deg(lower_leg_angle_in_deg); + builder_.add_upper_leg_angle_in_deg(upper_leg_angle_in_deg); + return builder_.Finish(); +} + +struct StayAlignedTracker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StayAlignedTrackerBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_YAW_CORRECTION_IN_DEG = 4, + VT_LOCKED_ERROR_IN_DEG = 6, + VT_CENTER_ERROR_IN_DEG = 8, + VT_NEIGHBOR_ERROR_IN_DEG = 10, + VT_LOCKED = 12 + }; + float yaw_correction_in_deg() const { + return GetField(VT_YAW_CORRECTION_IN_DEG, 0.0f); + } + float locked_error_in_deg() const { + return GetField(VT_LOCKED_ERROR_IN_DEG, 0.0f); + } + float center_error_in_deg() const { + return GetField(VT_CENTER_ERROR_IN_DEG, 0.0f); + } + float neighbor_error_in_deg() const { + return GetField(VT_NEIGHBOR_ERROR_IN_DEG, 0.0f); + } + bool locked() const { + return GetField(VT_LOCKED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_YAW_CORRECTION_IN_DEG, 4) && + VerifyField(verifier, VT_LOCKED_ERROR_IN_DEG, 4) && + VerifyField(verifier, VT_CENTER_ERROR_IN_DEG, 4) && + VerifyField(verifier, VT_NEIGHBOR_ERROR_IN_DEG, 4) && + VerifyField(verifier, VT_LOCKED, 1) && + verifier.EndTable(); + } +}; + +struct StayAlignedTrackerBuilder { + typedef StayAlignedTracker Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_yaw_correction_in_deg(float yaw_correction_in_deg) { + fbb_.AddElement(StayAlignedTracker::VT_YAW_CORRECTION_IN_DEG, yaw_correction_in_deg, 0.0f); + } + void add_locked_error_in_deg(float locked_error_in_deg) { + fbb_.AddElement(StayAlignedTracker::VT_LOCKED_ERROR_IN_DEG, locked_error_in_deg, 0.0f); + } + void add_center_error_in_deg(float center_error_in_deg) { + fbb_.AddElement(StayAlignedTracker::VT_CENTER_ERROR_IN_DEG, center_error_in_deg, 0.0f); + } + void add_neighbor_error_in_deg(float neighbor_error_in_deg) { + fbb_.AddElement(StayAlignedTracker::VT_NEIGHBOR_ERROR_IN_DEG, neighbor_error_in_deg, 0.0f); + } + void add_locked(bool locked) { + fbb_.AddElement(StayAlignedTracker::VT_LOCKED, static_cast(locked), 0); + } + explicit StayAlignedTrackerBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateStayAlignedTracker( + flatbuffers::FlatBufferBuilder &_fbb, + float yaw_correction_in_deg = 0.0f, + float locked_error_in_deg = 0.0f, + float center_error_in_deg = 0.0f, + float neighbor_error_in_deg = 0.0f, + bool locked = false) { + StayAlignedTrackerBuilder builder_(_fbb); + builder_.add_neighbor_error_in_deg(neighbor_error_in_deg); + builder_.add_center_error_in_deg(center_error_in_deg); + builder_.add_locked_error_in_deg(locked_error_in_deg); + builder_.add_yaw_correction_in_deg(yaw_correction_in_deg); + builder_.add_locked(locked); + return builder_.Finish(); +} + +} // namespace stay_aligned + namespace tracker { /// Describes all possible information about a tracker. A tracker is anything that @@ -3434,7 +3653,8 @@ struct TrackerData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_LINEAR_ACCELERATION = 20, VT_ROTATION_REFERENCE_ADJUSTED = 22, VT_ROTATION_IDENTITY_ADJUSTED = 24, - VT_TPS = 26 + VT_TPS = 26, + VT_STAY_ALIGNED = 28 }; const solarxr_protocol::datatypes::TrackerId *tracker_id() const { return GetPointer(VT_TRACKER_ID); @@ -3491,6 +3711,10 @@ struct TrackerData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { flatbuffers::Optional tps() const { return GetOptional(VT_TPS); } + /// Stay Aligned + const solarxr_protocol::data_feed::stay_aligned::StayAlignedTracker *stay_aligned() const { + return GetPointer(VT_STAY_ALIGNED); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_TRACKER_ID) && @@ -3507,6 +3731,8 @@ struct TrackerData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 4) && VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 4) && VerifyField(verifier, VT_TPS, 2) && + VerifyOffset(verifier, VT_STAY_ALIGNED) && + verifier.VerifyTable(stay_aligned()) && verifier.EndTable(); } }; @@ -3551,6 +3777,9 @@ struct TrackerDataBuilder { void add_tps(uint16_t tps) { fbb_.AddElement(TrackerData::VT_TPS, tps); } + void add_stay_aligned(flatbuffers::Offset stay_aligned) { + fbb_.AddOffset(TrackerData::VT_STAY_ALIGNED, stay_aligned); + } explicit TrackerDataBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -3575,8 +3804,10 @@ inline flatbuffers::Offset CreateTrackerData( const solarxr_protocol::datatypes::math::Vec3f *linear_acceleration = nullptr, const solarxr_protocol::datatypes::math::Quat *rotation_reference_adjusted = nullptr, const solarxr_protocol::datatypes::math::Quat *rotation_identity_adjusted = nullptr, - flatbuffers::Optional tps = flatbuffers::nullopt) { + flatbuffers::Optional tps = flatbuffers::nullopt, + flatbuffers::Offset stay_aligned = 0) { TrackerDataBuilder builder_(_fbb); + builder_.add_stay_aligned(stay_aligned); builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); builder_.add_linear_acceleration(linear_acceleration); @@ -3606,7 +3837,8 @@ struct TrackerDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_LINEAR_ACCELERATION = 18, VT_ROTATION_REFERENCE_ADJUSTED = 20, VT_ROTATION_IDENTITY_ADJUSTED = 22, - VT_TPS = 24 + VT_TPS = 24, + VT_STAY_ALIGNED = 26 }; bool info() const { return GetField(VT_INFO, 0) != 0; @@ -3641,6 +3873,9 @@ struct TrackerDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool tps() const { return GetField(VT_TPS, 0) != 0; } + bool stay_aligned() const { + return GetField(VT_STAY_ALIGNED, 0) != 0; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_INFO, 1) && @@ -3654,6 +3889,7 @@ struct TrackerDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_ROTATION_REFERENCE_ADJUSTED, 1) && VerifyField(verifier, VT_ROTATION_IDENTITY_ADJUSTED, 1) && VerifyField(verifier, VT_TPS, 1) && + VerifyField(verifier, VT_STAY_ALIGNED, 1) && verifier.EndTable(); } }; @@ -3695,6 +3931,9 @@ struct TrackerDataMaskBuilder { void add_tps(bool tps) { fbb_.AddElement(TrackerDataMask::VT_TPS, static_cast(tps), 0); } + void add_stay_aligned(bool stay_aligned) { + fbb_.AddElement(TrackerDataMask::VT_STAY_ALIGNED, static_cast(stay_aligned), 0); + } explicit TrackerDataMaskBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -3718,8 +3957,10 @@ inline flatbuffers::Offset CreateTrackerDataMask( bool linear_acceleration = false, bool rotation_reference_adjusted = false, bool rotation_identity_adjusted = false, - bool tps = false) { + bool tps = false, + bool stay_aligned = false) { TrackerDataMaskBuilder builder_(_fbb); + builder_.add_stay_aligned(stay_aligned); builder_.add_tps(tps); builder_.add_rotation_identity_adjusted(rotation_identity_adjusted); builder_.add_rotation_reference_adjusted(rotation_reference_adjusted); @@ -4412,7 +4653,8 @@ struct DataFeedUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_DEVICES = 4, VT_SYNTHETIC_TRACKERS = 6, - VT_BONES = 8 + VT_BONES = 8, + VT_STAY_ALIGNED_POSE = 10 }; const flatbuffers::Vector> *devices() const { return GetPointer> *>(VT_DEVICES); @@ -4424,6 +4666,9 @@ struct DataFeedUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const flatbuffers::Vector> *bones() const { return GetPointer> *>(VT_BONES); } + const solarxr_protocol::data_feed::stay_aligned::StayAlignedPose *stay_aligned_pose() const { + return GetPointer(VT_STAY_ALIGNED_POSE); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_DEVICES) && @@ -4435,6 +4680,8 @@ struct DataFeedUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyOffset(verifier, VT_BONES) && verifier.VerifyVector(bones()) && verifier.VerifyVectorOfTables(bones()) && + VerifyOffset(verifier, VT_STAY_ALIGNED_POSE) && + verifier.VerifyTable(stay_aligned_pose()) && verifier.EndTable(); } }; @@ -4452,6 +4699,9 @@ struct DataFeedUpdateBuilder { void add_bones(flatbuffers::Offset>> bones) { fbb_.AddOffset(DataFeedUpdate::VT_BONES, bones); } + void add_stay_aligned_pose(flatbuffers::Offset stay_aligned_pose) { + fbb_.AddOffset(DataFeedUpdate::VT_STAY_ALIGNED_POSE, stay_aligned_pose); + } explicit DataFeedUpdateBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -4467,8 +4717,10 @@ inline flatbuffers::Offset CreateDataFeedUpdate( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset>> devices = 0, flatbuffers::Offset>> synthetic_trackers = 0, - flatbuffers::Offset>> bones = 0) { + flatbuffers::Offset>> bones = 0, + flatbuffers::Offset stay_aligned_pose = 0) { DataFeedUpdateBuilder builder_(_fbb); + builder_.add_stay_aligned_pose(stay_aligned_pose); builder_.add_bones(bones); builder_.add_synthetic_trackers(synthetic_trackers); builder_.add_devices(devices); @@ -4479,7 +4731,8 @@ inline flatbuffers::Offset CreateDataFeedUpdateDirect( flatbuffers::FlatBufferBuilder &_fbb, const std::vector> *devices = nullptr, const std::vector> *synthetic_trackers = nullptr, - const std::vector> *bones = nullptr) { + const std::vector> *bones = nullptr, + flatbuffers::Offset stay_aligned_pose = 0) { auto devices__ = devices ? _fbb.CreateVector>(*devices) : 0; auto synthetic_trackers__ = synthetic_trackers ? _fbb.CreateVector>(*synthetic_trackers) : 0; auto bones__ = bones ? _fbb.CreateVector>(*bones) : 0; @@ -4487,7 +4740,8 @@ inline flatbuffers::Offset CreateDataFeedUpdateDirect( _fbb, devices__, synthetic_trackers__, - bones__); + bones__, + stay_aligned_pose); } /// All information related to the configuration of a data feed. This may be sent @@ -4498,7 +4752,8 @@ struct DataFeedConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_MINIMUM_TIME_SINCE_LAST = 4, VT_DATA_MASK = 6, VT_SYNTHETIC_TRACKERS_MASK = 8, - VT_BONE_MASK = 10 + VT_BONE_MASK = 10, + VT_STAY_ALIGNED_POSE_MASK = 12 }; /// Minimum delay in milliseconds between new data updates. This value will be /// ignored when used for a `PollDataFeed`. @@ -4514,6 +4769,9 @@ struct DataFeedConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool bone_mask() const { return GetField(VT_BONE_MASK, 0) != 0; } + bool stay_aligned_pose_mask() const { + return GetField(VT_STAY_ALIGNED_POSE_MASK, 0) != 0; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_MINIMUM_TIME_SINCE_LAST, 2) && @@ -4522,6 +4780,7 @@ struct DataFeedConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyOffset(verifier, VT_SYNTHETIC_TRACKERS_MASK) && verifier.VerifyTable(synthetic_trackers_mask()) && VerifyField(verifier, VT_BONE_MASK, 1) && + VerifyField(verifier, VT_STAY_ALIGNED_POSE_MASK, 1) && verifier.EndTable(); } }; @@ -4542,6 +4801,9 @@ struct DataFeedConfigBuilder { void add_bone_mask(bool bone_mask) { fbb_.AddElement(DataFeedConfig::VT_BONE_MASK, static_cast(bone_mask), 0); } + void add_stay_aligned_pose_mask(bool stay_aligned_pose_mask) { + fbb_.AddElement(DataFeedConfig::VT_STAY_ALIGNED_POSE_MASK, static_cast(stay_aligned_pose_mask), 0); + } explicit DataFeedConfigBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -4558,11 +4820,13 @@ inline flatbuffers::Offset CreateDataFeedConfig( uint16_t minimum_time_since_last = 0, flatbuffers::Offset data_mask = 0, flatbuffers::Offset synthetic_trackers_mask = 0, - bool bone_mask = false) { + bool bone_mask = false, + bool stay_aligned_pose_mask = false) { DataFeedConfigBuilder builder_(_fbb); builder_.add_synthetic_trackers_mask(synthetic_trackers_mask); builder_.add_data_mask(data_mask); builder_.add_minimum_time_since_last(minimum_time_since_last); + builder_.add_stay_aligned_pose_mask(stay_aligned_pose_mask); builder_.add_bone_mask(bone_mask); return builder_.Finish(); } @@ -5220,6 +5484,15 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::VRCConfigStateChangeResponse *message_as_VRCConfigStateChangeResponse() const { return message_type() == solarxr_protocol::rpc::RpcMessage::VRCConfigStateChangeResponse ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::EnableStayAlignedRequest *message_as_EnableStayAlignedRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::EnableStayAlignedRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::DetectStayAlignedRelaxedPoseRequest *message_as_DetectStayAlignedRelaxedPoseRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::DetectStayAlignedRelaxedPoseRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ResetStayAlignedRelaxedPoseRequest *message_as_ResetStayAlignedRelaxedPoseRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ResetStayAlignedRelaxedPoseRequest ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -5498,6 +5771,18 @@ template<> inline const solarxr_protocol::rpc::VRCConfigStateChangeResponse *Rpc return message_as_VRCConfigStateChangeResponse(); } +template<> inline const solarxr_protocol::rpc::EnableStayAlignedRequest *RpcMessageHeader::message_as() const { + return message_as_EnableStayAlignedRequest(); +} + +template<> inline const solarxr_protocol::rpc::DetectStayAlignedRelaxedPoseRequest *RpcMessageHeader::message_as() const { + return message_as_DetectStayAlignedRelaxedPoseRequest(); +} + +template<> inline const solarxr_protocol::rpc::ResetStayAlignedRelaxedPoseRequest *RpcMessageHeader::message_as() const { + return message_as_ResetStayAlignedRelaxedPoseRequest(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -5855,7 +6140,7 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_TAP_DETECTION_SETTINGS = 18, VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, - VT_YAW_CORRECTION_SETTINGS = 24 + VT_STAY_ALIGNED = 24 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -5887,8 +6172,8 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { return GetPointer(VT_RESETS_SETTINGS); } - const solarxr_protocol::rpc::YawCorrectionSettings *yaw_correction_settings() const { - return GetPointer(VT_YAW_CORRECTION_SETTINGS); + const solarxr_protocol::rpc::StayAlignedSettings *stay_aligned() const { + return GetPointer(VT_STAY_ALIGNED); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && @@ -5912,8 +6197,8 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { verifier.VerifyTable(auto_bone_settings()) && VerifyOffset(verifier, VT_RESETS_SETTINGS) && verifier.VerifyTable(resets_settings()) && - VerifyOffset(verifier, VT_YAW_CORRECTION_SETTINGS) && - verifier.VerifyTable(yaw_correction_settings()) && + VerifyOffset(verifier, VT_STAY_ALIGNED) && + verifier.VerifyTable(stay_aligned()) && verifier.EndTable(); } }; @@ -5952,8 +6237,8 @@ struct SettingsResponseBuilder { void add_resets_settings(flatbuffers::Offset resets_settings) { fbb_.AddOffset(SettingsResponse::VT_RESETS_SETTINGS, resets_settings); } - void add_yaw_correction_settings(flatbuffers::Offset yaw_correction_settings) { - fbb_.AddOffset(SettingsResponse::VT_YAW_CORRECTION_SETTINGS, yaw_correction_settings); + void add_stay_aligned(flatbuffers::Offset stay_aligned) { + fbb_.AddOffset(SettingsResponse::VT_STAY_ALIGNED, stay_aligned); } explicit SettingsResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -5978,9 +6263,9 @@ inline flatbuffers::Offset CreateSettingsResponse( flatbuffers::Offset tap_detection_settings = 0, flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, - flatbuffers::Offset yaw_correction_settings = 0) { + flatbuffers::Offset stay_aligned = 0) { SettingsResponseBuilder builder_(_fbb); - builder_.add_yaw_correction_settings(yaw_correction_settings); + builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); builder_.add_auto_bone_settings(auto_bone_settings); builder_.add_tap_detection_settings(tap_detection_settings); @@ -6007,7 +6292,7 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl VT_TAP_DETECTION_SETTINGS = 18, VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, - VT_YAW_CORRECTION_SETTINGS = 24 + VT_STAY_ALIGNED = 24 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -6039,8 +6324,8 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl const solarxr_protocol::rpc::ResetsSettings *resets_settings() const { return GetPointer(VT_RESETS_SETTINGS); } - const solarxr_protocol::rpc::YawCorrectionSettings *yaw_correction_settings() const { - return GetPointer(VT_YAW_CORRECTION_SETTINGS); + const solarxr_protocol::rpc::StayAlignedSettings *stay_aligned() const { + return GetPointer(VT_STAY_ALIGNED); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && @@ -6064,8 +6349,8 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl verifier.VerifyTable(auto_bone_settings()) && VerifyOffset(verifier, VT_RESETS_SETTINGS) && verifier.VerifyTable(resets_settings()) && - VerifyOffset(verifier, VT_YAW_CORRECTION_SETTINGS) && - verifier.VerifyTable(yaw_correction_settings()) && + VerifyOffset(verifier, VT_STAY_ALIGNED) && + verifier.VerifyTable(stay_aligned()) && verifier.EndTable(); } }; @@ -6104,8 +6389,8 @@ struct ChangeSettingsRequestBuilder { void add_resets_settings(flatbuffers::Offset resets_settings) { fbb_.AddOffset(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_settings); } - void add_yaw_correction_settings(flatbuffers::Offset yaw_correction_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_YAW_CORRECTION_SETTINGS, yaw_correction_settings); + void add_stay_aligned(flatbuffers::Offset stay_aligned) { + fbb_.AddOffset(ChangeSettingsRequest::VT_STAY_ALIGNED, stay_aligned); } explicit ChangeSettingsRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -6130,9 +6415,9 @@ inline flatbuffers::Offset CreateChangeSettingsRequest( flatbuffers::Offset tap_detection_settings = 0, flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, - flatbuffers::Offset yaw_correction_settings = 0) { + flatbuffers::Offset stay_aligned = 0) { ChangeSettingsRequestBuilder builder_(_fbb); - builder_.add_yaw_correction_settings(yaw_correction_settings); + builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); builder_.add_auto_bone_settings(auto_bone_settings); builder_.add_tap_detection_settings(tap_detection_settings); @@ -7022,53 +7307,183 @@ inline flatbuffers::Offset CreateResetsSettings( return builder_.Finish(); } -struct YawCorrectionSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef YawCorrectionSettingsBuilder Builder; +struct StayAlignedSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StayAlignedSettingsBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_ENABLED = 4, - VT_AMOUNTINDEGPERSEC = 6 + VT_EXTRAYAWCORRECTION = 6, + VT_HIDEYAWCORRECTION = 8, + VT_STANDINGENABLED = 10, + VT_STANDINGUPPERLEGANGLE = 12, + VT_STANDINGLOWERLEGANGLE = 14, + VT_STANDINGFOOTANGLE = 16, + VT_SITTINGENABLED = 18, + VT_SITTINGUPPERLEGANGLE = 20, + VT_SITTINGLOWERLEGANGLE = 22, + VT_SITTINGFOOTANGLE = 24, + VT_FLATENABLED = 26, + VT_FLATUPPERLEGANGLE = 28, + VT_FLATLOWERLEGANGLE = 30, + VT_FLATFOOTANGLE = 32 }; bool enabled() const { return GetField(VT_ENABLED, 0) != 0; } - float amountInDegPerSec() const { - return GetField(VT_AMOUNTINDEGPERSEC, 0.0f); + bool extraYawCorrection() const { + return GetField(VT_EXTRAYAWCORRECTION, 0) != 0; + } + bool hideYawCorrection() const { + return GetField(VT_HIDEYAWCORRECTION, 0) != 0; + } + bool standingEnabled() const { + return GetField(VT_STANDINGENABLED, 0) != 0; + } + float standingUpperLegAngle() const { + return GetField(VT_STANDINGUPPERLEGANGLE, 0.0f); + } + float standingLowerLegAngle() const { + return GetField(VT_STANDINGLOWERLEGANGLE, 0.0f); + } + float standingFootAngle() const { + return GetField(VT_STANDINGFOOTANGLE, 0.0f); + } + bool sittingEnabled() const { + return GetField(VT_SITTINGENABLED, 0) != 0; + } + float sittingUpperLegAngle() const { + return GetField(VT_SITTINGUPPERLEGANGLE, 0.0f); + } + float sittingLowerLegAngle() const { + return GetField(VT_SITTINGLOWERLEGANGLE, 0.0f); + } + float sittingFootAngle() const { + return GetField(VT_SITTINGFOOTANGLE, 0.0f); + } + bool flatEnabled() const { + return GetField(VT_FLATENABLED, 0) != 0; + } + float flatUpperLegAngle() const { + return GetField(VT_FLATUPPERLEGANGLE, 0.0f); + } + float flatLowerLegAngle() const { + return GetField(VT_FLATLOWERLEGANGLE, 0.0f); + } + float flatFootAngle() const { + return GetField(VT_FLATFOOTANGLE, 0.0f); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_ENABLED, 1) && - VerifyField(verifier, VT_AMOUNTINDEGPERSEC, 4) && + VerifyField(verifier, VT_EXTRAYAWCORRECTION, 1) && + VerifyField(verifier, VT_HIDEYAWCORRECTION, 1) && + VerifyField(verifier, VT_STANDINGENABLED, 1) && + VerifyField(verifier, VT_STANDINGUPPERLEGANGLE, 4) && + VerifyField(verifier, VT_STANDINGLOWERLEGANGLE, 4) && + VerifyField(verifier, VT_STANDINGFOOTANGLE, 4) && + VerifyField(verifier, VT_SITTINGENABLED, 1) && + VerifyField(verifier, VT_SITTINGUPPERLEGANGLE, 4) && + VerifyField(verifier, VT_SITTINGLOWERLEGANGLE, 4) && + VerifyField(verifier, VT_SITTINGFOOTANGLE, 4) && + VerifyField(verifier, VT_FLATENABLED, 1) && + VerifyField(verifier, VT_FLATUPPERLEGANGLE, 4) && + VerifyField(verifier, VT_FLATLOWERLEGANGLE, 4) && + VerifyField(verifier, VT_FLATFOOTANGLE, 4) && verifier.EndTable(); } }; -struct YawCorrectionSettingsBuilder { - typedef YawCorrectionSettings Table; +struct StayAlignedSettingsBuilder { + typedef StayAlignedSettings Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_enabled(bool enabled) { - fbb_.AddElement(YawCorrectionSettings::VT_ENABLED, static_cast(enabled), 0); + fbb_.AddElement(StayAlignedSettings::VT_ENABLED, static_cast(enabled), 0); + } + void add_extraYawCorrection(bool extraYawCorrection) { + fbb_.AddElement(StayAlignedSettings::VT_EXTRAYAWCORRECTION, static_cast(extraYawCorrection), 0); + } + void add_hideYawCorrection(bool hideYawCorrection) { + fbb_.AddElement(StayAlignedSettings::VT_HIDEYAWCORRECTION, static_cast(hideYawCorrection), 0); + } + void add_standingEnabled(bool standingEnabled) { + fbb_.AddElement(StayAlignedSettings::VT_STANDINGENABLED, static_cast(standingEnabled), 0); } - void add_amountInDegPerSec(float amountInDegPerSec) { - fbb_.AddElement(YawCorrectionSettings::VT_AMOUNTINDEGPERSEC, amountInDegPerSec, 0.0f); + void add_standingUpperLegAngle(float standingUpperLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_STANDINGUPPERLEGANGLE, standingUpperLegAngle, 0.0f); } - explicit YawCorrectionSettingsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + void add_standingLowerLegAngle(float standingLowerLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_STANDINGLOWERLEGANGLE, standingLowerLegAngle, 0.0f); + } + void add_standingFootAngle(float standingFootAngle) { + fbb_.AddElement(StayAlignedSettings::VT_STANDINGFOOTANGLE, standingFootAngle, 0.0f); + } + void add_sittingEnabled(bool sittingEnabled) { + fbb_.AddElement(StayAlignedSettings::VT_SITTINGENABLED, static_cast(sittingEnabled), 0); + } + void add_sittingUpperLegAngle(float sittingUpperLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_SITTINGUPPERLEGANGLE, sittingUpperLegAngle, 0.0f); + } + void add_sittingLowerLegAngle(float sittingLowerLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_SITTINGLOWERLEGANGLE, sittingLowerLegAngle, 0.0f); + } + void add_sittingFootAngle(float sittingFootAngle) { + fbb_.AddElement(StayAlignedSettings::VT_SITTINGFOOTANGLE, sittingFootAngle, 0.0f); + } + void add_flatEnabled(bool flatEnabled) { + fbb_.AddElement(StayAlignedSettings::VT_FLATENABLED, static_cast(flatEnabled), 0); + } + void add_flatUpperLegAngle(float flatUpperLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_FLATUPPERLEGANGLE, flatUpperLegAngle, 0.0f); + } + void add_flatLowerLegAngle(float flatLowerLegAngle) { + fbb_.AddElement(StayAlignedSettings::VT_FLATLOWERLEGANGLE, flatLowerLegAngle, 0.0f); + } + void add_flatFootAngle(float flatFootAngle) { + fbb_.AddElement(StayAlignedSettings::VT_FLATFOOTANGLE, flatFootAngle, 0.0f); + } + explicit StayAlignedSettingsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateYawCorrectionSettings( +inline flatbuffers::Offset CreateStayAlignedSettings( flatbuffers::FlatBufferBuilder &_fbb, bool enabled = false, - float amountInDegPerSec = 0.0f) { - YawCorrectionSettingsBuilder builder_(_fbb); - builder_.add_amountInDegPerSec(amountInDegPerSec); + bool extraYawCorrection = false, + bool hideYawCorrection = false, + bool standingEnabled = false, + float standingUpperLegAngle = 0.0f, + float standingLowerLegAngle = 0.0f, + float standingFootAngle = 0.0f, + bool sittingEnabled = false, + float sittingUpperLegAngle = 0.0f, + float sittingLowerLegAngle = 0.0f, + float sittingFootAngle = 0.0f, + bool flatEnabled = false, + float flatUpperLegAngle = 0.0f, + float flatLowerLegAngle = 0.0f, + float flatFootAngle = 0.0f) { + StayAlignedSettingsBuilder builder_(_fbb); + builder_.add_flatFootAngle(flatFootAngle); + builder_.add_flatLowerLegAngle(flatLowerLegAngle); + builder_.add_flatUpperLegAngle(flatUpperLegAngle); + builder_.add_sittingFootAngle(sittingFootAngle); + builder_.add_sittingLowerLegAngle(sittingLowerLegAngle); + builder_.add_sittingUpperLegAngle(sittingUpperLegAngle); + builder_.add_standingFootAngle(standingFootAngle); + builder_.add_standingLowerLegAngle(standingLowerLegAngle); + builder_.add_standingUpperLegAngle(standingUpperLegAngle); + builder_.add_flatEnabled(flatEnabled); + builder_.add_sittingEnabled(sittingEnabled); + builder_.add_standingEnabled(standingEnabled); + builder_.add_hideYawCorrection(hideYawCorrection); + builder_.add_extraYawCorrection(extraYawCorrection); builder_.add_enabled(enabled); return builder_.Finish(); } @@ -11151,6 +11566,129 @@ inline flatbuffers::Offset CreateVRCConfigStateCha return builder_.Finish(); } +struct EnableStayAlignedRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EnableStayAlignedRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ENABLE = 4 + }; + bool enable() const { + return GetField(VT_ENABLE, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ENABLE, 1) && + verifier.EndTable(); + } +}; + +struct EnableStayAlignedRequestBuilder { + typedef EnableStayAlignedRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_enable(bool enable) { + fbb_.AddElement(EnableStayAlignedRequest::VT_ENABLE, static_cast(enable), 0); + } + explicit EnableStayAlignedRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateEnableStayAlignedRequest( + flatbuffers::FlatBufferBuilder &_fbb, + bool enable = false) { + EnableStayAlignedRequestBuilder builder_(_fbb); + builder_.add_enable(enable); + return builder_.Finish(); +} + +struct DetectStayAlignedRelaxedPoseRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DetectStayAlignedRelaxedPoseRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_POSE = 4 + }; + solarxr_protocol::rpc::StayAlignedRelaxedPose pose() const { + return static_cast(GetField(VT_POSE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_POSE, 1) && + verifier.EndTable(); + } +}; + +struct DetectStayAlignedRelaxedPoseRequestBuilder { + typedef DetectStayAlignedRelaxedPoseRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_pose(solarxr_protocol::rpc::StayAlignedRelaxedPose pose) { + fbb_.AddElement(DetectStayAlignedRelaxedPoseRequest::VT_POSE, static_cast(pose), 0); + } + explicit DetectStayAlignedRelaxedPoseRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateDetectStayAlignedRelaxedPoseRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::StayAlignedRelaxedPose pose = solarxr_protocol::rpc::StayAlignedRelaxedPose::STANDING) { + DetectStayAlignedRelaxedPoseRequestBuilder builder_(_fbb); + builder_.add_pose(pose); + return builder_.Finish(); +} + +struct ResetStayAlignedRelaxedPoseRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResetStayAlignedRelaxedPoseRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_POSE = 4 + }; + solarxr_protocol::rpc::StayAlignedRelaxedPose pose() const { + return static_cast(GetField(VT_POSE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_POSE, 1) && + verifier.EndTable(); + } +}; + +struct ResetStayAlignedRelaxedPoseRequestBuilder { + typedef ResetStayAlignedRelaxedPoseRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_pose(solarxr_protocol::rpc::StayAlignedRelaxedPose pose) { + fbb_.AddElement(ResetStayAlignedRelaxedPoseRequest::VT_POSE, static_cast(pose), 0); + } + explicit ResetStayAlignedRelaxedPoseRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateResetStayAlignedRelaxedPoseRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::StayAlignedRelaxedPose pose = solarxr_protocol::rpc::StayAlignedRelaxedPose::STANDING) { + ResetStayAlignedRelaxedPoseRequestBuilder builder_(_fbb); + builder_.add_pose(pose); + return builder_.Finish(); +} + } // namespace rpc namespace pub_sub { @@ -11807,6 +12345,10 @@ namespace hardware_info { } // namespace datatypes namespace data_feed { +namespace stay_aligned { + +} // namespace stay_aligned + namespace tracker { } // namespace tracker @@ -12144,6 +12686,18 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::EnableStayAlignedRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::DetectStayAlignedRelaxedPoseRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ResetStayAlignedRelaxedPoseRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java index d68c27a6..ead67c21 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java @@ -29,25 +29,29 @@ public final class DataFeedConfig extends Table { public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask() { return syntheticTrackersMask(new solarxr_protocol.data_feed.tracker.TrackerDataMask()); } public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMask obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public boolean boneMask() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean stayAlignedPoseMask() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public static int createDataFeedConfig(FlatBufferBuilder builder, int minimumTimeSinceLast, int dataMaskOffset, int syntheticTrackersMaskOffset, - boolean boneMask) { - builder.startTable(4); + boolean boneMask, + boolean stayAlignedPoseMask) { + builder.startTable(5); DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset); DataFeedConfig.addDataMask(builder, dataMaskOffset); DataFeedConfig.addMinimumTimeSinceLast(builder, minimumTimeSinceLast); + DataFeedConfig.addStayAlignedPoseMask(builder, stayAlignedPoseMask); DataFeedConfig.addBoneMask(builder, boneMask); return DataFeedConfig.endDataFeedConfig(builder); } - public static void startDataFeedConfig(FlatBufferBuilder builder) { builder.startTable(4); } + public static void startDataFeedConfig(FlatBufferBuilder builder) { builder.startTable(5); } public static void addMinimumTimeSinceLast(FlatBufferBuilder builder, int minimumTimeSinceLast) { builder.addShort(0, (short) minimumTimeSinceLast, (short) 0); } public static void addDataMask(FlatBufferBuilder builder, int dataMaskOffset) { builder.addOffset(1, dataMaskOffset, 0); } public static void addSyntheticTrackersMask(FlatBufferBuilder builder, int syntheticTrackersMaskOffset) { builder.addOffset(2, syntheticTrackersMaskOffset, 0); } public static void addBoneMask(FlatBufferBuilder builder, boolean boneMask) { builder.addBoolean(3, boneMask, false); } + public static void addStayAlignedPoseMask(FlatBufferBuilder builder, boolean stayAlignedPoseMask) { builder.addBoolean(4, stayAlignedPoseMask, false); } public static int endDataFeedConfig(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -73,6 +77,8 @@ public void unpackTo(DataFeedConfigT _o) { else _o.setSyntheticTrackersMask(null); boolean _oBoneMask = boneMask(); _o.setBoneMask(_oBoneMask); + boolean _oStayAlignedPoseMask = stayAlignedPoseMask(); + _o.setStayAlignedPoseMask(_oStayAlignedPoseMask); } public static int pack(FlatBufferBuilder builder, DataFeedConfigT _o) { if (_o == null) return 0; @@ -83,7 +89,8 @@ public static int pack(FlatBufferBuilder builder, DataFeedConfigT _o) { _o.getMinimumTimeSinceLast(), _dataMask, _syntheticTrackersMask, - _o.getBoneMask()); + _o.getBoneMask(), + _o.getStayAlignedPoseMask()); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java index ee6db767..1b0910a0 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java @@ -12,6 +12,7 @@ public class DataFeedConfigT { private solarxr_protocol.data_feed.device_data.DeviceDataMaskT dataMask; private solarxr_protocol.data_feed.tracker.TrackerDataMaskT syntheticTrackersMask; private boolean boneMask; + private boolean stayAlignedPoseMask; public int getMinimumTimeSinceLast() { return minimumTimeSinceLast; } @@ -29,12 +30,17 @@ public class DataFeedConfigT { public void setBoneMask(boolean boneMask) { this.boneMask = boneMask; } + public boolean getStayAlignedPoseMask() { return stayAlignedPoseMask; } + + public void setStayAlignedPoseMask(boolean stayAlignedPoseMask) { this.stayAlignedPoseMask = stayAlignedPoseMask; } + public DataFeedConfigT() { this.minimumTimeSinceLast = 0; this.dataMask = null; this.syntheticTrackersMask = null; this.boneMask = false; + this.stayAlignedPoseMask = false; } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java index 6d47a5b6..18a7791e 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java @@ -42,19 +42,23 @@ public final class DataFeedUpdate extends Table { public int bonesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } public solarxr_protocol.data_feed.Bone.Vector bonesVector() { return bonesVector(new solarxr_protocol.data_feed.Bone.Vector()); } public solarxr_protocol.data_feed.Bone.Vector bonesVector(solarxr_protocol.data_feed.Bone.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public solarxr_protocol.data_feed.stay_aligned.StayAlignedPose stayAlignedPose() { return stayAlignedPose(new solarxr_protocol.data_feed.stay_aligned.StayAlignedPose()); } + public solarxr_protocol.data_feed.stay_aligned.StayAlignedPose stayAlignedPose(solarxr_protocol.data_feed.stay_aligned.StayAlignedPose obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createDataFeedUpdate(FlatBufferBuilder builder, int devicesOffset, int syntheticTrackersOffset, - int bonesOffset) { - builder.startTable(3); + int bonesOffset, + int stayAlignedPoseOffset) { + builder.startTable(4); + DataFeedUpdate.addStayAlignedPose(builder, stayAlignedPoseOffset); DataFeedUpdate.addBones(builder, bonesOffset); DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); DataFeedUpdate.addDevices(builder, devicesOffset); return DataFeedUpdate.endDataFeedUpdate(builder); } - public static void startDataFeedUpdate(FlatBufferBuilder builder) { builder.startTable(3); } + public static void startDataFeedUpdate(FlatBufferBuilder builder) { builder.startTable(4); } public static void addDevices(FlatBufferBuilder builder, int devicesOffset) { builder.addOffset(0, devicesOffset, 0); } public static int createDevicesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } public static void startDevicesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } @@ -64,6 +68,7 @@ public static int createDataFeedUpdate(FlatBufferBuilder builder, public static void addBones(FlatBufferBuilder builder, int bonesOffset) { builder.addOffset(2, bonesOffset, 0); } public static int createBonesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } public static void startBonesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addStayAlignedPose(FlatBufferBuilder builder, int stayAlignedPoseOffset) { builder.addOffset(3, stayAlignedPoseOffset, 0); } public static int endDataFeedUpdate(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -90,6 +95,8 @@ public void unpackTo(DataFeedUpdateT _o) { solarxr_protocol.data_feed.BoneT[] _oBones = new solarxr_protocol.data_feed.BoneT[bonesLength()]; for (int _j = 0; _j < bonesLength(); ++_j) {_oBones[_j] = (bones(_j) != null ? bones(_j).unpack() : null);} _o.setBones(_oBones); + if (stayAlignedPose() != null) _o.setStayAlignedPose(stayAlignedPose().unpack()); + else _o.setStayAlignedPose(null); } public static int pack(FlatBufferBuilder builder, DataFeedUpdateT _o) { if (_o == null) return 0; @@ -114,11 +121,13 @@ public static int pack(FlatBufferBuilder builder, DataFeedUpdateT _o) { for (solarxr_protocol.data_feed.BoneT _e : _o.getBones()) { __bones[_j] = solarxr_protocol.data_feed.Bone.pack(builder, _e); _j++;} _bones = createBonesVector(builder, __bones); } + int _stayAlignedPose = _o.getStayAlignedPose() == null ? 0 : solarxr_protocol.data_feed.stay_aligned.StayAlignedPose.pack(builder, _o.getStayAlignedPose()); return createDataFeedUpdate( builder, _devices, _syntheticTrackers, - _bones); + _bones, + _stayAlignedPose); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java index 0f1eca25..5408428a 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java @@ -11,6 +11,7 @@ public class DataFeedUpdateT { private solarxr_protocol.data_feed.device_data.DeviceDataT[] devices; private solarxr_protocol.data_feed.tracker.TrackerDataT[] syntheticTrackers; private solarxr_protocol.data_feed.BoneT[] bones; + private solarxr_protocol.data_feed.stay_aligned.StayAlignedPoseT stayAlignedPose; public solarxr_protocol.data_feed.device_data.DeviceDataT[] getDevices() { return devices; } @@ -24,11 +25,16 @@ public class DataFeedUpdateT { public void setBones(solarxr_protocol.data_feed.BoneT[] bones) { this.bones = bones; } + public solarxr_protocol.data_feed.stay_aligned.StayAlignedPoseT getStayAlignedPose() { return stayAlignedPose; } + + public void setStayAlignedPose(solarxr_protocol.data_feed.stay_aligned.StayAlignedPoseT stayAlignedPose) { this.stayAlignedPose = stayAlignedPose; } + public DataFeedUpdateT() { this.devices = null; this.syntheticTrackers = null; this.bones = null; + this.stayAlignedPose = null; } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.java b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.java new file mode 100644 index 00000000..1099e622 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.java @@ -0,0 +1,70 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class StayAlignedPose extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StayAlignedPose getRootAsStayAlignedPose(ByteBuffer _bb) { return getRootAsStayAlignedPose(_bb, new StayAlignedPose()); } + public static StayAlignedPose getRootAsStayAlignedPose(ByteBuffer _bb, StayAlignedPose obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public StayAlignedPose __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float upperLegAngleInDeg() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float lowerLegAngleInDeg() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float footAngleInDeg() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createStayAlignedPose(FlatBufferBuilder builder, + float upperLegAngleInDeg, + float lowerLegAngleInDeg, + float footAngleInDeg) { + builder.startTable(3); + StayAlignedPose.addFootAngleInDeg(builder, footAngleInDeg); + StayAlignedPose.addLowerLegAngleInDeg(builder, lowerLegAngleInDeg); + StayAlignedPose.addUpperLegAngleInDeg(builder, upperLegAngleInDeg); + return StayAlignedPose.endStayAlignedPose(builder); + } + + public static void startStayAlignedPose(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addUpperLegAngleInDeg(FlatBufferBuilder builder, float upperLegAngleInDeg) { builder.addFloat(0, upperLegAngleInDeg, 0.0f); } + public static void addLowerLegAngleInDeg(FlatBufferBuilder builder, float lowerLegAngleInDeg) { builder.addFloat(1, lowerLegAngleInDeg, 0.0f); } + public static void addFootAngleInDeg(FlatBufferBuilder builder, float footAngleInDeg) { builder.addFloat(2, footAngleInDeg, 0.0f); } + public static int endStayAlignedPose(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public StayAlignedPose get(int j) { return get(new StayAlignedPose(), j); } + public StayAlignedPose get(StayAlignedPose obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StayAlignedPoseT unpack() { + StayAlignedPoseT _o = new StayAlignedPoseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StayAlignedPoseT _o) { + float _oUpperLegAngleInDeg = upperLegAngleInDeg(); + _o.setUpperLegAngleInDeg(_oUpperLegAngleInDeg); + float _oLowerLegAngleInDeg = lowerLegAngleInDeg(); + _o.setLowerLegAngleInDeg(_oLowerLegAngleInDeg); + float _oFootAngleInDeg = footAngleInDeg(); + _o.setFootAngleInDeg(_oFootAngleInDeg); + } + public static int pack(FlatBufferBuilder builder, StayAlignedPoseT _o) { + if (_o == null) return 0; + return createStayAlignedPose( + builder, + _o.getUpperLegAngleInDeg(), + _o.getLowerLegAngleInDeg(), + _o.getFootAngleInDeg()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPoseT.java b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPoseT.java new file mode 100644 index 00000000..e4dcf7c3 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPoseT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class StayAlignedPoseT { + private float upperLegAngleInDeg; + private float lowerLegAngleInDeg; + private float footAngleInDeg; + + public float getUpperLegAngleInDeg() { return upperLegAngleInDeg; } + + public void setUpperLegAngleInDeg(float upperLegAngleInDeg) { this.upperLegAngleInDeg = upperLegAngleInDeg; } + + public float getLowerLegAngleInDeg() { return lowerLegAngleInDeg; } + + public void setLowerLegAngleInDeg(float lowerLegAngleInDeg) { this.lowerLegAngleInDeg = lowerLegAngleInDeg; } + + public float getFootAngleInDeg() { return footAngleInDeg; } + + public void setFootAngleInDeg(float footAngleInDeg) { this.footAngleInDeg = footAngleInDeg; } + + + public StayAlignedPoseT() { + this.upperLegAngleInDeg = 0.0f; + this.lowerLegAngleInDeg = 0.0f; + this.footAngleInDeg = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.java b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.java new file mode 100644 index 00000000..8f3826dc --- /dev/null +++ b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.java @@ -0,0 +1,84 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class StayAlignedTracker extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StayAlignedTracker getRootAsStayAlignedTracker(ByteBuffer _bb) { return getRootAsStayAlignedTracker(_bb, new StayAlignedTracker()); } + public static StayAlignedTracker getRootAsStayAlignedTracker(ByteBuffer _bb, StayAlignedTracker obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public StayAlignedTracker __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float yawCorrectionInDeg() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float lockedErrorInDeg() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float centerErrorInDeg() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float neighborErrorInDeg() { int o = __offset(10); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public boolean locked() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createStayAlignedTracker(FlatBufferBuilder builder, + float yawCorrectionInDeg, + float lockedErrorInDeg, + float centerErrorInDeg, + float neighborErrorInDeg, + boolean locked) { + builder.startTable(5); + StayAlignedTracker.addNeighborErrorInDeg(builder, neighborErrorInDeg); + StayAlignedTracker.addCenterErrorInDeg(builder, centerErrorInDeg); + StayAlignedTracker.addLockedErrorInDeg(builder, lockedErrorInDeg); + StayAlignedTracker.addYawCorrectionInDeg(builder, yawCorrectionInDeg); + StayAlignedTracker.addLocked(builder, locked); + return StayAlignedTracker.endStayAlignedTracker(builder); + } + + public static void startStayAlignedTracker(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addYawCorrectionInDeg(FlatBufferBuilder builder, float yawCorrectionInDeg) { builder.addFloat(0, yawCorrectionInDeg, 0.0f); } + public static void addLockedErrorInDeg(FlatBufferBuilder builder, float lockedErrorInDeg) { builder.addFloat(1, lockedErrorInDeg, 0.0f); } + public static void addCenterErrorInDeg(FlatBufferBuilder builder, float centerErrorInDeg) { builder.addFloat(2, centerErrorInDeg, 0.0f); } + public static void addNeighborErrorInDeg(FlatBufferBuilder builder, float neighborErrorInDeg) { builder.addFloat(3, neighborErrorInDeg, 0.0f); } + public static void addLocked(FlatBufferBuilder builder, boolean locked) { builder.addBoolean(4, locked, false); } + public static int endStayAlignedTracker(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public StayAlignedTracker get(int j) { return get(new StayAlignedTracker(), j); } + public StayAlignedTracker get(StayAlignedTracker obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StayAlignedTrackerT unpack() { + StayAlignedTrackerT _o = new StayAlignedTrackerT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StayAlignedTrackerT _o) { + float _oYawCorrectionInDeg = yawCorrectionInDeg(); + _o.setYawCorrectionInDeg(_oYawCorrectionInDeg); + float _oLockedErrorInDeg = lockedErrorInDeg(); + _o.setLockedErrorInDeg(_oLockedErrorInDeg); + float _oCenterErrorInDeg = centerErrorInDeg(); + _o.setCenterErrorInDeg(_oCenterErrorInDeg); + float _oNeighborErrorInDeg = neighborErrorInDeg(); + _o.setNeighborErrorInDeg(_oNeighborErrorInDeg); + boolean _oLocked = locked(); + _o.setLocked(_oLocked); + } + public static int pack(FlatBufferBuilder builder, StayAlignedTrackerT _o) { + if (_o == null) return 0; + return createStayAlignedTracker( + builder, + _o.getYawCorrectionInDeg(), + _o.getLockedErrorInDeg(), + _o.getCenterErrorInDeg(), + _o.getNeighborErrorInDeg(), + _o.getLocked()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTrackerT.java b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTrackerT.java new file mode 100644 index 00000000..153df5e4 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTrackerT.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class StayAlignedTrackerT { + private float yawCorrectionInDeg; + private float lockedErrorInDeg; + private float centerErrorInDeg; + private float neighborErrorInDeg; + private boolean locked; + + public float getYawCorrectionInDeg() { return yawCorrectionInDeg; } + + public void setYawCorrectionInDeg(float yawCorrectionInDeg) { this.yawCorrectionInDeg = yawCorrectionInDeg; } + + public float getLockedErrorInDeg() { return lockedErrorInDeg; } + + public void setLockedErrorInDeg(float lockedErrorInDeg) { this.lockedErrorInDeg = lockedErrorInDeg; } + + public float getCenterErrorInDeg() { return centerErrorInDeg; } + + public void setCenterErrorInDeg(float centerErrorInDeg) { this.centerErrorInDeg = centerErrorInDeg; } + + public float getNeighborErrorInDeg() { return neighborErrorInDeg; } + + public void setNeighborErrorInDeg(float neighborErrorInDeg) { this.neighborErrorInDeg = neighborErrorInDeg; } + + public boolean getLocked() { return locked; } + + public void setLocked(boolean locked) { this.locked = locked; } + + + public StayAlignedTrackerT() { + this.yawCorrectionInDeg = 0.0f; + this.lockedErrorInDeg = 0.0f; + this.centerErrorInDeg = 0.0f; + this.neighborErrorInDeg = 0.0f; + this.locked = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java index 7ecce00d..4f39a7d8 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java @@ -82,8 +82,13 @@ public final class TrackerData extends Table { */ public boolean hasTps() { return 0 != __offset(26); } public int tps() { int o = __offset(26); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + /** + * Stay Aligned + */ + public solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker stayAligned() { return stayAligned(new solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker()); } + public solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker stayAligned(solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(12); } + public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(13); } public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } public static void addInfo(FlatBufferBuilder builder, int infoOffset) { builder.addOffset(1, infoOffset, 0); } public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(2, (byte) status, (byte) 0); } @@ -96,6 +101,7 @@ public final class TrackerData extends Table { public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, int rotationReferenceAdjustedOffset) { builder.addStruct(9, rotationReferenceAdjustedOffset, 0); } public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, int rotationIdentityAdjustedOffset) { builder.addStruct(10, rotationIdentityAdjustedOffset, 0); } public static void addTps(FlatBufferBuilder builder, int tps) { builder.addShort(11, (short) tps, (short) 0); } + public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(12, stayAlignedOffset, 0); } public static int endTrackerData(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -137,11 +143,14 @@ public void unpackTo(TrackerDataT _o) { else _o.setRotationIdentityAdjusted(null); Integer _oTps = hasTps() ? tps() : null; _o.setTps(_oTps); + if (stayAligned() != null) _o.setStayAligned(stayAligned().unpack()); + else _o.setStayAligned(null); } public static int pack(FlatBufferBuilder builder, TrackerDataT _o) { if (_o == null) return 0; int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); int _info = _o.getInfo() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerInfo.pack(builder, _o.getInfo()); + int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker.pack(builder, _o.getStayAligned()); startTrackerData(builder); addTrackerId(builder, _trackerId); addInfo(builder, _info); @@ -155,6 +164,7 @@ public static int pack(FlatBufferBuilder builder, TrackerDataT _o) { addRotationReferenceAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationReferenceAdjusted())); addRotationIdentityAdjusted(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationIdentityAdjusted())); if (_o.getTps() != null) { addTps(builder, _o.getTps()); } + addStayAligned(builder, _stayAligned); return endTrackerData(builder); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java index 847157f4..9babdbd7 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java @@ -29,6 +29,7 @@ public final class TrackerDataMask extends Table { public boolean rotationReferenceAdjusted() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public boolean rotationIdentityAdjusted() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public boolean tps() { int o = __offset(24); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean stayAligned() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public static int createTrackerDataMask(FlatBufferBuilder builder, boolean info, @@ -41,8 +42,10 @@ public static int createTrackerDataMask(FlatBufferBuilder builder, boolean linearAcceleration, boolean rotationReferenceAdjusted, boolean rotationIdentityAdjusted, - boolean tps) { - builder.startTable(11); + boolean tps, + boolean stayAligned) { + builder.startTable(12); + TrackerDataMask.addStayAligned(builder, stayAligned); TrackerDataMask.addTps(builder, tps); TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); @@ -57,7 +60,7 @@ public static int createTrackerDataMask(FlatBufferBuilder builder, return TrackerDataMask.endTrackerDataMask(builder); } - public static void startTrackerDataMask(FlatBufferBuilder builder) { builder.startTable(11); } + public static void startTrackerDataMask(FlatBufferBuilder builder) { builder.startTable(12); } public static void addInfo(FlatBufferBuilder builder, boolean info) { builder.addBoolean(0, info, false); } public static void addStatus(FlatBufferBuilder builder, boolean status) { builder.addBoolean(1, status, false); } public static void addRotation(FlatBufferBuilder builder, boolean rotation) { builder.addBoolean(2, rotation, false); } @@ -69,6 +72,7 @@ public static int createTrackerDataMask(FlatBufferBuilder builder, public static void addRotationReferenceAdjusted(FlatBufferBuilder builder, boolean rotationReferenceAdjusted) { builder.addBoolean(8, rotationReferenceAdjusted, false); } public static void addRotationIdentityAdjusted(FlatBufferBuilder builder, boolean rotationIdentityAdjusted) { builder.addBoolean(9, rotationIdentityAdjusted, false); } public static void addTps(FlatBufferBuilder builder, boolean tps) { builder.addBoolean(10, tps, false); } + public static void addStayAligned(FlatBufferBuilder builder, boolean stayAligned) { builder.addBoolean(11, stayAligned, false); } public static int endTrackerDataMask(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -108,6 +112,8 @@ public void unpackTo(TrackerDataMaskT _o) { _o.setRotationIdentityAdjusted(_oRotationIdentityAdjusted); boolean _oTps = tps(); _o.setTps(_oTps); + boolean _oStayAligned = stayAligned(); + _o.setStayAligned(_oStayAligned); } public static int pack(FlatBufferBuilder builder, TrackerDataMaskT _o) { if (_o == null) return 0; @@ -123,7 +129,8 @@ public static int pack(FlatBufferBuilder builder, TrackerDataMaskT _o) { _o.getLinearAcceleration(), _o.getRotationReferenceAdjusted(), _o.getRotationIdentityAdjusted(), - _o.getTps()); + _o.getTps(), + _o.getStayAligned()); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java index 40ab9ecf..4be6503b 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java @@ -19,6 +19,7 @@ public class TrackerDataMaskT { private boolean rotationReferenceAdjusted; private boolean rotationIdentityAdjusted; private boolean tps; + private boolean stayAligned; public boolean getInfo() { return info; } @@ -64,6 +65,10 @@ public class TrackerDataMaskT { public void setTps(boolean tps) { this.tps = tps; } + public boolean getStayAligned() { return stayAligned; } + + public void setStayAligned(boolean stayAligned) { this.stayAligned = stayAligned; } + public TrackerDataMaskT() { this.info = false; @@ -77,6 +82,7 @@ public TrackerDataMaskT() { this.rotationReferenceAdjusted = false; this.rotationIdentityAdjusted = false; this.tps = false; + this.stayAligned = false; } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java index b37813c8..93eb9904 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java @@ -20,6 +20,7 @@ public class TrackerDataT { private solarxr_protocol.datatypes.math.QuatT rotationReferenceAdjusted; private solarxr_protocol.datatypes.math.QuatT rotationIdentityAdjusted; private Integer tps; + private solarxr_protocol.data_feed.stay_aligned.StayAlignedTrackerT stayAligned; public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } @@ -69,6 +70,10 @@ public class TrackerDataT { public void setTps(Integer tps) { this.tps = tps; } + public solarxr_protocol.data_feed.stay_aligned.StayAlignedTrackerT getStayAligned() { return stayAligned; } + + public void setStayAligned(solarxr_protocol.data_feed.stay_aligned.StayAlignedTrackerT stayAligned) { this.stayAligned = stayAligned; } + public TrackerDataT() { this.trackerId = null; @@ -83,6 +88,7 @@ public TrackerDataT() { this.rotationReferenceAdjusted = new solarxr_protocol.datatypes.math.QuatT(); this.rotationIdentityAdjusted = new solarxr_protocol.datatypes.math.QuatT(); this.tps = null; + this.stayAligned = null; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index 888cb470..1516ae92 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -35,8 +35,8 @@ public final class ChangeSettingsRequest extends Table { public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.YawCorrectionSettings yawCorrectionSettings() { return yawCorrectionSettings(new solarxr_protocol.rpc.YawCorrectionSettings()); } - public solarxr_protocol.rpc.YawCorrectionSettings yawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.StayAlignedSettings stayAligned() { return stayAligned(new solarxr_protocol.rpc.StayAlignedSettings()); } + public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createChangeSettingsRequest(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -49,9 +49,9 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, int tapDetectionSettingsOffset, int autoBoneSettingsOffset, int resetsSettingsOffset, - int yawCorrectionSettingsOffset) { + int stayAlignedOffset) { builder.startTable(11); - ChangeSettingsRequest.addYawCorrectionSettings(builder, yawCorrectionSettingsOffset); + ChangeSettingsRequest.addStayAligned(builder, stayAlignedOffset); ChangeSettingsRequest.addResetsSettings(builder, resetsSettingsOffset); ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettingsOffset); ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettingsOffset); @@ -76,7 +76,7 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } - public static void addYawCorrectionSettings(FlatBufferBuilder builder, int yawCorrectionSettingsOffset) { builder.addOffset(10, yawCorrectionSettingsOffset, 0); } + public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static int endChangeSettingsRequest(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -114,8 +114,8 @@ public void unpackTo(ChangeSettingsRequestT _o) { else _o.setAutoBoneSettings(null); if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); else _o.setResetsSettings(null); - if (yawCorrectionSettings() != null) _o.setYawCorrectionSettings(yawCorrectionSettings().unpack()); - else _o.setYawCorrectionSettings(null); + if (stayAligned() != null) _o.setStayAligned(stayAligned().unpack()); + else _o.setStayAligned(null); } public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { if (_o == null) return 0; @@ -129,7 +129,7 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); - int _yawCorrectionSettings = _o.getYawCorrectionSettings() == null ? 0 : solarxr_protocol.rpc.YawCorrectionSettings.pack(builder, _o.getYawCorrectionSettings()); + int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); return createChangeSettingsRequest( builder, _steamVrTrackers, @@ -142,7 +142,7 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { _tapDetectionSettings, _autoBoneSettings, _resetsSettings, - _yawCorrectionSettings); + _stayAligned); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java index 2d8313ab..a73d41e4 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java @@ -18,7 +18,7 @@ public class ChangeSettingsRequestT { private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; - private solarxr_protocol.rpc.YawCorrectionSettingsT yawCorrectionSettings; + private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -60,9 +60,9 @@ public class ChangeSettingsRequestT { public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } - public solarxr_protocol.rpc.YawCorrectionSettingsT getYawCorrectionSettings() { return yawCorrectionSettings; } + public solarxr_protocol.rpc.StayAlignedSettingsT getStayAligned() { return stayAligned; } - public void setYawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettingsT yawCorrectionSettings) { this.yawCorrectionSettings = yawCorrectionSettings; } + public void setStayAligned(solarxr_protocol.rpc.StayAlignedSettingsT stayAligned) { this.stayAligned = stayAligned; } public ChangeSettingsRequestT() { @@ -76,7 +76,7 @@ public ChangeSettingsRequestT() { this.tapDetectionSettings = null; this.autoBoneSettings = null; this.resetsSettings = null; - this.yawCorrectionSettings = null; + this.stayAligned = null; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.java b/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.java new file mode 100644 index 00000000..c4944464 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.java @@ -0,0 +1,56 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class DetectStayAlignedRelaxedPoseRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static DetectStayAlignedRelaxedPoseRequest getRootAsDetectStayAlignedRelaxedPoseRequest(ByteBuffer _bb) { return getRootAsDetectStayAlignedRelaxedPoseRequest(_bb, new DetectStayAlignedRelaxedPoseRequest()); } + public static DetectStayAlignedRelaxedPoseRequest getRootAsDetectStayAlignedRelaxedPoseRequest(ByteBuffer _bb, DetectStayAlignedRelaxedPoseRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DetectStayAlignedRelaxedPoseRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int pose() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createDetectStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder, + int pose) { + builder.startTable(1); + DetectStayAlignedRelaxedPoseRequest.addPose(builder, pose); + return DetectStayAlignedRelaxedPoseRequest.endDetectStayAlignedRelaxedPoseRequest(builder); + } + + public static void startDetectStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addPose(FlatBufferBuilder builder, int pose) { builder.addByte(0, (byte) pose, (byte) 0); } + public static int endDetectStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DetectStayAlignedRelaxedPoseRequest get(int j) { return get(new DetectStayAlignedRelaxedPoseRequest(), j); } + public DetectStayAlignedRelaxedPoseRequest get(DetectStayAlignedRelaxedPoseRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DetectStayAlignedRelaxedPoseRequestT unpack() { + DetectStayAlignedRelaxedPoseRequestT _o = new DetectStayAlignedRelaxedPoseRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DetectStayAlignedRelaxedPoseRequestT _o) { + int _oPose = pose(); + _o.setPose(_oPose); + } + public static int pack(FlatBufferBuilder builder, DetectStayAlignedRelaxedPoseRequestT _o) { + if (_o == null) return 0; + return createDetectStayAlignedRelaxedPoseRequest( + builder, + _o.getPose()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequestT.java b/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequestT.java new file mode 100644 index 00000000..e4819878 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DetectStayAlignedRelaxedPoseRequestT { + private int pose; + + public int getPose() { return pose; } + + public void setPose(int pose) { this.pose = pose; } + + + public DetectStayAlignedRelaxedPoseRequestT() { + this.pose = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequest.java b/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequest.java new file mode 100644 index 00000000..ae46ad14 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequest.java @@ -0,0 +1,56 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class EnableStayAlignedRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static EnableStayAlignedRequest getRootAsEnableStayAlignedRequest(ByteBuffer _bb) { return getRootAsEnableStayAlignedRequest(_bb, new EnableStayAlignedRequest()); } + public static EnableStayAlignedRequest getRootAsEnableStayAlignedRequest(ByteBuffer _bb, EnableStayAlignedRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public EnableStayAlignedRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean enable() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createEnableStayAlignedRequest(FlatBufferBuilder builder, + boolean enable) { + builder.startTable(1); + EnableStayAlignedRequest.addEnable(builder, enable); + return EnableStayAlignedRequest.endEnableStayAlignedRequest(builder); + } + + public static void startEnableStayAlignedRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addEnable(FlatBufferBuilder builder, boolean enable) { builder.addBoolean(0, enable, false); } + public static int endEnableStayAlignedRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public EnableStayAlignedRequest get(int j) { return get(new EnableStayAlignedRequest(), j); } + public EnableStayAlignedRequest get(EnableStayAlignedRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public EnableStayAlignedRequestT unpack() { + EnableStayAlignedRequestT _o = new EnableStayAlignedRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(EnableStayAlignedRequestT _o) { + boolean _oEnable = enable(); + _o.setEnable(_oEnable); + } + public static int pack(FlatBufferBuilder builder, EnableStayAlignedRequestT _o) { + if (_o == null) return 0; + return createEnableStayAlignedRequest( + builder, + _o.getEnable()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequestT.java b/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequestT.java new file mode 100644 index 00000000..0537e28b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/EnableStayAlignedRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class EnableStayAlignedRequestT { + private boolean enable; + + public boolean getEnable() { return enable; } + + public void setEnable(boolean enable) { this.enable = enable; } + + + public EnableStayAlignedRequestT() { + this.enable = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.java b/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.java new file mode 100644 index 00000000..5a3934cb --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.java @@ -0,0 +1,56 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class ResetStayAlignedRelaxedPoseRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ResetStayAlignedRelaxedPoseRequest getRootAsResetStayAlignedRelaxedPoseRequest(ByteBuffer _bb) { return getRootAsResetStayAlignedRelaxedPoseRequest(_bb, new ResetStayAlignedRelaxedPoseRequest()); } + public static ResetStayAlignedRelaxedPoseRequest getRootAsResetStayAlignedRelaxedPoseRequest(ByteBuffer _bb, ResetStayAlignedRelaxedPoseRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ResetStayAlignedRelaxedPoseRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int pose() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createResetStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder, + int pose) { + builder.startTable(1); + ResetStayAlignedRelaxedPoseRequest.addPose(builder, pose); + return ResetStayAlignedRelaxedPoseRequest.endResetStayAlignedRelaxedPoseRequest(builder); + } + + public static void startResetStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addPose(FlatBufferBuilder builder, int pose) { builder.addByte(0, (byte) pose, (byte) 0); } + public static int endResetStayAlignedRelaxedPoseRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ResetStayAlignedRelaxedPoseRequest get(int j) { return get(new ResetStayAlignedRelaxedPoseRequest(), j); } + public ResetStayAlignedRelaxedPoseRequest get(ResetStayAlignedRelaxedPoseRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ResetStayAlignedRelaxedPoseRequestT unpack() { + ResetStayAlignedRelaxedPoseRequestT _o = new ResetStayAlignedRelaxedPoseRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ResetStayAlignedRelaxedPoseRequestT _o) { + int _oPose = pose(); + _o.setPose(_oPose); + } + public static int pack(FlatBufferBuilder builder, ResetStayAlignedRelaxedPoseRequestT _o) { + if (_o == null) return 0; + return createResetStayAlignedRelaxedPoseRequest( + builder, + _o.getPose()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequestT.java new file mode 100644 index 00000000..c6aad553 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class ResetStayAlignedRelaxedPoseRequestT { + private int pose; + + public int getPose() { return pose; } + + public void setPose(int pose) { this.pose = pose; } + + + public ResetStayAlignedRelaxedPoseRequestT() { + this.pose = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 331fb534..52cb71e4 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -73,8 +73,11 @@ private RpcMessage() { } public static final byte RecordBVHStatusRequest = 65; public static final byte VRCConfigStateRequest = 66; public static final byte VRCConfigStateChangeResponse = 67; + public static final byte EnableStayAlignedRequest = 68; + public static final byte DetectStayAlignedRelaxedPoseRequest = 69; + public static final byte ResetStayAlignedRelaxedPoseRequest = 70; - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", }; + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java index 8a509869..fe97ed54 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -320,6 +320,18 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.VRCConfigStateChangeResponse()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.VRCConfigStateChangeResponse) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.EnableStayAlignedRequest: + _oMessageValue = message(new solarxr_protocol.rpc.EnableStayAlignedRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.EnableStayAlignedRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.DetectStayAlignedRelaxedPoseRequest: + _oMessageValue = message(new solarxr_protocol.rpc.DetectStayAlignedRelaxedPoseRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.DetectStayAlignedRelaxedPoseRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ResetStayAlignedRelaxedPoseRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ResetStayAlignedRelaxedPoseRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ResetStayAlignedRelaxedPoseRequest) _oMessageValue).unpack() : null); + break; default: break; } _o.setMessage(_oMessage); diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index ba6e4335..52e314e9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -88,6 +88,9 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.RecordBVHStatusRequestT asRecordBVHStatusRequest() { return (solarxr_protocol.rpc.RecordBVHStatusRequestT) value; } public solarxr_protocol.rpc.VRCConfigStateRequestT asVRCConfigStateRequest() { return (solarxr_protocol.rpc.VRCConfigStateRequestT) value; } public solarxr_protocol.rpc.VRCConfigStateChangeResponseT asVRCConfigStateChangeResponse() { return (solarxr_protocol.rpc.VRCConfigStateChangeResponseT) value; } + public solarxr_protocol.rpc.EnableStayAlignedRequestT asEnableStayAlignedRequest() { return (solarxr_protocol.rpc.EnableStayAlignedRequestT) value; } + public solarxr_protocol.rpc.DetectStayAlignedRelaxedPoseRequestT asDetectStayAlignedRelaxedPoseRequest() { return (solarxr_protocol.rpc.DetectStayAlignedRelaxedPoseRequestT) value; } + public solarxr_protocol.rpc.ResetStayAlignedRelaxedPoseRequestT asResetStayAlignedRelaxedPoseRequest() { return (solarxr_protocol.rpc.ResetStayAlignedRelaxedPoseRequestT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -158,6 +161,9 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.RecordBVHStatusRequest: return solarxr_protocol.rpc.RecordBVHStatusRequest.pack(builder, _o.asRecordBVHStatusRequest()); case RpcMessage.VRCConfigStateRequest: return solarxr_protocol.rpc.VRCConfigStateRequest.pack(builder, _o.asVRCConfigStateRequest()); case RpcMessage.VRCConfigStateChangeResponse: return solarxr_protocol.rpc.VRCConfigStateChangeResponse.pack(builder, _o.asVRCConfigStateChangeResponse()); + case RpcMessage.EnableStayAlignedRequest: return solarxr_protocol.rpc.EnableStayAlignedRequest.pack(builder, _o.asEnableStayAlignedRequest()); + case RpcMessage.DetectStayAlignedRelaxedPoseRequest: return solarxr_protocol.rpc.DetectStayAlignedRelaxedPoseRequest.pack(builder, _o.asDetectStayAlignedRelaxedPoseRequest()); + case RpcMessage.ResetStayAlignedRelaxedPoseRequest: return solarxr_protocol.rpc.ResetStayAlignedRelaxedPoseRequest.pack(builder, _o.asResetStayAlignedRelaxedPoseRequest()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java index a4341be2..c8717174 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -35,8 +35,8 @@ public final class SettingsResponse extends Table { public solarxr_protocol.rpc.AutoBoneSettings autoBoneSettings(solarxr_protocol.rpc.AutoBoneSettings obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.ResetsSettings resetsSettings() { return resetsSettings(new solarxr_protocol.rpc.ResetsSettings()); } public solarxr_protocol.rpc.ResetsSettings resetsSettings(solarxr_protocol.rpc.ResetsSettings obj) { int o = __offset(22); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.YawCorrectionSettings yawCorrectionSettings() { return yawCorrectionSettings(new solarxr_protocol.rpc.YawCorrectionSettings()); } - public solarxr_protocol.rpc.YawCorrectionSettings yawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.StayAlignedSettings stayAligned() { return stayAligned(new solarxr_protocol.rpc.StayAlignedSettings()); } + public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createSettingsResponse(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -49,9 +49,9 @@ public static int createSettingsResponse(FlatBufferBuilder builder, int tapDetectionSettingsOffset, int autoBoneSettingsOffset, int resetsSettingsOffset, - int yawCorrectionSettingsOffset) { + int stayAlignedOffset) { builder.startTable(11); - SettingsResponse.addYawCorrectionSettings(builder, yawCorrectionSettingsOffset); + SettingsResponse.addStayAligned(builder, stayAlignedOffset); SettingsResponse.addResetsSettings(builder, resetsSettingsOffset); SettingsResponse.addAutoBoneSettings(builder, autoBoneSettingsOffset); SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettingsOffset); @@ -76,7 +76,7 @@ public static int createSettingsResponse(FlatBufferBuilder builder, public static void addTapDetectionSettings(FlatBufferBuilder builder, int tapDetectionSettingsOffset) { builder.addOffset(7, tapDetectionSettingsOffset, 0); } public static void addAutoBoneSettings(FlatBufferBuilder builder, int autoBoneSettingsOffset) { builder.addOffset(8, autoBoneSettingsOffset, 0); } public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } - public static void addYawCorrectionSettings(FlatBufferBuilder builder, int yawCorrectionSettingsOffset) { builder.addOffset(10, yawCorrectionSettingsOffset, 0); } + public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static int endSettingsResponse(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -114,8 +114,8 @@ public void unpackTo(SettingsResponseT _o) { else _o.setAutoBoneSettings(null); if (resetsSettings() != null) _o.setResetsSettings(resetsSettings().unpack()); else _o.setResetsSettings(null); - if (yawCorrectionSettings() != null) _o.setYawCorrectionSettings(yawCorrectionSettings().unpack()); - else _o.setYawCorrectionSettings(null); + if (stayAligned() != null) _o.setStayAligned(stayAligned().unpack()); + else _o.setStayAligned(null); } public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { if (_o == null) return 0; @@ -129,7 +129,7 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { int _tapDetectionSettings = _o.getTapDetectionSettings() == null ? 0 : solarxr_protocol.rpc.TapDetectionSettings.pack(builder, _o.getTapDetectionSettings()); int _autoBoneSettings = _o.getAutoBoneSettings() == null ? 0 : solarxr_protocol.rpc.AutoBoneSettings.pack(builder, _o.getAutoBoneSettings()); int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); - int _yawCorrectionSettings = _o.getYawCorrectionSettings() == null ? 0 : solarxr_protocol.rpc.YawCorrectionSettings.pack(builder, _o.getYawCorrectionSettings()); + int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); return createSettingsResponse( builder, _steamVrTrackers, @@ -142,7 +142,7 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { _tapDetectionSettings, _autoBoneSettings, _resetsSettings, - _yawCorrectionSettings); + _stayAligned); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java index f282a139..efd3e603 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java @@ -18,7 +18,7 @@ public class SettingsResponseT { private solarxr_protocol.rpc.TapDetectionSettingsT tapDetectionSettings; private solarxr_protocol.rpc.AutoBoneSettingsT autoBoneSettings; private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; - private solarxr_protocol.rpc.YawCorrectionSettingsT yawCorrectionSettings; + private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -60,9 +60,9 @@ public class SettingsResponseT { public void setResetsSettings(solarxr_protocol.rpc.ResetsSettingsT resetsSettings) { this.resetsSettings = resetsSettings; } - public solarxr_protocol.rpc.YawCorrectionSettingsT getYawCorrectionSettings() { return yawCorrectionSettings; } + public solarxr_protocol.rpc.StayAlignedSettingsT getStayAligned() { return stayAligned; } - public void setYawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettingsT yawCorrectionSettings) { this.yawCorrectionSettings = yawCorrectionSettings; } + public void setStayAligned(solarxr_protocol.rpc.StayAlignedSettingsT stayAligned) { this.stayAligned = stayAligned; } public SettingsResponseT() { @@ -76,7 +76,7 @@ public SettingsResponseT() { this.tapDetectionSettings = null; this.autoBoneSettings = null; this.resetsSettings = null; - this.yawCorrectionSettings = null; + this.stayAligned = null; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.java b/protocol/java/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.java new file mode 100644 index 00000000..dbbdde57 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class StayAlignedRelaxedPose { + private StayAlignedRelaxedPose() { } + public static final int STANDING = 0; + public static final int SITTING = 1; + public static final int FLAT = 2; + + public static final String[] names = { "STANDING", "SITTING", "FLAT", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettings.java b/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettings.java new file mode 100644 index 00000000..52581362 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettings.java @@ -0,0 +1,154 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class StayAlignedSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static StayAlignedSettings getRootAsStayAlignedSettings(ByteBuffer _bb) { return getRootAsStayAlignedSettings(_bb, new StayAlignedSettings()); } + public static StayAlignedSettings getRootAsStayAlignedSettings(ByteBuffer _bb, StayAlignedSettings obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public StayAlignedSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean extraYawCorrection() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hideYawCorrection() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean standingEnabled() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public float standingUpperLegAngle() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float standingLowerLegAngle() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float standingFootAngle() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public boolean sittingEnabled() { int o = __offset(18); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public float sittingUpperLegAngle() { int o = __offset(20); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float sittingLowerLegAngle() { int o = __offset(22); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float sittingFootAngle() { int o = __offset(24); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public boolean flatEnabled() { int o = __offset(26); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public float flatUpperLegAngle() { int o = __offset(28); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float flatLowerLegAngle() { int o = __offset(30); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public float flatFootAngle() { int o = __offset(32); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createStayAlignedSettings(FlatBufferBuilder builder, + boolean enabled, + boolean extraYawCorrection, + boolean hideYawCorrection, + boolean standingEnabled, + float standingUpperLegAngle, + float standingLowerLegAngle, + float standingFootAngle, + boolean sittingEnabled, + float sittingUpperLegAngle, + float sittingLowerLegAngle, + float sittingFootAngle, + boolean flatEnabled, + float flatUpperLegAngle, + float flatLowerLegAngle, + float flatFootAngle) { + builder.startTable(15); + StayAlignedSettings.addFlatFootAngle(builder, flatFootAngle); + StayAlignedSettings.addFlatLowerLegAngle(builder, flatLowerLegAngle); + StayAlignedSettings.addFlatUpperLegAngle(builder, flatUpperLegAngle); + StayAlignedSettings.addSittingFootAngle(builder, sittingFootAngle); + StayAlignedSettings.addSittingLowerLegAngle(builder, sittingLowerLegAngle); + StayAlignedSettings.addSittingUpperLegAngle(builder, sittingUpperLegAngle); + StayAlignedSettings.addStandingFootAngle(builder, standingFootAngle); + StayAlignedSettings.addStandingLowerLegAngle(builder, standingLowerLegAngle); + StayAlignedSettings.addStandingUpperLegAngle(builder, standingUpperLegAngle); + StayAlignedSettings.addFlatEnabled(builder, flatEnabled); + StayAlignedSettings.addSittingEnabled(builder, sittingEnabled); + StayAlignedSettings.addStandingEnabled(builder, standingEnabled); + StayAlignedSettings.addHideYawCorrection(builder, hideYawCorrection); + StayAlignedSettings.addExtraYawCorrection(builder, extraYawCorrection); + StayAlignedSettings.addEnabled(builder, enabled); + return StayAlignedSettings.endStayAlignedSettings(builder); + } + + public static void startStayAlignedSettings(FlatBufferBuilder builder) { builder.startTable(15); } + public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } + public static void addExtraYawCorrection(FlatBufferBuilder builder, boolean extraYawCorrection) { builder.addBoolean(1, extraYawCorrection, false); } + public static void addHideYawCorrection(FlatBufferBuilder builder, boolean hideYawCorrection) { builder.addBoolean(2, hideYawCorrection, false); } + public static void addStandingEnabled(FlatBufferBuilder builder, boolean standingEnabled) { builder.addBoolean(3, standingEnabled, false); } + public static void addStandingUpperLegAngle(FlatBufferBuilder builder, float standingUpperLegAngle) { builder.addFloat(4, standingUpperLegAngle, 0.0f); } + public static void addStandingLowerLegAngle(FlatBufferBuilder builder, float standingLowerLegAngle) { builder.addFloat(5, standingLowerLegAngle, 0.0f); } + public static void addStandingFootAngle(FlatBufferBuilder builder, float standingFootAngle) { builder.addFloat(6, standingFootAngle, 0.0f); } + public static void addSittingEnabled(FlatBufferBuilder builder, boolean sittingEnabled) { builder.addBoolean(7, sittingEnabled, false); } + public static void addSittingUpperLegAngle(FlatBufferBuilder builder, float sittingUpperLegAngle) { builder.addFloat(8, sittingUpperLegAngle, 0.0f); } + public static void addSittingLowerLegAngle(FlatBufferBuilder builder, float sittingLowerLegAngle) { builder.addFloat(9, sittingLowerLegAngle, 0.0f); } + public static void addSittingFootAngle(FlatBufferBuilder builder, float sittingFootAngle) { builder.addFloat(10, sittingFootAngle, 0.0f); } + public static void addFlatEnabled(FlatBufferBuilder builder, boolean flatEnabled) { builder.addBoolean(11, flatEnabled, false); } + public static void addFlatUpperLegAngle(FlatBufferBuilder builder, float flatUpperLegAngle) { builder.addFloat(12, flatUpperLegAngle, 0.0f); } + public static void addFlatLowerLegAngle(FlatBufferBuilder builder, float flatLowerLegAngle) { builder.addFloat(13, flatLowerLegAngle, 0.0f); } + public static void addFlatFootAngle(FlatBufferBuilder builder, float flatFootAngle) { builder.addFloat(14, flatFootAngle, 0.0f); } + public static int endStayAlignedSettings(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public StayAlignedSettings get(int j) { return get(new StayAlignedSettings(), j); } + public StayAlignedSettings get(StayAlignedSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StayAlignedSettingsT unpack() { + StayAlignedSettingsT _o = new StayAlignedSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StayAlignedSettingsT _o) { + boolean _oEnabled = enabled(); + _o.setEnabled(_oEnabled); + boolean _oExtraYawCorrection = extraYawCorrection(); + _o.setExtraYawCorrection(_oExtraYawCorrection); + boolean _oHideYawCorrection = hideYawCorrection(); + _o.setHideYawCorrection(_oHideYawCorrection); + boolean _oStandingEnabled = standingEnabled(); + _o.setStandingEnabled(_oStandingEnabled); + float _oStandingUpperLegAngle = standingUpperLegAngle(); + _o.setStandingUpperLegAngle(_oStandingUpperLegAngle); + float _oStandingLowerLegAngle = standingLowerLegAngle(); + _o.setStandingLowerLegAngle(_oStandingLowerLegAngle); + float _oStandingFootAngle = standingFootAngle(); + _o.setStandingFootAngle(_oStandingFootAngle); + boolean _oSittingEnabled = sittingEnabled(); + _o.setSittingEnabled(_oSittingEnabled); + float _oSittingUpperLegAngle = sittingUpperLegAngle(); + _o.setSittingUpperLegAngle(_oSittingUpperLegAngle); + float _oSittingLowerLegAngle = sittingLowerLegAngle(); + _o.setSittingLowerLegAngle(_oSittingLowerLegAngle); + float _oSittingFootAngle = sittingFootAngle(); + _o.setSittingFootAngle(_oSittingFootAngle); + boolean _oFlatEnabled = flatEnabled(); + _o.setFlatEnabled(_oFlatEnabled); + float _oFlatUpperLegAngle = flatUpperLegAngle(); + _o.setFlatUpperLegAngle(_oFlatUpperLegAngle); + float _oFlatLowerLegAngle = flatLowerLegAngle(); + _o.setFlatLowerLegAngle(_oFlatLowerLegAngle); + float _oFlatFootAngle = flatFootAngle(); + _o.setFlatFootAngle(_oFlatFootAngle); + } + public static int pack(FlatBufferBuilder builder, StayAlignedSettingsT _o) { + if (_o == null) return 0; + return createStayAlignedSettings( + builder, + _o.getEnabled(), + _o.getExtraYawCorrection(), + _o.getHideYawCorrection(), + _o.getStandingEnabled(), + _o.getStandingUpperLegAngle(), + _o.getStandingLowerLegAngle(), + _o.getStandingFootAngle(), + _o.getSittingEnabled(), + _o.getSittingUpperLegAngle(), + _o.getSittingLowerLegAngle(), + _o.getSittingFootAngle(), + _o.getFlatEnabled(), + _o.getFlatUpperLegAngle(), + _o.getFlatLowerLegAngle(), + _o.getFlatFootAngle()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettingsT.java new file mode 100644 index 00000000..7b04bd1c --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/StayAlignedSettingsT.java @@ -0,0 +1,106 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class StayAlignedSettingsT { + private boolean enabled; + private boolean extraYawCorrection; + private boolean hideYawCorrection; + private boolean standingEnabled; + private float standingUpperLegAngle; + private float standingLowerLegAngle; + private float standingFootAngle; + private boolean sittingEnabled; + private float sittingUpperLegAngle; + private float sittingLowerLegAngle; + private float sittingFootAngle; + private boolean flatEnabled; + private float flatUpperLegAngle; + private float flatLowerLegAngle; + private float flatFootAngle; + + public boolean getEnabled() { return enabled; } + + public void setEnabled(boolean enabled) { this.enabled = enabled; } + + public boolean getExtraYawCorrection() { return extraYawCorrection; } + + public void setExtraYawCorrection(boolean extraYawCorrection) { this.extraYawCorrection = extraYawCorrection; } + + public boolean getHideYawCorrection() { return hideYawCorrection; } + + public void setHideYawCorrection(boolean hideYawCorrection) { this.hideYawCorrection = hideYawCorrection; } + + public boolean getStandingEnabled() { return standingEnabled; } + + public void setStandingEnabled(boolean standingEnabled) { this.standingEnabled = standingEnabled; } + + public float getStandingUpperLegAngle() { return standingUpperLegAngle; } + + public void setStandingUpperLegAngle(float standingUpperLegAngle) { this.standingUpperLegAngle = standingUpperLegAngle; } + + public float getStandingLowerLegAngle() { return standingLowerLegAngle; } + + public void setStandingLowerLegAngle(float standingLowerLegAngle) { this.standingLowerLegAngle = standingLowerLegAngle; } + + public float getStandingFootAngle() { return standingFootAngle; } + + public void setStandingFootAngle(float standingFootAngle) { this.standingFootAngle = standingFootAngle; } + + public boolean getSittingEnabled() { return sittingEnabled; } + + public void setSittingEnabled(boolean sittingEnabled) { this.sittingEnabled = sittingEnabled; } + + public float getSittingUpperLegAngle() { return sittingUpperLegAngle; } + + public void setSittingUpperLegAngle(float sittingUpperLegAngle) { this.sittingUpperLegAngle = sittingUpperLegAngle; } + + public float getSittingLowerLegAngle() { return sittingLowerLegAngle; } + + public void setSittingLowerLegAngle(float sittingLowerLegAngle) { this.sittingLowerLegAngle = sittingLowerLegAngle; } + + public float getSittingFootAngle() { return sittingFootAngle; } + + public void setSittingFootAngle(float sittingFootAngle) { this.sittingFootAngle = sittingFootAngle; } + + public boolean getFlatEnabled() { return flatEnabled; } + + public void setFlatEnabled(boolean flatEnabled) { this.flatEnabled = flatEnabled; } + + public float getFlatUpperLegAngle() { return flatUpperLegAngle; } + + public void setFlatUpperLegAngle(float flatUpperLegAngle) { this.flatUpperLegAngle = flatUpperLegAngle; } + + public float getFlatLowerLegAngle() { return flatLowerLegAngle; } + + public void setFlatLowerLegAngle(float flatLowerLegAngle) { this.flatLowerLegAngle = flatLowerLegAngle; } + + public float getFlatFootAngle() { return flatFootAngle; } + + public void setFlatFootAngle(float flatFootAngle) { this.flatFootAngle = flatFootAngle; } + + + public StayAlignedSettingsT() { + this.enabled = false; + this.extraYawCorrection = false; + this.hideYawCorrection = false; + this.standingEnabled = false; + this.standingUpperLegAngle = 0.0f; + this.standingLowerLegAngle = 0.0f; + this.standingFootAngle = 0.0f; + this.sittingEnabled = false; + this.sittingUpperLegAngle = 0.0f; + this.sittingLowerLegAngle = 0.0f; + this.sittingFootAngle = 0.0f; + this.flatEnabled = false; + this.flatUpperLegAngle = 0.0f; + this.flatLowerLegAngle = 0.0f; + this.flatFootAngle = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettings.java b/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettings.java deleted file mode 100644 index 81999bef..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettings.java +++ /dev/null @@ -1,63 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class YawCorrectionSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static YawCorrectionSettings getRootAsYawCorrectionSettings(ByteBuffer _bb) { return getRootAsYawCorrectionSettings(_bb, new YawCorrectionSettings()); } - public static YawCorrectionSettings getRootAsYawCorrectionSettings(ByteBuffer _bb, YawCorrectionSettings obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public YawCorrectionSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean enabled() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public float amountInDegPerSec() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createYawCorrectionSettings(FlatBufferBuilder builder, - boolean enabled, - float amountInDegPerSec) { - builder.startTable(2); - YawCorrectionSettings.addAmountInDegPerSec(builder, amountInDegPerSec); - YawCorrectionSettings.addEnabled(builder, enabled); - return YawCorrectionSettings.endYawCorrectionSettings(builder); - } - - public static void startYawCorrectionSettings(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addEnabled(FlatBufferBuilder builder, boolean enabled) { builder.addBoolean(0, enabled, false); } - public static void addAmountInDegPerSec(FlatBufferBuilder builder, float amountInDegPerSec) { builder.addFloat(1, amountInDegPerSec, 0.0f); } - public static int endYawCorrectionSettings(FlatBufferBuilder builder) { - int o = builder.endTable(); - return o; - } - - public static final class Vector extends BaseVector { - public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } - - public YawCorrectionSettings get(int j) { return get(new YawCorrectionSettings(), j); } - public YawCorrectionSettings get(YawCorrectionSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public YawCorrectionSettingsT unpack() { - YawCorrectionSettingsT _o = new YawCorrectionSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(YawCorrectionSettingsT _o) { - boolean _oEnabled = enabled(); - _o.setEnabled(_oEnabled); - float _oAmountInDegPerSec = amountInDegPerSec(); - _o.setAmountInDegPerSec(_oAmountInDegPerSec); - } - public static int pack(FlatBufferBuilder builder, YawCorrectionSettingsT _o) { - if (_o == null) return 0; - return createYawCorrectionSettings( - builder, - _o.getEnabled(), - _o.getAmountInDegPerSec()); - } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettingsT.java deleted file mode 100644 index 1adc1253..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/YawCorrectionSettingsT.java +++ /dev/null @@ -1,28 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class YawCorrectionSettingsT { - private boolean enabled; - private float amountInDegPerSec; - - public boolean getEnabled() { return enabled; } - - public void setEnabled(boolean enabled) { this.enabled = enabled; } - - public float getAmountInDegPerSec() { return amountInDegPerSec; } - - public void setAmountInDegPerSec(float amountInDegPerSec) { this.amountInDegPerSec = amountInDegPerSec; } - - - public YawCorrectionSettingsT() { - this.enabled = false; - this.amountInDegPerSec = 0.0f; - } -} - diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt index a6bd6b86..251deb95 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedConfig.kt @@ -52,6 +52,11 @@ class DataFeedConfig : Table() { val o = __offset(10) return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false } + val stayAlignedPoseMask : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -63,16 +68,17 @@ class DataFeedConfig : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createDataFeedConfig(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort, dataMaskOffset: Int, syntheticTrackersMaskOffset: Int, boneMask: Boolean) : Int { - builder.startTable(4) + fun createDataFeedConfig(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort, dataMaskOffset: Int, syntheticTrackersMaskOffset: Int, boneMask: Boolean, stayAlignedPoseMask: Boolean) : Int { + builder.startTable(5) addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset) addDataMask(builder, dataMaskOffset) addMinimumTimeSinceLast(builder, minimumTimeSinceLast) + addStayAlignedPoseMask(builder, stayAlignedPoseMask) addBoneMask(builder, boneMask) return endDataFeedConfig(builder) } @JvmStatic - fun startDataFeedConfig(builder: FlatBufferBuilder) = builder.startTable(4) + fun startDataFeedConfig(builder: FlatBufferBuilder) = builder.startTable(5) @JvmStatic fun addMinimumTimeSinceLast(builder: FlatBufferBuilder, minimumTimeSinceLast: UShort) = builder.addShort(0, minimumTimeSinceLast.toShort(), 0) @JvmStatic @@ -82,6 +88,8 @@ class DataFeedConfig : Table() { @JvmStatic fun addBoneMask(builder: FlatBufferBuilder, boneMask: Boolean) = builder.addBoolean(3, boneMask, false) @JvmStatic + fun addStayAlignedPoseMask(builder: FlatBufferBuilder, stayAlignedPoseMask: Boolean) = builder.addBoolean(4, stayAlignedPoseMask, false) + @JvmStatic fun endDataFeedConfig(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt index 20387c06..4777f3fc 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/DataFeedUpdate.kt @@ -67,6 +67,15 @@ class DataFeedUpdate : Table() { get() { val o = __offset(8); return if (o != 0) __vector_len(o) else 0 } + val stayAlignedPose : solarxr_protocol.data_feed.stay_aligned.StayAlignedPose? get() = stayAlignedPose(solarxr_protocol.data_feed.stay_aligned.StayAlignedPose()) + fun stayAlignedPose(obj: solarxr_protocol.data_feed.stay_aligned.StayAlignedPose) : solarxr_protocol.data_feed.stay_aligned.StayAlignedPose? { + val o = __offset(10) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -78,15 +87,16 @@ class DataFeedUpdate : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createDataFeedUpdate(builder: FlatBufferBuilder, devicesOffset: Int, syntheticTrackersOffset: Int, bonesOffset: Int) : Int { - builder.startTable(3) + fun createDataFeedUpdate(builder: FlatBufferBuilder, devicesOffset: Int, syntheticTrackersOffset: Int, bonesOffset: Int, stayAlignedPoseOffset: Int) : Int { + builder.startTable(4) + addStayAlignedPose(builder, stayAlignedPoseOffset) addBones(builder, bonesOffset) addSyntheticTrackers(builder, syntheticTrackersOffset) addDevices(builder, devicesOffset) return endDataFeedUpdate(builder) } @JvmStatic - fun startDataFeedUpdate(builder: FlatBufferBuilder) = builder.startTable(3) + fun startDataFeedUpdate(builder: FlatBufferBuilder) = builder.startTable(4) @JvmStatic fun addDevices(builder: FlatBufferBuilder, devices: Int) = builder.addOffset(0, devices, 0) @JvmStatic @@ -124,6 +134,8 @@ class DataFeedUpdate : Table() { @JvmStatic fun startBonesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) @JvmStatic + fun addStayAlignedPose(builder: FlatBufferBuilder, stayAlignedPose: Int) = builder.addOffset(3, stayAlignedPose, 0) + @JvmStatic fun endDataFeedUpdate(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.kt new file mode 100644 index 00000000..a872b30c --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedPose.kt @@ -0,0 +1,66 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StayAlignedPose : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StayAlignedPose { + __init(_i, _bb) + return this + } + val upperLegAngleInDeg : Float + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val lowerLegAngleInDeg : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val footAngleInDeg : Float + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStayAlignedPose(_bb: ByteBuffer): StayAlignedPose = getRootAsStayAlignedPose(_bb, StayAlignedPose()) + @JvmStatic + fun getRootAsStayAlignedPose(_bb: ByteBuffer, obj: StayAlignedPose): StayAlignedPose { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStayAlignedPose(builder: FlatBufferBuilder, upperLegAngleInDeg: Float, lowerLegAngleInDeg: Float, footAngleInDeg: Float) : Int { + builder.startTable(3) + addFootAngleInDeg(builder, footAngleInDeg) + addLowerLegAngleInDeg(builder, lowerLegAngleInDeg) + addUpperLegAngleInDeg(builder, upperLegAngleInDeg) + return endStayAlignedPose(builder) + } + @JvmStatic + fun startStayAlignedPose(builder: FlatBufferBuilder) = builder.startTable(3) + @JvmStatic + fun addUpperLegAngleInDeg(builder: FlatBufferBuilder, upperLegAngleInDeg: Float) = builder.addFloat(0, upperLegAngleInDeg, 0.0) + @JvmStatic + fun addLowerLegAngleInDeg(builder: FlatBufferBuilder, lowerLegAngleInDeg: Float) = builder.addFloat(1, lowerLegAngleInDeg, 0.0) + @JvmStatic + fun addFootAngleInDeg(builder: FlatBufferBuilder, footAngleInDeg: Float) = builder.addFloat(2, footAngleInDeg, 0.0) + @JvmStatic + fun endStayAlignedPose(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.kt new file mode 100644 index 00000000..3bb7e998 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/stay_aligned/StayAlignedTracker.kt @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.stay_aligned + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StayAlignedTracker : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StayAlignedTracker { + __init(_i, _bb) + return this + } + val yawCorrectionInDeg : Float + get() { + val o = __offset(4) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val lockedErrorInDeg : Float + get() { + val o = __offset(6) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val centerErrorInDeg : Float + get() { + val o = __offset(8) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val neighborErrorInDeg : Float + get() { + val o = __offset(10) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val locked : Boolean + get() { + val o = __offset(12) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStayAlignedTracker(_bb: ByteBuffer): StayAlignedTracker = getRootAsStayAlignedTracker(_bb, StayAlignedTracker()) + @JvmStatic + fun getRootAsStayAlignedTracker(_bb: ByteBuffer, obj: StayAlignedTracker): StayAlignedTracker { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStayAlignedTracker(builder: FlatBufferBuilder, yawCorrectionInDeg: Float, lockedErrorInDeg: Float, centerErrorInDeg: Float, neighborErrorInDeg: Float, locked: Boolean) : Int { + builder.startTable(5) + addNeighborErrorInDeg(builder, neighborErrorInDeg) + addCenterErrorInDeg(builder, centerErrorInDeg) + addLockedErrorInDeg(builder, lockedErrorInDeg) + addYawCorrectionInDeg(builder, yawCorrectionInDeg) + addLocked(builder, locked) + return endStayAlignedTracker(builder) + } + @JvmStatic + fun startStayAlignedTracker(builder: FlatBufferBuilder) = builder.startTable(5) + @JvmStatic + fun addYawCorrectionInDeg(builder: FlatBufferBuilder, yawCorrectionInDeg: Float) = builder.addFloat(0, yawCorrectionInDeg, 0.0) + @JvmStatic + fun addLockedErrorInDeg(builder: FlatBufferBuilder, lockedErrorInDeg: Float) = builder.addFloat(1, lockedErrorInDeg, 0.0) + @JvmStatic + fun addCenterErrorInDeg(builder: FlatBufferBuilder, centerErrorInDeg: Float) = builder.addFloat(2, centerErrorInDeg, 0.0) + @JvmStatic + fun addNeighborErrorInDeg(builder: FlatBufferBuilder, neighborErrorInDeg: Float) = builder.addFloat(3, neighborErrorInDeg, 0.0) + @JvmStatic + fun addLocked(builder: FlatBufferBuilder, locked: Boolean) = builder.addBoolean(4, locked, false) + @JvmStatic + fun endStayAlignedTracker(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt index 1aad8d36..0ce39fcb 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerData.kt @@ -160,6 +160,18 @@ class TrackerData : Table() { val o = __offset(26) return if(o != 0) bb.getShort(o + bb_pos).toUShort() else null } + /** + * Stay Aligned + */ + val stayAligned : solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker? get() = stayAligned(solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker()) + fun stayAligned(obj: solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker) : solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker? { + val o = __offset(28) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -171,7 +183,7 @@ class TrackerData : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun startTrackerData(builder: FlatBufferBuilder) = builder.startTable(12) + fun startTrackerData(builder: FlatBufferBuilder) = builder.startTable(13) @JvmStatic fun addTrackerId(builder: FlatBufferBuilder, trackerId: Int) = builder.addOffset(0, trackerId, 0) @JvmStatic @@ -197,6 +209,8 @@ class TrackerData : Table() { @JvmStatic fun addTps(builder: FlatBufferBuilder, tps: UShort) = builder.addShort(11, tps.toShort(), 0) @JvmStatic + fun addStayAligned(builder: FlatBufferBuilder, stayAligned: Int) = builder.addOffset(12, stayAligned, 0) + @JvmStatic fun endTrackerData(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt index 401615a4..9e762696 100644 --- a/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt +++ b/protocol/kotlin/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.kt @@ -74,6 +74,11 @@ class TrackerDataMask : Table() { val o = __offset(24) return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false } + val stayAligned : Boolean + get() { + val o = __offset(26) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -85,8 +90,9 @@ class TrackerDataMask : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createTrackerDataMask(builder: FlatBufferBuilder, info: Boolean, status: Boolean, rotation: Boolean, position: Boolean, rawAngularVelocity: Boolean, rawAcceleration: Boolean, temp: Boolean, linearAcceleration: Boolean, rotationReferenceAdjusted: Boolean, rotationIdentityAdjusted: Boolean, tps: Boolean) : Int { - builder.startTable(11) + fun createTrackerDataMask(builder: FlatBufferBuilder, info: Boolean, status: Boolean, rotation: Boolean, position: Boolean, rawAngularVelocity: Boolean, rawAcceleration: Boolean, temp: Boolean, linearAcceleration: Boolean, rotationReferenceAdjusted: Boolean, rotationIdentityAdjusted: Boolean, tps: Boolean, stayAligned: Boolean) : Int { + builder.startTable(12) + addStayAligned(builder, stayAligned) addTps(builder, tps) addRotationIdentityAdjusted(builder, rotationIdentityAdjusted) addRotationReferenceAdjusted(builder, rotationReferenceAdjusted) @@ -101,7 +107,7 @@ class TrackerDataMask : Table() { return endTrackerDataMask(builder) } @JvmStatic - fun startTrackerDataMask(builder: FlatBufferBuilder) = builder.startTable(11) + fun startTrackerDataMask(builder: FlatBufferBuilder) = builder.startTable(12) @JvmStatic fun addInfo(builder: FlatBufferBuilder, info: Boolean) = builder.addBoolean(0, info, false) @JvmStatic @@ -125,6 +131,8 @@ class TrackerDataMask : Table() { @JvmStatic fun addTps(builder: FlatBufferBuilder, tps: Boolean) = builder.addBoolean(10, tps, false) @JvmStatic + fun addStayAligned(builder: FlatBufferBuilder, stayAligned: Boolean) = builder.addBoolean(11, stayAligned, false) + @JvmStatic fun endTrackerDataMask(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt index 9ae2ce90..01b6c6e2 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt @@ -106,8 +106,8 @@ class ChangeSettingsRequest : Table() { null } } - val yawCorrectionSettings : solarxr_protocol.rpc.YawCorrectionSettings? get() = yawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettings()) - fun yawCorrectionSettings(obj: solarxr_protocol.rpc.YawCorrectionSettings) : solarxr_protocol.rpc.YawCorrectionSettings? { + val stayAligned : solarxr_protocol.rpc.StayAlignedSettings? get() = stayAligned(solarxr_protocol.rpc.StayAlignedSettings()) + fun stayAligned(obj: solarxr_protocol.rpc.StayAlignedSettings) : solarxr_protocol.rpc.StayAlignedSettings? { val o = __offset(24) return if (o != 0) { obj.__assign(__indirect(o + bb_pos), bb) @@ -126,9 +126,9 @@ class ChangeSettingsRequest : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, yawCorrectionSettingsOffset: Int) : Int { + fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int) : Int { builder.startTable(11) - addYawCorrectionSettings(builder, yawCorrectionSettingsOffset) + addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) addAutoBoneSettings(builder, autoBoneSettingsOffset) addTapDetectionSettings(builder, tapDetectionSettingsOffset) @@ -164,7 +164,7 @@ class ChangeSettingsRequest : Table() { @JvmStatic fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) @JvmStatic - fun addYawCorrectionSettings(builder: FlatBufferBuilder, yawCorrectionSettings: Int) = builder.addOffset(10, yawCorrectionSettings, 0) + fun addStayAligned(builder: FlatBufferBuilder, stayAligned: Int) = builder.addOffset(10, stayAligned, 0) @JvmStatic fun endChangeSettingsRequest(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.kt new file mode 100644 index 00000000..4e97bc86 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/DetectStayAlignedRelaxedPoseRequest.kt @@ -0,0 +1,50 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class DetectStayAlignedRelaxedPoseRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : DetectStayAlignedRelaxedPoseRequest { + __init(_i, _bb) + return this + } + val pose : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsDetectStayAlignedRelaxedPoseRequest(_bb: ByteBuffer): DetectStayAlignedRelaxedPoseRequest = getRootAsDetectStayAlignedRelaxedPoseRequest(_bb, DetectStayAlignedRelaxedPoseRequest()) + @JvmStatic + fun getRootAsDetectStayAlignedRelaxedPoseRequest(_bb: ByteBuffer, obj: DetectStayAlignedRelaxedPoseRequest): DetectStayAlignedRelaxedPoseRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createDetectStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder, pose: UByte) : Int { + builder.startTable(1) + addPose(builder, pose) + return endDetectStayAlignedRelaxedPoseRequest(builder) + } + @JvmStatic + fun startDetectStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addPose(builder: FlatBufferBuilder, pose: UByte) = builder.addByte(0, pose.toByte(), 0) + @JvmStatic + fun endDetectStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/EnableStayAlignedRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/EnableStayAlignedRequest.kt new file mode 100644 index 00000000..2edca81e --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/EnableStayAlignedRequest.kt @@ -0,0 +1,50 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class EnableStayAlignedRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : EnableStayAlignedRequest { + __init(_i, _bb) + return this + } + val enable : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsEnableStayAlignedRequest(_bb: ByteBuffer): EnableStayAlignedRequest = getRootAsEnableStayAlignedRequest(_bb, EnableStayAlignedRequest()) + @JvmStatic + fun getRootAsEnableStayAlignedRequest(_bb: ByteBuffer, obj: EnableStayAlignedRequest): EnableStayAlignedRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createEnableStayAlignedRequest(builder: FlatBufferBuilder, enable: Boolean) : Int { + builder.startTable(1) + addEnable(builder, enable) + return endEnableStayAlignedRequest(builder) + } + @JvmStatic + fun startEnableStayAlignedRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addEnable(builder: FlatBufferBuilder, enable: Boolean) = builder.addBoolean(0, enable, false) + @JvmStatic + fun endEnableStayAlignedRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.kt new file mode 100644 index 00000000..4f404e3b --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ResetStayAlignedRelaxedPoseRequest.kt @@ -0,0 +1,50 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ResetStayAlignedRelaxedPoseRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ResetStayAlignedRelaxedPoseRequest { + __init(_i, _bb) + return this + } + val pose : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsResetStayAlignedRelaxedPoseRequest(_bb: ByteBuffer): ResetStayAlignedRelaxedPoseRequest = getRootAsResetStayAlignedRelaxedPoseRequest(_bb, ResetStayAlignedRelaxedPoseRequest()) + @JvmStatic + fun getRootAsResetStayAlignedRelaxedPoseRequest(_bb: ByteBuffer, obj: ResetStayAlignedRelaxedPoseRequest): ResetStayAlignedRelaxedPoseRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createResetStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder, pose: UByte) : Int { + builder.startTable(1) + addPose(builder, pose) + return endResetStayAlignedRelaxedPoseRequest(builder) + } + @JvmStatic + fun startResetStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addPose(builder: FlatBufferBuilder, pose: UByte) = builder.addByte(0, pose.toByte(), 0) + @JvmStatic + fun endResetStayAlignedRelaxedPoseRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index 3ce22a90..7e531569 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -73,7 +73,10 @@ class RpcMessage private constructor() { const val RecordBVHStatusRequest: UByte = 65u const val VRCConfigStateRequest: UByte = 66u const val VRCConfigStateChangeResponse: UByte = 67u - val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse") + const val EnableStayAlignedRequest: UByte = 68u + const val DetectStayAlignedRelaxedPoseRequest: UByte = 69u + const val ResetStayAlignedRelaxedPoseRequest: UByte = 70u + val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt index 78ad8018..b20c86e0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt @@ -106,8 +106,8 @@ class SettingsResponse : Table() { null } } - val yawCorrectionSettings : solarxr_protocol.rpc.YawCorrectionSettings? get() = yawCorrectionSettings(solarxr_protocol.rpc.YawCorrectionSettings()) - fun yawCorrectionSettings(obj: solarxr_protocol.rpc.YawCorrectionSettings) : solarxr_protocol.rpc.YawCorrectionSettings? { + val stayAligned : solarxr_protocol.rpc.StayAlignedSettings? get() = stayAligned(solarxr_protocol.rpc.StayAlignedSettings()) + fun stayAligned(obj: solarxr_protocol.rpc.StayAlignedSettings) : solarxr_protocol.rpc.StayAlignedSettings? { val o = __offset(24) return if (o != 0) { obj.__assign(__indirect(o + bb_pos), bb) @@ -126,9 +126,9 @@ class SettingsResponse : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, yawCorrectionSettingsOffset: Int) : Int { + fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int) : Int { builder.startTable(11) - addYawCorrectionSettings(builder, yawCorrectionSettingsOffset) + addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) addAutoBoneSettings(builder, autoBoneSettingsOffset) addTapDetectionSettings(builder, tapDetectionSettingsOffset) @@ -164,7 +164,7 @@ class SettingsResponse : Table() { @JvmStatic fun addResetsSettings(builder: FlatBufferBuilder, resetsSettings: Int) = builder.addOffset(9, resetsSettings, 0) @JvmStatic - fun addYawCorrectionSettings(builder: FlatBufferBuilder, yawCorrectionSettings: Int) = builder.addOffset(10, yawCorrectionSettings, 0) + fun addStayAligned(builder: FlatBufferBuilder, stayAligned: Int) = builder.addOffset(10, stayAligned, 0) @JvmStatic fun endSettingsResponse(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.kt new file mode 100644 index 00000000..31dd3508 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedRelaxedPose.kt @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class StayAlignedRelaxedPose private constructor() { + companion object { + const val STANDING: UByte = 0u + const val SITTING: UByte = 1u + const val FLAT: UByte = 2u + val names : Array = arrayOf("STANDING", "SITTING", "FLAT") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedSettings.kt new file mode 100644 index 00000000..655af8f5 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/StayAlignedSettings.kt @@ -0,0 +1,162 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class StayAlignedSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : StayAlignedSettings { + __init(_i, _bb) + return this + } + val enabled : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val extraYawCorrection : Boolean + get() { + val o = __offset(6) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val hideYawCorrection : Boolean + get() { + val o = __offset(8) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val standingEnabled : Boolean + get() { + val o = __offset(10) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val standingUpperLegAngle : Float + get() { + val o = __offset(12) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val standingLowerLegAngle : Float + get() { + val o = __offset(14) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val standingFootAngle : Float + get() { + val o = __offset(16) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val sittingEnabled : Boolean + get() { + val o = __offset(18) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val sittingUpperLegAngle : Float + get() { + val o = __offset(20) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val sittingLowerLegAngle : Float + get() { + val o = __offset(22) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val sittingFootAngle : Float + get() { + val o = __offset(24) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val flatEnabled : Boolean + get() { + val o = __offset(26) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + val flatUpperLegAngle : Float + get() { + val o = __offset(28) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val flatLowerLegAngle : Float + get() { + val o = __offset(30) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + val flatFootAngle : Float + get() { + val o = __offset(32) + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsStayAlignedSettings(_bb: ByteBuffer): StayAlignedSettings = getRootAsStayAlignedSettings(_bb, StayAlignedSettings()) + @JvmStatic + fun getRootAsStayAlignedSettings(_bb: ByteBuffer, obj: StayAlignedSettings): StayAlignedSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createStayAlignedSettings(builder: FlatBufferBuilder, enabled: Boolean, extraYawCorrection: Boolean, hideYawCorrection: Boolean, standingEnabled: Boolean, standingUpperLegAngle: Float, standingLowerLegAngle: Float, standingFootAngle: Float, sittingEnabled: Boolean, sittingUpperLegAngle: Float, sittingLowerLegAngle: Float, sittingFootAngle: Float, flatEnabled: Boolean, flatUpperLegAngle: Float, flatLowerLegAngle: Float, flatFootAngle: Float) : Int { + builder.startTable(15) + addFlatFootAngle(builder, flatFootAngle) + addFlatLowerLegAngle(builder, flatLowerLegAngle) + addFlatUpperLegAngle(builder, flatUpperLegAngle) + addSittingFootAngle(builder, sittingFootAngle) + addSittingLowerLegAngle(builder, sittingLowerLegAngle) + addSittingUpperLegAngle(builder, sittingUpperLegAngle) + addStandingFootAngle(builder, standingFootAngle) + addStandingLowerLegAngle(builder, standingLowerLegAngle) + addStandingUpperLegAngle(builder, standingUpperLegAngle) + addFlatEnabled(builder, flatEnabled) + addSittingEnabled(builder, sittingEnabled) + addStandingEnabled(builder, standingEnabled) + addHideYawCorrection(builder, hideYawCorrection) + addExtraYawCorrection(builder, extraYawCorrection) + addEnabled(builder, enabled) + return endStayAlignedSettings(builder) + } + @JvmStatic + fun startStayAlignedSettings(builder: FlatBufferBuilder) = builder.startTable(15) + @JvmStatic + fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) + @JvmStatic + fun addExtraYawCorrection(builder: FlatBufferBuilder, extraYawCorrection: Boolean) = builder.addBoolean(1, extraYawCorrection, false) + @JvmStatic + fun addHideYawCorrection(builder: FlatBufferBuilder, hideYawCorrection: Boolean) = builder.addBoolean(2, hideYawCorrection, false) + @JvmStatic + fun addStandingEnabled(builder: FlatBufferBuilder, standingEnabled: Boolean) = builder.addBoolean(3, standingEnabled, false) + @JvmStatic + fun addStandingUpperLegAngle(builder: FlatBufferBuilder, standingUpperLegAngle: Float) = builder.addFloat(4, standingUpperLegAngle, 0.0) + @JvmStatic + fun addStandingLowerLegAngle(builder: FlatBufferBuilder, standingLowerLegAngle: Float) = builder.addFloat(5, standingLowerLegAngle, 0.0) + @JvmStatic + fun addStandingFootAngle(builder: FlatBufferBuilder, standingFootAngle: Float) = builder.addFloat(6, standingFootAngle, 0.0) + @JvmStatic + fun addSittingEnabled(builder: FlatBufferBuilder, sittingEnabled: Boolean) = builder.addBoolean(7, sittingEnabled, false) + @JvmStatic + fun addSittingUpperLegAngle(builder: FlatBufferBuilder, sittingUpperLegAngle: Float) = builder.addFloat(8, sittingUpperLegAngle, 0.0) + @JvmStatic + fun addSittingLowerLegAngle(builder: FlatBufferBuilder, sittingLowerLegAngle: Float) = builder.addFloat(9, sittingLowerLegAngle, 0.0) + @JvmStatic + fun addSittingFootAngle(builder: FlatBufferBuilder, sittingFootAngle: Float) = builder.addFloat(10, sittingFootAngle, 0.0) + @JvmStatic + fun addFlatEnabled(builder: FlatBufferBuilder, flatEnabled: Boolean) = builder.addBoolean(11, flatEnabled, false) + @JvmStatic + fun addFlatUpperLegAngle(builder: FlatBufferBuilder, flatUpperLegAngle: Float) = builder.addFloat(12, flatUpperLegAngle, 0.0) + @JvmStatic + fun addFlatLowerLegAngle(builder: FlatBufferBuilder, flatLowerLegAngle: Float) = builder.addFloat(13, flatLowerLegAngle, 0.0) + @JvmStatic + fun addFlatFootAngle(builder: FlatBufferBuilder, flatFootAngle: Float) = builder.addFloat(14, flatFootAngle, 0.0) + @JvmStatic + fun endStayAlignedSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/YawCorrectionSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/YawCorrectionSettings.kt deleted file mode 100644 index 5064cb19..00000000 --- a/protocol/kotlin/src/solarxr_protocol/rpc/YawCorrectionSettings.kt +++ /dev/null @@ -1,58 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -import java.nio.* -import kotlin.math.sign -import com.google.flatbuffers.* - -@Suppress("unused") -class YawCorrectionSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : YawCorrectionSettings { - __init(_i, _bb) - return this - } - val enabled : Boolean - get() { - val o = __offset(4) - return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false - } - val amountInDegPerSec : Float - get() { - val o = __offset(6) - return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsYawCorrectionSettings(_bb: ByteBuffer): YawCorrectionSettings = getRootAsYawCorrectionSettings(_bb, YawCorrectionSettings()) - @JvmStatic - fun getRootAsYawCorrectionSettings(_bb: ByteBuffer, obj: YawCorrectionSettings): YawCorrectionSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createYawCorrectionSettings(builder: FlatBufferBuilder, enabled: Boolean, amountInDegPerSec: Float) : Int { - builder.startTable(2) - addAmountInDegPerSec(builder, amountInDegPerSec) - addEnabled(builder, enabled) - return endYawCorrectionSettings(builder) - } - @JvmStatic - fun startYawCorrectionSettings(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addEnabled(builder: FlatBufferBuilder, enabled: Boolean) = builder.addBoolean(0, enabled, false) - @JvmStatic - fun addAmountInDegPerSec(builder: FlatBufferBuilder, amountInDegPerSec: Float) = builder.addFloat(1, amountInDegPerSec, 0.0) - @JvmStatic - fun endYawCorrectionSettings(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 789869b4..311357c6 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -11,6 +11,13 @@ pub mod solarxr_protocol { mod device_data_generated; pub use self::device_data_generated::*; } // device_data + pub mod stay_aligned { + use super::*; + mod stay_aligned_pose_generated; + pub use self::stay_aligned_pose_generated::*; + mod stay_aligned_tracker_generated; + pub use self::stay_aligned_tracker_generated::*; + } // stay_aligned pub mod tracker { use super::*; mod tracker_data_generated; @@ -166,6 +173,8 @@ pub mod solarxr_protocol { pub use self::vrcspine_mode_generated::*; mod vrcavatar_measurement_type_generated; pub use self::vrcavatar_measurement_type_generated::*; + mod stay_aligned_relaxed_pose_generated; + pub use self::stay_aligned_relaxed_pose_generated::*; mod rpc_message_header_generated; pub use self::rpc_message_header_generated::*; mod heartbeat_request_generated; @@ -206,8 +215,8 @@ pub mod solarxr_protocol { pub use self::tap_detection_settings_generated::*; mod resets_settings_generated; pub use self::resets_settings_generated::*; - mod yaw_correction_settings_generated; - pub use self::yaw_correction_settings_generated::*; + mod stay_aligned_settings_generated; + pub use self::stay_aligned_settings_generated::*; mod tap_detection_setup_notification_generated; pub use self::tap_detection_setup_notification_generated::*; mod record_bvhrequest_generated; @@ -354,6 +363,12 @@ pub mod solarxr_protocol { pub use self::vrcconfig_state_request_generated::*; mod vrcconfig_state_change_response_generated; pub use self::vrcconfig_state_change_response_generated::*; + mod enable_stay_aligned_request_generated; + pub use self::enable_stay_aligned_request_generated::*; + mod detect_stay_aligned_relaxed_pose_request_generated; + pub use self::detect_stay_aligned_relaxed_pose_request_generated::*; + mod reset_stay_aligned_relaxed_pose_request_generated; + pub use self::reset_stay_aligned_relaxed_pose_request_generated::*; } // rpc mod message_bundle_generated; pub use self::message_bundle_generated::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs index 2ae303e2..99333b6f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs @@ -31,6 +31,7 @@ impl<'a> DataFeedConfig<'a> { pub const VT_DATA_MASK: flatbuffers::VOffsetT = 6; pub const VT_SYNTHETIC_TRACKERS_MASK: flatbuffers::VOffsetT = 8; pub const VT_BONE_MASK: flatbuffers::VOffsetT = 10; + pub const VT_STAY_ALIGNED_POSE_MASK: flatbuffers::VOffsetT = 12; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -45,6 +46,7 @@ impl<'a> DataFeedConfig<'a> { if let Some(x) = args.synthetic_trackers_mask { builder.add_synthetic_trackers_mask(x); } if let Some(x) = args.data_mask { builder.add_data_mask(x); } builder.add_minimum_time_since_last(args.minimum_time_since_last); + builder.add_stay_aligned_pose_mask(args.stay_aligned_pose_mask); builder.add_bone_mask(args.bone_mask); builder.finish() } @@ -80,6 +82,13 @@ impl<'a> DataFeedConfig<'a> { // which contains a valid value in this slot unsafe { self._tab.get::(DataFeedConfig::VT_BONE_MASK, Some(false)).unwrap()} } + #[inline] + pub fn stay_aligned_pose_mask(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DataFeedConfig::VT_STAY_ALIGNED_POSE_MASK, Some(false)).unwrap()} + } } impl flatbuffers::Verifiable for DataFeedConfig<'_> { @@ -93,6 +102,7 @@ impl flatbuffers::Verifiable for DataFeedConfig<'_> { .visit_field::>("data_mask", Self::VT_DATA_MASK, false)? .visit_field::>("synthetic_trackers_mask", Self::VT_SYNTHETIC_TRACKERS_MASK, false)? .visit_field::("bone_mask", Self::VT_BONE_MASK, false)? + .visit_field::("stay_aligned_pose_mask", Self::VT_STAY_ALIGNED_POSE_MASK, false)? .finish(); Ok(()) } @@ -102,6 +112,7 @@ pub struct DataFeedConfigArgs<'a> { pub data_mask: Option>>, pub synthetic_trackers_mask: Option>>, pub bone_mask: bool, + pub stay_aligned_pose_mask: bool, } impl<'a> Default for DataFeedConfigArgs<'a> { #[inline] @@ -111,6 +122,7 @@ impl<'a> Default for DataFeedConfigArgs<'a> { data_mask: None, synthetic_trackers_mask: None, bone_mask: false, + stay_aligned_pose_mask: false, } } } @@ -137,6 +149,10 @@ impl<'a: 'b, 'b> DataFeedConfigBuilder<'a, 'b> { self.fbb_.push_slot::(DataFeedConfig::VT_BONE_MASK, bone_mask, false); } #[inline] + pub fn add_stay_aligned_pose_mask(&mut self, stay_aligned_pose_mask: bool) { + self.fbb_.push_slot::(DataFeedConfig::VT_STAY_ALIGNED_POSE_MASK, stay_aligned_pose_mask, false); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedConfigBuilder<'a, 'b> { let start = _fbb.start_table(); DataFeedConfigBuilder { @@ -158,6 +174,7 @@ impl core::fmt::Debug for DataFeedConfig<'_> { ds.field("data_mask", &self.data_mask()); ds.field("synthetic_trackers_mask", &self.synthetic_trackers_mask()); ds.field("bone_mask", &self.bone_mask()); + ds.field("stay_aligned_pose_mask", &self.stay_aligned_pose_mask()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs index 03e1bdf7..aeff3eae 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs @@ -35,6 +35,7 @@ impl<'a> DataFeedUpdate<'a> { pub const VT_DEVICES: flatbuffers::VOffsetT = 4; pub const VT_SYNTHETIC_TRACKERS: flatbuffers::VOffsetT = 6; pub const VT_BONES: flatbuffers::VOffsetT = 8; + pub const VT_STAY_ALIGNED_POSE: flatbuffers::VOffsetT = 10; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -46,6 +47,7 @@ impl<'a> DataFeedUpdate<'a> { args: &'args DataFeedUpdateArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = DataFeedUpdateBuilder::new(_fbb); + if let Some(x) = args.stay_aligned_pose { builder.add_stay_aligned_pose(x); } if let Some(x) = args.bones { builder.add_bones(x); } if let Some(x) = args.synthetic_trackers { builder.add_synthetic_trackers(x); } if let Some(x) = args.devices { builder.add_devices(x); } @@ -75,6 +77,13 @@ impl<'a> DataFeedUpdate<'a> { // which contains a valid value in this slot unsafe { self._tab.get::>>>(DataFeedUpdate::VT_BONES, None)} } + #[inline] + pub fn stay_aligned_pose(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(DataFeedUpdate::VT_STAY_ALIGNED_POSE, None)} + } } impl flatbuffers::Verifiable for DataFeedUpdate<'_> { @@ -87,6 +96,7 @@ impl flatbuffers::Verifiable for DataFeedUpdate<'_> { .visit_field::>>>("devices", Self::VT_DEVICES, false)? .visit_field::>>>("synthetic_trackers", Self::VT_SYNTHETIC_TRACKERS, false)? .visit_field::>>>("bones", Self::VT_BONES, false)? + .visit_field::>("stay_aligned_pose", Self::VT_STAY_ALIGNED_POSE, false)? .finish(); Ok(()) } @@ -95,6 +105,7 @@ pub struct DataFeedUpdateArgs<'a> { pub devices: Option>>>>, pub synthetic_trackers: Option>>>>, pub bones: Option>>>>, + pub stay_aligned_pose: Option>>, } impl<'a> Default for DataFeedUpdateArgs<'a> { #[inline] @@ -103,6 +114,7 @@ impl<'a> Default for DataFeedUpdateArgs<'a> { devices: None, synthetic_trackers: None, bones: None, + stay_aligned_pose: None, } } } @@ -125,6 +137,10 @@ impl<'a: 'b, 'b> DataFeedUpdateBuilder<'a, 'b> { self.fbb_.push_slot_always::>(DataFeedUpdate::VT_BONES, bones); } #[inline] + pub fn add_stay_aligned_pose(&mut self, stay_aligned_pose: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DataFeedUpdate::VT_STAY_ALIGNED_POSE, stay_aligned_pose); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedUpdateBuilder<'a, 'b> { let start = _fbb.start_table(); DataFeedUpdateBuilder { @@ -145,6 +161,7 @@ impl core::fmt::Debug for DataFeedUpdate<'_> { ds.field("devices", &self.devices()); ds.field("synthetic_trackers", &self.synthetic_trackers()); ds.field("bones", &self.bones()); + ds.field("stay_aligned_pose", &self.stay_aligned_pose()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_pose_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_pose_generated.rs new file mode 100644 index 00000000..639e73bc --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_pose_generated.rs @@ -0,0 +1,142 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StayAlignedPoseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StayAlignedPose<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StayAlignedPose<'a> { + type Inner = StayAlignedPose<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StayAlignedPose<'a> { + pub const VT_UPPER_LEG_ANGLE_IN_DEG: flatbuffers::VOffsetT = 4; + pub const VT_LOWER_LEG_ANGLE_IN_DEG: flatbuffers::VOffsetT = 6; + pub const VT_FOOT_ANGLE_IN_DEG: flatbuffers::VOffsetT = 8; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StayAlignedPose { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StayAlignedPoseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StayAlignedPoseBuilder::new(_fbb); + builder.add_foot_angle_in_deg(args.foot_angle_in_deg); + builder.add_lower_leg_angle_in_deg(args.lower_leg_angle_in_deg); + builder.add_upper_leg_angle_in_deg(args.upper_leg_angle_in_deg); + builder.finish() + } + + + #[inline] + pub fn upper_leg_angle_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedPose::VT_UPPER_LEG_ANGLE_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn lower_leg_angle_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedPose::VT_LOWER_LEG_ANGLE_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn foot_angle_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedPose::VT_FOOT_ANGLE_IN_DEG, Some(0.0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for StayAlignedPose<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("upper_leg_angle_in_deg", Self::VT_UPPER_LEG_ANGLE_IN_DEG, false)? + .visit_field::("lower_leg_angle_in_deg", Self::VT_LOWER_LEG_ANGLE_IN_DEG, false)? + .visit_field::("foot_angle_in_deg", Self::VT_FOOT_ANGLE_IN_DEG, false)? + .finish(); + Ok(()) + } +} +pub struct StayAlignedPoseArgs { + pub upper_leg_angle_in_deg: f32, + pub lower_leg_angle_in_deg: f32, + pub foot_angle_in_deg: f32, +} +impl<'a> Default for StayAlignedPoseArgs { + #[inline] + fn default() -> Self { + StayAlignedPoseArgs { + upper_leg_angle_in_deg: 0.0, + lower_leg_angle_in_deg: 0.0, + foot_angle_in_deg: 0.0, + } + } +} + +pub struct StayAlignedPoseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StayAlignedPoseBuilder<'a, 'b> { + #[inline] + pub fn add_upper_leg_angle_in_deg(&mut self, upper_leg_angle_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedPose::VT_UPPER_LEG_ANGLE_IN_DEG, upper_leg_angle_in_deg, 0.0); + } + #[inline] + pub fn add_lower_leg_angle_in_deg(&mut self, lower_leg_angle_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedPose::VT_LOWER_LEG_ANGLE_IN_DEG, lower_leg_angle_in_deg, 0.0); + } + #[inline] + pub fn add_foot_angle_in_deg(&mut self, foot_angle_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedPose::VT_FOOT_ANGLE_IN_DEG, foot_angle_in_deg, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StayAlignedPoseBuilder<'a, 'b> { + let start = _fbb.start_table(); + StayAlignedPoseBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for StayAlignedPose<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StayAlignedPose"); + ds.field("upper_leg_angle_in_deg", &self.upper_leg_angle_in_deg()); + ds.field("lower_leg_angle_in_deg", &self.lower_leg_angle_in_deg()); + ds.field("foot_angle_in_deg", &self.foot_angle_in_deg()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_tracker_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_tracker_generated.rs new file mode 100644 index 00000000..ce70c51c --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/stay_aligned/stay_aligned_tracker_generated.rs @@ -0,0 +1,176 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StayAlignedTrackerOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StayAlignedTracker<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StayAlignedTracker<'a> { + type Inner = StayAlignedTracker<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StayAlignedTracker<'a> { + pub const VT_YAW_CORRECTION_IN_DEG: flatbuffers::VOffsetT = 4; + pub const VT_LOCKED_ERROR_IN_DEG: flatbuffers::VOffsetT = 6; + pub const VT_CENTER_ERROR_IN_DEG: flatbuffers::VOffsetT = 8; + pub const VT_NEIGHBOR_ERROR_IN_DEG: flatbuffers::VOffsetT = 10; + pub const VT_LOCKED: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StayAlignedTracker { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StayAlignedTrackerArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StayAlignedTrackerBuilder::new(_fbb); + builder.add_neighbor_error_in_deg(args.neighbor_error_in_deg); + builder.add_center_error_in_deg(args.center_error_in_deg); + builder.add_locked_error_in_deg(args.locked_error_in_deg); + builder.add_yaw_correction_in_deg(args.yaw_correction_in_deg); + builder.add_locked(args.locked); + builder.finish() + } + + + #[inline] + pub fn yaw_correction_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedTracker::VT_YAW_CORRECTION_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn locked_error_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedTracker::VT_LOCKED_ERROR_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn center_error_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedTracker::VT_CENTER_ERROR_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn neighbor_error_in_deg(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedTracker::VT_NEIGHBOR_ERROR_IN_DEG, Some(0.0)).unwrap()} + } + #[inline] + pub fn locked(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedTracker::VT_LOCKED, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for StayAlignedTracker<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("yaw_correction_in_deg", Self::VT_YAW_CORRECTION_IN_DEG, false)? + .visit_field::("locked_error_in_deg", Self::VT_LOCKED_ERROR_IN_DEG, false)? + .visit_field::("center_error_in_deg", Self::VT_CENTER_ERROR_IN_DEG, false)? + .visit_field::("neighbor_error_in_deg", Self::VT_NEIGHBOR_ERROR_IN_DEG, false)? + .visit_field::("locked", Self::VT_LOCKED, false)? + .finish(); + Ok(()) + } +} +pub struct StayAlignedTrackerArgs { + pub yaw_correction_in_deg: f32, + pub locked_error_in_deg: f32, + pub center_error_in_deg: f32, + pub neighbor_error_in_deg: f32, + pub locked: bool, +} +impl<'a> Default for StayAlignedTrackerArgs { + #[inline] + fn default() -> Self { + StayAlignedTrackerArgs { + yaw_correction_in_deg: 0.0, + locked_error_in_deg: 0.0, + center_error_in_deg: 0.0, + neighbor_error_in_deg: 0.0, + locked: false, + } + } +} + +pub struct StayAlignedTrackerBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StayAlignedTrackerBuilder<'a, 'b> { + #[inline] + pub fn add_yaw_correction_in_deg(&mut self, yaw_correction_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedTracker::VT_YAW_CORRECTION_IN_DEG, yaw_correction_in_deg, 0.0); + } + #[inline] + pub fn add_locked_error_in_deg(&mut self, locked_error_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedTracker::VT_LOCKED_ERROR_IN_DEG, locked_error_in_deg, 0.0); + } + #[inline] + pub fn add_center_error_in_deg(&mut self, center_error_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedTracker::VT_CENTER_ERROR_IN_DEG, center_error_in_deg, 0.0); + } + #[inline] + pub fn add_neighbor_error_in_deg(&mut self, neighbor_error_in_deg: f32) { + self.fbb_.push_slot::(StayAlignedTracker::VT_NEIGHBOR_ERROR_IN_DEG, neighbor_error_in_deg, 0.0); + } + #[inline] + pub fn add_locked(&mut self, locked: bool) { + self.fbb_.push_slot::(StayAlignedTracker::VT_LOCKED, locked, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StayAlignedTrackerBuilder<'a, 'b> { + let start = _fbb.start_table(); + StayAlignedTrackerBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for StayAlignedTracker<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StayAlignedTracker"); + ds.field("yaw_correction_in_deg", &self.yaw_correction_in_deg()); + ds.field("locked_error_in_deg", &self.locked_error_in_deg()); + ds.field("center_error_in_deg", &self.center_error_in_deg()); + ds.field("neighbor_error_in_deg", &self.neighbor_error_in_deg()); + ds.field("locked", &self.locked()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs index 1db1b960..b9576916 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs @@ -42,6 +42,7 @@ impl<'a> TrackerData<'a> { pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 22; pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 24; pub const VT_TPS: flatbuffers::VOffsetT = 26; + pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 28; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -53,6 +54,7 @@ impl<'a> TrackerData<'a> { args: &'args TrackerDataArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TrackerDataBuilder::new(_fbb); + if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.rotation_identity_adjusted { builder.add_rotation_identity_adjusted(x); } if let Some(x) = args.rotation_reference_adjusted { builder.add_rotation_reference_adjusted(x); } if let Some(x) = args.linear_acceleration { builder.add_linear_acceleration(x); } @@ -172,6 +174,14 @@ impl<'a> TrackerData<'a> { // which contains a valid value in this slot unsafe { self._tab.get::(TrackerData::VT_TPS, None)} } + /// Stay Aligned + #[inline] + pub fn stay_aligned(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TrackerData::VT_STAY_ALIGNED, None)} + } } impl flatbuffers::Verifiable for TrackerData<'_> { @@ -193,6 +203,7 @@ impl flatbuffers::Verifiable for TrackerData<'_> { .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? .visit_field::("tps", Self::VT_TPS, false)? + .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .finish(); Ok(()) } @@ -210,6 +221,7 @@ pub struct TrackerDataArgs<'a> { pub rotation_reference_adjusted: Option<&'a super::super::datatypes::math::Quat>, pub rotation_identity_adjusted: Option<&'a super::super::datatypes::math::Quat>, pub tps: Option, + pub stay_aligned: Option>>, } impl<'a> Default for TrackerDataArgs<'a> { #[inline] @@ -227,6 +239,7 @@ impl<'a> Default for TrackerDataArgs<'a> { rotation_reference_adjusted: None, rotation_identity_adjusted: None, tps: None, + stay_aligned: None, } } } @@ -285,6 +298,10 @@ impl<'a: 'b, 'b> TrackerDataBuilder<'a, 'b> { self.fbb_.push_slot_always::(TrackerData::VT_TPS, tps); } #[inline] + pub fn add_stay_aligned(&mut self, stay_aligned: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TrackerData::VT_STAY_ALIGNED, stay_aligned); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataBuilder<'a, 'b> { let start = _fbb.start_table(); TrackerDataBuilder { @@ -314,6 +331,7 @@ impl core::fmt::Debug for TrackerData<'_> { ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); ds.field("tps", &self.tps()); + ds.field("stay_aligned", &self.stay_aligned()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs index 7d2b251f..7f95c83a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs @@ -37,6 +37,7 @@ impl<'a> TrackerDataMask<'a> { pub const VT_ROTATION_REFERENCE_ADJUSTED: flatbuffers::VOffsetT = 20; pub const VT_ROTATION_IDENTITY_ADJUSTED: flatbuffers::VOffsetT = 22; pub const VT_TPS: flatbuffers::VOffsetT = 24; + pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 26; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -48,6 +49,7 @@ impl<'a> TrackerDataMask<'a> { args: &'args TrackerDataMaskArgs ) -> flatbuffers::WIPOffset> { let mut builder = TrackerDataMaskBuilder::new(_fbb); + builder.add_stay_aligned(args.stay_aligned); builder.add_tps(args.tps); builder.add_rotation_identity_adjusted(args.rotation_identity_adjusted); builder.add_rotation_reference_adjusted(args.rotation_reference_adjusted); @@ -140,6 +142,13 @@ impl<'a> TrackerDataMask<'a> { // which contains a valid value in this slot unsafe { self._tab.get::(TrackerDataMask::VT_TPS, Some(false)).unwrap()} } + #[inline] + pub fn stay_aligned(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackerDataMask::VT_STAY_ALIGNED, Some(false)).unwrap()} + } } impl flatbuffers::Verifiable for TrackerDataMask<'_> { @@ -160,6 +169,7 @@ impl flatbuffers::Verifiable for TrackerDataMask<'_> { .visit_field::("rotation_reference_adjusted", Self::VT_ROTATION_REFERENCE_ADJUSTED, false)? .visit_field::("rotation_identity_adjusted", Self::VT_ROTATION_IDENTITY_ADJUSTED, false)? .visit_field::("tps", Self::VT_TPS, false)? + .visit_field::("stay_aligned", Self::VT_STAY_ALIGNED, false)? .finish(); Ok(()) } @@ -176,6 +186,7 @@ pub struct TrackerDataMaskArgs { pub rotation_reference_adjusted: bool, pub rotation_identity_adjusted: bool, pub tps: bool, + pub stay_aligned: bool, } impl<'a> Default for TrackerDataMaskArgs { #[inline] @@ -192,6 +203,7 @@ impl<'a> Default for TrackerDataMaskArgs { rotation_reference_adjusted: false, rotation_identity_adjusted: false, tps: false, + stay_aligned: false, } } } @@ -246,6 +258,10 @@ impl<'a: 'b, 'b> TrackerDataMaskBuilder<'a, 'b> { self.fbb_.push_slot::(TrackerDataMask::VT_TPS, tps, false); } #[inline] + pub fn add_stay_aligned(&mut self, stay_aligned: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_STAY_ALIGNED, stay_aligned, false); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataMaskBuilder<'a, 'b> { let start = _fbb.start_table(); TrackerDataMaskBuilder { @@ -274,6 +290,7 @@ impl core::fmt::Debug for TrackerDataMask<'_> { ds.field("rotation_reference_adjusted", &self.rotation_reference_adjusted()); ds.field("rotation_identity_adjusted", &self.rotation_identity_adjusted()); ds.field("tps", &self.tps()); + ds.field("stay_aligned", &self.stay_aligned()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs index 3d50858d..a2b65df0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs @@ -35,7 +35,7 @@ impl<'a> ChangeSettingsRequest<'a> { pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; - pub const VT_YAW_CORRECTION_SETTINGS: flatbuffers::VOffsetT = 24; + pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -47,7 +47,7 @@ impl<'a> ChangeSettingsRequest<'a> { args: &'args ChangeSettingsRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ChangeSettingsRequestBuilder::new(_fbb); - if let Some(x) = args.yaw_correction_settings { builder.add_yaw_correction_settings(x); } + if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } @@ -133,11 +133,11 @@ impl<'a> ChangeSettingsRequest<'a> { unsafe { self._tab.get::>(ChangeSettingsRequest::VT_RESETS_SETTINGS, None)} } #[inline] - pub fn yaw_correction_settings(&self) -> Option> { + pub fn stay_aligned(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_YAW_CORRECTION_SETTINGS, None)} + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_STAY_ALIGNED, None)} } } @@ -158,7 +158,7 @@ impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? - .visit_field::>("yaw_correction_settings", Self::VT_YAW_CORRECTION_SETTINGS, false)? + .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .finish(); Ok(()) } @@ -174,7 +174,7 @@ pub struct ChangeSettingsRequestArgs<'a> { pub tap_detection_settings: Option>>, pub auto_bone_settings: Option>>, pub resets_settings: Option>>, - pub yaw_correction_settings: Option>>, + pub stay_aligned: Option>>, } impl<'a> Default for ChangeSettingsRequestArgs<'a> { #[inline] @@ -190,7 +190,7 @@ impl<'a> Default for ChangeSettingsRequestArgs<'a> { tap_detection_settings: None, auto_bone_settings: None, resets_settings: None, - yaw_correction_settings: None, + stay_aligned: None, } } } @@ -241,8 +241,8 @@ impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_RESETS_SETTINGS, resets_settings); } #[inline] - pub fn add_yaw_correction_settings(&mut self, yaw_correction_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_YAW_CORRECTION_SETTINGS, yaw_correction_settings); + pub fn add_stay_aligned(&mut self, stay_aligned: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_STAY_ALIGNED, stay_aligned); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSettingsRequestBuilder<'a, 'b> { @@ -272,7 +272,7 @@ impl core::fmt::Debug for ChangeSettingsRequest<'_> { ds.field("tap_detection_settings", &self.tap_detection_settings()); ds.field("auto_bone_settings", &self.auto_bone_settings()); ds.field("resets_settings", &self.resets_settings()); - ds.field("yaw_correction_settings", &self.yaw_correction_settings()); + ds.field("stay_aligned", &self.stay_aligned()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/detect_stay_aligned_relaxed_pose_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/detect_stay_aligned_relaxed_pose_request_generated.rs new file mode 100644 index 00000000..8ef3d6fc --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/detect_stay_aligned_relaxed_pose_request_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DetectStayAlignedRelaxedPoseRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct DetectStayAlignedRelaxedPoseRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DetectStayAlignedRelaxedPoseRequest<'a> { + type Inner = DetectStayAlignedRelaxedPoseRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> DetectStayAlignedRelaxedPoseRequest<'a> { + pub const VT_POSE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DetectStayAlignedRelaxedPoseRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DetectStayAlignedRelaxedPoseRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = DetectStayAlignedRelaxedPoseRequestBuilder::new(_fbb); + builder.add_pose(args.pose); + builder.finish() + } + + + #[inline] + pub fn pose(&self) -> StayAlignedRelaxedPose { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(DetectStayAlignedRelaxedPoseRequest::VT_POSE, Some(StayAlignedRelaxedPose::STANDING)).unwrap()} + } +} + +impl flatbuffers::Verifiable for DetectStayAlignedRelaxedPoseRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("pose", Self::VT_POSE, false)? + .finish(); + Ok(()) + } +} +pub struct DetectStayAlignedRelaxedPoseRequestArgs { + pub pose: StayAlignedRelaxedPose, +} +impl<'a> Default for DetectStayAlignedRelaxedPoseRequestArgs { + #[inline] + fn default() -> Self { + DetectStayAlignedRelaxedPoseRequestArgs { + pose: StayAlignedRelaxedPose::STANDING, + } + } +} + +pub struct DetectStayAlignedRelaxedPoseRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DetectStayAlignedRelaxedPoseRequestBuilder<'a, 'b> { + #[inline] + pub fn add_pose(&mut self, pose: StayAlignedRelaxedPose) { + self.fbb_.push_slot::(DetectStayAlignedRelaxedPoseRequest::VT_POSE, pose, StayAlignedRelaxedPose::STANDING); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DetectStayAlignedRelaxedPoseRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + DetectStayAlignedRelaxedPoseRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for DetectStayAlignedRelaxedPoseRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("DetectStayAlignedRelaxedPoseRequest"); + ds.field("pose", &self.pose()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/enable_stay_aligned_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/enable_stay_aligned_request_generated.rs new file mode 100644 index 00000000..a0288973 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/enable_stay_aligned_request_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum EnableStayAlignedRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct EnableStayAlignedRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for EnableStayAlignedRequest<'a> { + type Inner = EnableStayAlignedRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> EnableStayAlignedRequest<'a> { + pub const VT_ENABLE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EnableStayAlignedRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args EnableStayAlignedRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = EnableStayAlignedRequestBuilder::new(_fbb); + builder.add_enable(args.enable); + builder.finish() + } + + + #[inline] + pub fn enable(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(EnableStayAlignedRequest::VT_ENABLE, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for EnableStayAlignedRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("enable", Self::VT_ENABLE, false)? + .finish(); + Ok(()) + } +} +pub struct EnableStayAlignedRequestArgs { + pub enable: bool, +} +impl<'a> Default for EnableStayAlignedRequestArgs { + #[inline] + fn default() -> Self { + EnableStayAlignedRequestArgs { + enable: false, + } + } +} + +pub struct EnableStayAlignedRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> EnableStayAlignedRequestBuilder<'a, 'b> { + #[inline] + pub fn add_enable(&mut self, enable: bool) { + self.fbb_.push_slot::(EnableStayAlignedRequest::VT_ENABLE, enable, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> EnableStayAlignedRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + EnableStayAlignedRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for EnableStayAlignedRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EnableStayAlignedRequest"); + ds.field("enable", &self.enable()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_stay_aligned_relaxed_pose_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_stay_aligned_relaxed_pose_request_generated.rs new file mode 100644 index 00000000..ea94a902 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_stay_aligned_relaxed_pose_request_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ResetStayAlignedRelaxedPoseRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ResetStayAlignedRelaxedPoseRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ResetStayAlignedRelaxedPoseRequest<'a> { + type Inner = ResetStayAlignedRelaxedPoseRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ResetStayAlignedRelaxedPoseRequest<'a> { + pub const VT_POSE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ResetStayAlignedRelaxedPoseRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ResetStayAlignedRelaxedPoseRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ResetStayAlignedRelaxedPoseRequestBuilder::new(_fbb); + builder.add_pose(args.pose); + builder.finish() + } + + + #[inline] + pub fn pose(&self) -> StayAlignedRelaxedPose { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ResetStayAlignedRelaxedPoseRequest::VT_POSE, Some(StayAlignedRelaxedPose::STANDING)).unwrap()} + } +} + +impl flatbuffers::Verifiable for ResetStayAlignedRelaxedPoseRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("pose", Self::VT_POSE, false)? + .finish(); + Ok(()) + } +} +pub struct ResetStayAlignedRelaxedPoseRequestArgs { + pub pose: StayAlignedRelaxedPose, +} +impl<'a> Default for ResetStayAlignedRelaxedPoseRequestArgs { + #[inline] + fn default() -> Self { + ResetStayAlignedRelaxedPoseRequestArgs { + pose: StayAlignedRelaxedPose::STANDING, + } + } +} + +pub struct ResetStayAlignedRelaxedPoseRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ResetStayAlignedRelaxedPoseRequestBuilder<'a, 'b> { + #[inline] + pub fn add_pose(&mut self, pose: StayAlignedRelaxedPose) { + self.fbb_.push_slot::(ResetStayAlignedRelaxedPoseRequest::VT_POSE, pose, StayAlignedRelaxedPose::STANDING); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetStayAlignedRelaxedPoseRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ResetStayAlignedRelaxedPoseRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for ResetStayAlignedRelaxedPoseRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ResetStayAlignedRelaxedPoseRequest"); + ds.field("pose", &self.pose()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 744ae567..61e03641 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs @@ -12,10 +12,10 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_RPC_MESSAGE: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RPC_MESSAGE: u8 = 67; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 70; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 68] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 71] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -84,6 +84,9 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 68] = [ RpcMessage::RecordBVHStatusRequest, RpcMessage::VRCConfigStateRequest, RpcMessage::VRCConfigStateChangeResponse, + RpcMessage::EnableStayAlignedRequest, + RpcMessage::DetectStayAlignedRelaxedPoseRequest, + RpcMessage::ResetStayAlignedRelaxedPoseRequest, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -159,9 +162,12 @@ impl RpcMessage { pub const RecordBVHStatusRequest: Self = Self(65); pub const VRCConfigStateRequest: Self = Self(66); pub const VRCConfigStateChangeResponse: Self = Self(67); + pub const EnableStayAlignedRequest: Self = Self(68); + pub const DetectStayAlignedRelaxedPoseRequest: Self = Self(69); + pub const ResetStayAlignedRelaxedPoseRequest: Self = Self(70); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 67; + pub const ENUM_MAX: u8 = 70; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -231,6 +237,9 @@ impl RpcMessage { Self::RecordBVHStatusRequest, Self::VRCConfigStateRequest, Self::VRCConfigStateChangeResponse, + Self::EnableStayAlignedRequest, + Self::DetectStayAlignedRelaxedPoseRequest, + Self::ResetStayAlignedRelaxedPoseRequest, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -303,6 +312,9 @@ impl RpcMessage { Self::RecordBVHStatusRequest => Some("RecordBVHStatusRequest"), Self::VRCConfigStateRequest => Some("VRCConfigStateRequest"), Self::VRCConfigStateChangeResponse => Some("VRCConfigStateChangeResponse"), + Self::EnableStayAlignedRequest => Some("EnableStayAlignedRequest"), + Self::DetectStayAlignedRelaxedPoseRequest => Some("DetectStayAlignedRelaxedPoseRequest"), + Self::ResetStayAlignedRelaxedPoseRequest => Some("ResetStayAlignedRelaxedPoseRequest"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs index a834b1d2..3b46905a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs @@ -1074,6 +1074,51 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_enable_stay_aligned_request(&self) -> Option> { + if self.message_type() == RpcMessage::EnableStayAlignedRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { EnableStayAlignedRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_detect_stay_aligned_relaxed_pose_request(&self) -> Option> { + if self.message_type() == RpcMessage::DetectStayAlignedRelaxedPoseRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { DetectStayAlignedRelaxedPoseRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_reset_stay_aligned_relaxed_pose_request(&self) -> Option> { + if self.message_type() == RpcMessage::ResetStayAlignedRelaxedPoseRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ResetStayAlignedRelaxedPoseRequest::init_from_table(t) } + }) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -1153,6 +1198,9 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::RecordBVHStatusRequest => v.verify_union_variant::>("RpcMessage::RecordBVHStatusRequest", pos), RpcMessage::VRCConfigStateRequest => v.verify_union_variant::>("RpcMessage::VRCConfigStateRequest", pos), RpcMessage::VRCConfigStateChangeResponse => v.verify_union_variant::>("RpcMessage::VRCConfigStateChangeResponse", pos), + RpcMessage::EnableStayAlignedRequest => v.verify_union_variant::>("RpcMessage::EnableStayAlignedRequest", pos), + RpcMessage::DetectStayAlignedRelaxedPoseRequest => v.verify_union_variant::>("RpcMessage::DetectStayAlignedRelaxedPoseRequest", pos), + RpcMessage::ResetStayAlignedRelaxedPoseRequest => v.verify_union_variant::>("RpcMessage::ResetStayAlignedRelaxedPoseRequest", pos), _ => Ok(()), } })? @@ -1683,6 +1731,27 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::EnableStayAlignedRequest => { + if let Some(x) = self.message_as_enable_stay_aligned_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::DetectStayAlignedRelaxedPoseRequest => { + if let Some(x) = self.message_as_detect_stay_aligned_relaxed_pose_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ResetStayAlignedRelaxedPoseRequest => { + if let Some(x) = self.message_as_reset_stay_aligned_relaxed_pose_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, _ => { let x: Option<()> = None; ds.field("message", &x) diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs index 99d9f1be..d903d098 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs @@ -35,7 +35,7 @@ impl<'a> SettingsResponse<'a> { pub const VT_TAP_DETECTION_SETTINGS: flatbuffers::VOffsetT = 18; pub const VT_AUTO_BONE_SETTINGS: flatbuffers::VOffsetT = 20; pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; - pub const VT_YAW_CORRECTION_SETTINGS: flatbuffers::VOffsetT = 24; + pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -47,7 +47,7 @@ impl<'a> SettingsResponse<'a> { args: &'args SettingsResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SettingsResponseBuilder::new(_fbb); - if let Some(x) = args.yaw_correction_settings { builder.add_yaw_correction_settings(x); } + if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } if let Some(x) = args.auto_bone_settings { builder.add_auto_bone_settings(x); } if let Some(x) = args.tap_detection_settings { builder.add_tap_detection_settings(x); } @@ -133,11 +133,11 @@ impl<'a> SettingsResponse<'a> { unsafe { self._tab.get::>(SettingsResponse::VT_RESETS_SETTINGS, None)} } #[inline] - pub fn yaw_correction_settings(&self) -> Option> { + pub fn stay_aligned(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_YAW_CORRECTION_SETTINGS, None)} + unsafe { self._tab.get::>(SettingsResponse::VT_STAY_ALIGNED, None)} } } @@ -158,7 +158,7 @@ impl flatbuffers::Verifiable for SettingsResponse<'_> { .visit_field::>("tap_detection_settings", Self::VT_TAP_DETECTION_SETTINGS, false)? .visit_field::>("auto_bone_settings", Self::VT_AUTO_BONE_SETTINGS, false)? .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? - .visit_field::>("yaw_correction_settings", Self::VT_YAW_CORRECTION_SETTINGS, false)? + .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .finish(); Ok(()) } @@ -174,7 +174,7 @@ pub struct SettingsResponseArgs<'a> { pub tap_detection_settings: Option>>, pub auto_bone_settings: Option>>, pub resets_settings: Option>>, - pub yaw_correction_settings: Option>>, + pub stay_aligned: Option>>, } impl<'a> Default for SettingsResponseArgs<'a> { #[inline] @@ -190,7 +190,7 @@ impl<'a> Default for SettingsResponseArgs<'a> { tap_detection_settings: None, auto_bone_settings: None, resets_settings: None, - yaw_correction_settings: None, + stay_aligned: None, } } } @@ -241,8 +241,8 @@ impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SettingsResponse::VT_RESETS_SETTINGS, resets_settings); } #[inline] - pub fn add_yaw_correction_settings(&mut self, yaw_correction_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_YAW_CORRECTION_SETTINGS, yaw_correction_settings); + pub fn add_stay_aligned(&mut self, stay_aligned: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_STAY_ALIGNED, stay_aligned); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsResponseBuilder<'a, 'b> { @@ -272,7 +272,7 @@ impl core::fmt::Debug for SettingsResponse<'_> { ds.field("tap_detection_settings", &self.tap_detection_settings()); ds.field("auto_bone_settings", &self.auto_bone_settings()); ds.field("resets_settings", &self.resets_settings()); - ds.field("yaw_correction_settings", &self.yaw_correction_settings()); + ds.field("stay_aligned", &self.stay_aligned()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_relaxed_pose_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_relaxed_pose_generated.rs new file mode 100644 index 00000000..7386b63c --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_relaxed_pose_generated.rs @@ -0,0 +1,100 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MIN_STAY_ALIGNED_RELAXED_POSE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_STAY_ALIGNED_RELAXED_POSE: u8 = 2; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_STAY_ALIGNED_RELAXED_POSE: [StayAlignedRelaxedPose; 3] = [ + StayAlignedRelaxedPose::STANDING, + StayAlignedRelaxedPose::SITTING, + StayAlignedRelaxedPose::FLAT, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct StayAlignedRelaxedPose(pub u8); +#[allow(non_upper_case_globals)] +impl StayAlignedRelaxedPose { + pub const STANDING: Self = Self(0); + pub const SITTING: Self = Self(1); + pub const FLAT: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::STANDING, + Self::SITTING, + Self::FLAT, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::STANDING => Some("STANDING"), + Self::SITTING => Some("SITTING"), + Self::FLAT => Some("FLAT"), + _ => None, + } + } +} +impl core::fmt::Debug for StayAlignedRelaxedPose { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + if let Some(name) = self.variant_name() { + f.write_str(name) + } else { + f.write_fmt(format_args!("", self.0)) + } + } +} +impl<'a> flatbuffers::Follow<'a> for StayAlignedRelaxedPose { + type Inner = Self; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + Self(b) + } +} + +impl flatbuffers::Push for StayAlignedRelaxedPose { + type Output = StayAlignedRelaxedPose; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for StayAlignedRelaxedPose { + type Scalar = u8; + #[inline] + fn to_little_endian(self) -> u8 { + self.0.to_le() + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for StayAlignedRelaxedPose { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + u8::run_verifier(v, pos) + } +} + +impl flatbuffers::SimpleToVerifyInSlice for StayAlignedRelaxedPose {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_settings_generated.rs new file mode 100644 index 00000000..ae8de25b --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/stay_aligned_settings_generated.rs @@ -0,0 +1,346 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StayAlignedSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct StayAlignedSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StayAlignedSettings<'a> { + type Inner = StayAlignedSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> StayAlignedSettings<'a> { + pub const VT_ENABLED: flatbuffers::VOffsetT = 4; + pub const VT_EXTRAYAWCORRECTION: flatbuffers::VOffsetT = 6; + pub const VT_HIDEYAWCORRECTION: flatbuffers::VOffsetT = 8; + pub const VT_STANDINGENABLED: flatbuffers::VOffsetT = 10; + pub const VT_STANDINGUPPERLEGANGLE: flatbuffers::VOffsetT = 12; + pub const VT_STANDINGLOWERLEGANGLE: flatbuffers::VOffsetT = 14; + pub const VT_STANDINGFOOTANGLE: flatbuffers::VOffsetT = 16; + pub const VT_SITTINGENABLED: flatbuffers::VOffsetT = 18; + pub const VT_SITTINGUPPERLEGANGLE: flatbuffers::VOffsetT = 20; + pub const VT_SITTINGLOWERLEGANGLE: flatbuffers::VOffsetT = 22; + pub const VT_SITTINGFOOTANGLE: flatbuffers::VOffsetT = 24; + pub const VT_FLATENABLED: flatbuffers::VOffsetT = 26; + pub const VT_FLATUPPERLEGANGLE: flatbuffers::VOffsetT = 28; + pub const VT_FLATLOWERLEGANGLE: flatbuffers::VOffsetT = 30; + pub const VT_FLATFOOTANGLE: flatbuffers::VOffsetT = 32; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StayAlignedSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StayAlignedSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = StayAlignedSettingsBuilder::new(_fbb); + builder.add_flatFootAngle(args.flatFootAngle); + builder.add_flatLowerLegAngle(args.flatLowerLegAngle); + builder.add_flatUpperLegAngle(args.flatUpperLegAngle); + builder.add_sittingFootAngle(args.sittingFootAngle); + builder.add_sittingLowerLegAngle(args.sittingLowerLegAngle); + builder.add_sittingUpperLegAngle(args.sittingUpperLegAngle); + builder.add_standingFootAngle(args.standingFootAngle); + builder.add_standingLowerLegAngle(args.standingLowerLegAngle); + builder.add_standingUpperLegAngle(args.standingUpperLegAngle); + builder.add_flatEnabled(args.flatEnabled); + builder.add_sittingEnabled(args.sittingEnabled); + builder.add_standingEnabled(args.standingEnabled); + builder.add_hideYawCorrection(args.hideYawCorrection); + builder.add_extraYawCorrection(args.extraYawCorrection); + builder.add_enabled(args.enabled); + builder.finish() + } + + + #[inline] + pub fn enabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_ENABLED, Some(false)).unwrap()} + } + #[inline] + pub fn extraYawCorrection(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_EXTRAYAWCORRECTION, Some(false)).unwrap()} + } + #[inline] + pub fn hideYawCorrection(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_HIDEYAWCORRECTION, Some(false)).unwrap()} + } + #[inline] + pub fn standingEnabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_STANDINGENABLED, Some(false)).unwrap()} + } + #[inline] + pub fn standingUpperLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_STANDINGUPPERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn standingLowerLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_STANDINGLOWERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn standingFootAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_STANDINGFOOTANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn sittingEnabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_SITTINGENABLED, Some(false)).unwrap()} + } + #[inline] + pub fn sittingUpperLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_SITTINGUPPERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn sittingLowerLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_SITTINGLOWERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn sittingFootAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_SITTINGFOOTANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn flatEnabled(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_FLATENABLED, Some(false)).unwrap()} + } + #[inline] + pub fn flatUpperLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_FLATUPPERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn flatLowerLegAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_FLATLOWERLEGANGLE, Some(0.0)).unwrap()} + } + #[inline] + pub fn flatFootAngle(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(StayAlignedSettings::VT_FLATFOOTANGLE, Some(0.0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for StayAlignedSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("enabled", Self::VT_ENABLED, false)? + .visit_field::("extraYawCorrection", Self::VT_EXTRAYAWCORRECTION, false)? + .visit_field::("hideYawCorrection", Self::VT_HIDEYAWCORRECTION, false)? + .visit_field::("standingEnabled", Self::VT_STANDINGENABLED, false)? + .visit_field::("standingUpperLegAngle", Self::VT_STANDINGUPPERLEGANGLE, false)? + .visit_field::("standingLowerLegAngle", Self::VT_STANDINGLOWERLEGANGLE, false)? + .visit_field::("standingFootAngle", Self::VT_STANDINGFOOTANGLE, false)? + .visit_field::("sittingEnabled", Self::VT_SITTINGENABLED, false)? + .visit_field::("sittingUpperLegAngle", Self::VT_SITTINGUPPERLEGANGLE, false)? + .visit_field::("sittingLowerLegAngle", Self::VT_SITTINGLOWERLEGANGLE, false)? + .visit_field::("sittingFootAngle", Self::VT_SITTINGFOOTANGLE, false)? + .visit_field::("flatEnabled", Self::VT_FLATENABLED, false)? + .visit_field::("flatUpperLegAngle", Self::VT_FLATUPPERLEGANGLE, false)? + .visit_field::("flatLowerLegAngle", Self::VT_FLATLOWERLEGANGLE, false)? + .visit_field::("flatFootAngle", Self::VT_FLATFOOTANGLE, false)? + .finish(); + Ok(()) + } +} +pub struct StayAlignedSettingsArgs { + pub enabled: bool, + pub extraYawCorrection: bool, + pub hideYawCorrection: bool, + pub standingEnabled: bool, + pub standingUpperLegAngle: f32, + pub standingLowerLegAngle: f32, + pub standingFootAngle: f32, + pub sittingEnabled: bool, + pub sittingUpperLegAngle: f32, + pub sittingLowerLegAngle: f32, + pub sittingFootAngle: f32, + pub flatEnabled: bool, + pub flatUpperLegAngle: f32, + pub flatLowerLegAngle: f32, + pub flatFootAngle: f32, +} +impl<'a> Default for StayAlignedSettingsArgs { + #[inline] + fn default() -> Self { + StayAlignedSettingsArgs { + enabled: false, + extraYawCorrection: false, + hideYawCorrection: false, + standingEnabled: false, + standingUpperLegAngle: 0.0, + standingLowerLegAngle: 0.0, + standingFootAngle: 0.0, + sittingEnabled: false, + sittingUpperLegAngle: 0.0, + sittingLowerLegAngle: 0.0, + sittingFootAngle: 0.0, + flatEnabled: false, + flatUpperLegAngle: 0.0, + flatLowerLegAngle: 0.0, + flatFootAngle: 0.0, + } + } +} + +pub struct StayAlignedSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StayAlignedSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_enabled(&mut self, enabled: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_ENABLED, enabled, false); + } + #[inline] + pub fn add_extraYawCorrection(&mut self, extraYawCorrection: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_EXTRAYAWCORRECTION, extraYawCorrection, false); + } + #[inline] + pub fn add_hideYawCorrection(&mut self, hideYawCorrection: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_HIDEYAWCORRECTION, hideYawCorrection, false); + } + #[inline] + pub fn add_standingEnabled(&mut self, standingEnabled: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_STANDINGENABLED, standingEnabled, false); + } + #[inline] + pub fn add_standingUpperLegAngle(&mut self, standingUpperLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_STANDINGUPPERLEGANGLE, standingUpperLegAngle, 0.0); + } + #[inline] + pub fn add_standingLowerLegAngle(&mut self, standingLowerLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_STANDINGLOWERLEGANGLE, standingLowerLegAngle, 0.0); + } + #[inline] + pub fn add_standingFootAngle(&mut self, standingFootAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_STANDINGFOOTANGLE, standingFootAngle, 0.0); + } + #[inline] + pub fn add_sittingEnabled(&mut self, sittingEnabled: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_SITTINGENABLED, sittingEnabled, false); + } + #[inline] + pub fn add_sittingUpperLegAngle(&mut self, sittingUpperLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_SITTINGUPPERLEGANGLE, sittingUpperLegAngle, 0.0); + } + #[inline] + pub fn add_sittingLowerLegAngle(&mut self, sittingLowerLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_SITTINGLOWERLEGANGLE, sittingLowerLegAngle, 0.0); + } + #[inline] + pub fn add_sittingFootAngle(&mut self, sittingFootAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_SITTINGFOOTANGLE, sittingFootAngle, 0.0); + } + #[inline] + pub fn add_flatEnabled(&mut self, flatEnabled: bool) { + self.fbb_.push_slot::(StayAlignedSettings::VT_FLATENABLED, flatEnabled, false); + } + #[inline] + pub fn add_flatUpperLegAngle(&mut self, flatUpperLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_FLATUPPERLEGANGLE, flatUpperLegAngle, 0.0); + } + #[inline] + pub fn add_flatLowerLegAngle(&mut self, flatLowerLegAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_FLATLOWERLEGANGLE, flatLowerLegAngle, 0.0); + } + #[inline] + pub fn add_flatFootAngle(&mut self, flatFootAngle: f32) { + self.fbb_.push_slot::(StayAlignedSettings::VT_FLATFOOTANGLE, flatFootAngle, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StayAlignedSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + StayAlignedSettingsBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for StayAlignedSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StayAlignedSettings"); + ds.field("enabled", &self.enabled()); + ds.field("extraYawCorrection", &self.extraYawCorrection()); + ds.field("hideYawCorrection", &self.hideYawCorrection()); + ds.field("standingEnabled", &self.standingEnabled()); + ds.field("standingUpperLegAngle", &self.standingUpperLegAngle()); + ds.field("standingLowerLegAngle", &self.standingLowerLegAngle()); + ds.field("standingFootAngle", &self.standingFootAngle()); + ds.field("sittingEnabled", &self.sittingEnabled()); + ds.field("sittingUpperLegAngle", &self.sittingUpperLegAngle()); + ds.field("sittingLowerLegAngle", &self.sittingLowerLegAngle()); + ds.field("sittingFootAngle", &self.sittingFootAngle()); + ds.field("flatEnabled", &self.flatEnabled()); + ds.field("flatUpperLegAngle", &self.flatUpperLegAngle()); + ds.field("flatLowerLegAngle", &self.flatLowerLegAngle()); + ds.field("flatFootAngle", &self.flatFootAngle()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/yaw_correction_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/yaw_correction_settings_generated.rs deleted file mode 100644 index 663c2f31..00000000 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/yaw_correction_settings_generated.rs +++ /dev/null @@ -1,125 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -pub enum YawCorrectionSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct YawCorrectionSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for YawCorrectionSettings<'a> { - type Inner = YawCorrectionSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> YawCorrectionSettings<'a> { - pub const VT_ENABLED: flatbuffers::VOffsetT = 4; - pub const VT_AMOUNTINDEGPERSEC: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - YawCorrectionSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args YawCorrectionSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = YawCorrectionSettingsBuilder::new(_fbb); - builder.add_amountInDegPerSec(args.amountInDegPerSec); - builder.add_enabled(args.enabled); - builder.finish() - } - - - #[inline] - pub fn enabled(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(YawCorrectionSettings::VT_ENABLED, Some(false)).unwrap()} - } - #[inline] - pub fn amountInDegPerSec(&self) -> f32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(YawCorrectionSettings::VT_AMOUNTINDEGPERSEC, Some(0.0)).unwrap()} - } -} - -impl flatbuffers::Verifiable for YawCorrectionSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("enabled", Self::VT_ENABLED, false)? - .visit_field::("amountInDegPerSec", Self::VT_AMOUNTINDEGPERSEC, false)? - .finish(); - Ok(()) - } -} -pub struct YawCorrectionSettingsArgs { - pub enabled: bool, - pub amountInDegPerSec: f32, -} -impl<'a> Default for YawCorrectionSettingsArgs { - #[inline] - fn default() -> Self { - YawCorrectionSettingsArgs { - enabled: false, - amountInDegPerSec: 0.0, - } - } -} - -pub struct YawCorrectionSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> YawCorrectionSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_enabled(&mut self, enabled: bool) { - self.fbb_.push_slot::(YawCorrectionSettings::VT_ENABLED, enabled, false); - } - #[inline] - pub fn add_amountInDegPerSec(&mut self, amountInDegPerSec: f32) { - self.fbb_.push_slot::(YawCorrectionSettings::VT_AMOUNTINDEGPERSEC, amountInDegPerSec, 0.0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> YawCorrectionSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - YawCorrectionSettingsBuilder { - fbb_: _fbb, - start_: start, - } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } -} - -impl core::fmt::Debug for YawCorrectionSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("YawCorrectionSettings"); - ds.field("enabled", &self.enabled()); - ds.field("amountInDegPerSec", &self.amountInDegPerSec()); - ds.finish() - } -} diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 7c04b236..00cbe566 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -10,6 +10,8 @@ export { PollDataFeed, PollDataFeedT } from './solarxr-protocol/data-feed/poll-d export { StartDataFeed, StartDataFeedT } from './solarxr-protocol/data-feed/start-data-feed.js'; export { DeviceData, DeviceDataT } from './solarxr-protocol/data-feed/device-data/device-data.js'; export { DeviceDataMask, DeviceDataMaskT } from './solarxr-protocol/data-feed/device-data/device-data-mask.js'; +export { StayAlignedPose, StayAlignedPoseT } from './solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.js'; +export { StayAlignedTracker, StayAlignedTrackerT } from './solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.js'; export { TrackerData, TrackerDataT } from './solarxr-protocol/data-feed/tracker/tracker-data.js'; export { TrackerDataMask, TrackerDataMaskT } from './solarxr-protocol/data-feed/tracker/tracker-data-mask.js'; export { TrackerInfo, TrackerInfoT } from './solarxr-protocol/data-feed/tracker/tracker-info.js'; @@ -67,7 +69,9 @@ export { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '. export { ClearMountingResetRequest, ClearMountingResetRequestT } from './solarxr-protocol/rpc/clear-mounting-reset-request.js'; export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/close-serial-request.js'; export { ComputerDirectory } from './solarxr-protocol/rpc/computer-directory.js'; +export { DetectStayAlignedRelaxedPoseRequest, DetectStayAlignedRelaxedPoseRequestT } from './solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.js'; export { DriftCompensationSettings, DriftCompensationSettingsT } from './solarxr-protocol/rpc/drift-compensation-settings.js'; +export { EnableStayAlignedRequest, EnableStayAlignedRequestT } from './solarxr-protocol/rpc/enable-stay-aligned-request.js'; export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings.js'; export { FirmwarePart, FirmwarePartT } from './solarxr-protocol/rpc/firmware-part.js'; export { FirmwareUpdateDeviceId, unionToFirmwareUpdateDeviceId, unionListToFirmwareUpdateDeviceId } from './solarxr-protocol/rpc/firmware-update-device-id.js'; @@ -100,6 +104,7 @@ export { RecordBVHStatusRequest, RecordBVHStatusRequestT } from './solarxr-proto export { ResetRequest, ResetRequestT } from './solarxr-protocol/rpc/reset-request.js'; export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-response.js'; export { ResetStatus } from './solarxr-protocol/rpc/reset-status.js'; +export { ResetStayAlignedRelaxedPoseRequest, ResetStayAlignedRelaxedPoseRequestT } from './solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.js'; export { ResetType } from './solarxr-protocol/rpc/reset-type.js'; export { ResetsSettings, ResetsSettingsT } from './solarxr-protocol/rpc/resets-settings.js'; export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message.js'; @@ -138,6 +143,8 @@ export { StatusSystemUpdate, StatusSystemUpdateT } from './solarxr-protocol/rpc/ export { StatusTrackerError, StatusTrackerErrorT } from './solarxr-protocol/rpc/status-tracker-error.js'; export { StatusTrackerReset, StatusTrackerResetT } from './solarxr-protocol/rpc/status-tracker-reset.js'; export { StatusUnassignedHMD, StatusUnassignedHMDT } from './solarxr-protocol/rpc/status-unassigned-hmd.js'; +export { StayAlignedRelaxedPose } from './solarxr-protocol/rpc/stay-aligned-relaxed-pose.js'; +export { StayAlignedSettings, StayAlignedSettingsT } from './solarxr-protocol/rpc/stay-aligned-settings.js'; export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-protocol/rpc/steam-vrtrackers-setting.js'; export { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from './solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; export { TapDetectionSettings, TapDetectionSettingsT } from './solarxr-protocol/rpc/tap-detection-settings.js'; @@ -157,7 +164,6 @@ export { VRCSpineMode } from './solarxr-protocol/rpc/vrcspine-mode.js'; export { VRCTrackerModel } from './solarxr-protocol/rpc/vrctracker-model.js'; export { WifiProvisioningStatus } from './solarxr-protocol/rpc/wifi-provisioning-status.js'; export { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from './solarxr-protocol/rpc/wifi-provisioning-status-response.js'; -export { YawCorrectionSettings, YawCorrectionSettingsT } from './solarxr-protocol/rpc/yaw-correction-settings.js'; export { LegTweaksSettings, LegTweaksSettingsT } from './solarxr-protocol/rpc/settings/leg-tweaks-settings.js'; export { ModelRatios, ModelRatiosT } from './solarxr-protocol/rpc/settings/model-ratios.js'; export { ModelSettings, ModelSettingsT } from './solarxr-protocol/rpc/settings/model-settings.js'; diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts index 1dab9869..b5513d7d 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts @@ -52,8 +52,13 @@ boneMask():boolean { return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; } +stayAlignedPoseMask():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + static startDataFeedConfig(builder:flatbuffers.Builder) { - builder.startObject(4); + builder.startObject(5); } static addMinimumTimeSinceLast(builder:flatbuffers.Builder, minimumTimeSinceLast:number) { @@ -72,6 +77,10 @@ static addBoneMask(builder:flatbuffers.Builder, boneMask:boolean) { builder.addFieldInt8(3, +boneMask, +false); } +static addStayAlignedPoseMask(builder:flatbuffers.Builder, stayAlignedPoseMask:boolean) { + builder.addFieldInt8(4, +stayAlignedPoseMask, +false); +} + static endDataFeedConfig(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -83,7 +92,8 @@ unpack(): DataFeedConfigT { this.minimumTimeSinceLast(), (this.dataMask() !== null ? this.dataMask()!.unpack() : null), (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null), - this.boneMask() + this.boneMask(), + this.stayAlignedPoseMask() ); } @@ -93,6 +103,7 @@ unpackTo(_o: DataFeedConfigT): void { _o.dataMask = (this.dataMask() !== null ? this.dataMask()!.unpack() : null); _o.syntheticTrackersMask = (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null); _o.boneMask = this.boneMask(); + _o.stayAlignedPoseMask = this.stayAlignedPoseMask(); } } @@ -101,7 +112,8 @@ constructor( public minimumTimeSinceLast: number = 0, public dataMask: DeviceDataMaskT|null = null, public syntheticTrackersMask: TrackerDataMaskT|null = null, - public boneMask: boolean = false + public boneMask: boolean = false, + public stayAlignedPoseMask: boolean = false ){} @@ -114,6 +126,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { DataFeedConfig.addDataMask(builder, dataMask); DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMask); DataFeedConfig.addBoneMask(builder, this.boneMask); + DataFeedConfig.addStayAlignedPoseMask(builder, this.stayAlignedPoseMask); return DataFeedConfig.endDataFeedConfig(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts index 842cb385..67cb7d94 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts @@ -4,6 +4,7 @@ import * as flatbuffers from 'flatbuffers'; import { Bone, BoneT } from '../../solarxr-protocol/data-feed/bone.js'; import { DeviceData, DeviceDataT } from '../../solarxr-protocol/data-feed/device-data/device-data.js'; +import { StayAlignedPose, StayAlignedPoseT } from '../../solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.js'; import { TrackerData, TrackerDataT } from '../../solarxr-protocol/data-feed/tracker/tracker-data.js'; @@ -67,8 +68,13 @@ bonesLength():number { return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; } +stayAlignedPose(obj?:StayAlignedPose):StayAlignedPose|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new StayAlignedPose()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + static startDataFeedUpdate(builder:flatbuffers.Builder) { - builder.startObject(3); + builder.startObject(4); } static addDevices(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset) { @@ -119,24 +125,22 @@ static startBonesVector(builder:flatbuffers.Builder, numElems:number) { builder.startVector(4, numElems, 4); } +static addStayAlignedPose(builder:flatbuffers.Builder, stayAlignedPoseOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, stayAlignedPoseOffset, 0); +} + static endDataFeedUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } -static createDataFeedUpdate(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset, syntheticTrackersOffset:flatbuffers.Offset, bonesOffset:flatbuffers.Offset):flatbuffers.Offset { - DataFeedUpdate.startDataFeedUpdate(builder); - DataFeedUpdate.addDevices(builder, devicesOffset); - DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); - DataFeedUpdate.addBones(builder, bonesOffset); - return DataFeedUpdate.endDataFeedUpdate(builder); -} unpack(): DataFeedUpdateT { return new DataFeedUpdateT( this.bb!.createObjList(this.devices.bind(this), this.devicesLength()), this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()), - this.bb!.createObjList(this.bones.bind(this), this.bonesLength()) + this.bb!.createObjList(this.bones.bind(this), this.bonesLength()), + (this.stayAlignedPose() !== null ? this.stayAlignedPose()!.unpack() : null) ); } @@ -145,6 +149,7 @@ unpackTo(_o: DataFeedUpdateT): void { _o.devices = this.bb!.createObjList(this.devices.bind(this), this.devicesLength()); _o.syntheticTrackers = this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()); _o.bones = this.bb!.createObjList(this.bones.bind(this), this.bonesLength()); + _o.stayAlignedPose = (this.stayAlignedPose() !== null ? this.stayAlignedPose()!.unpack() : null); } } @@ -152,7 +157,8 @@ export class DataFeedUpdateT implements flatbuffers.IGeneratedObject { constructor( public devices: (DeviceDataT)[] = [], public syntheticTrackers: (TrackerDataT)[] = [], - public bones: (BoneT)[] = [] + public bones: (BoneT)[] = [], + public stayAlignedPose: StayAlignedPoseT|null = null ){} @@ -160,11 +166,14 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const devices = DataFeedUpdate.createDevicesVector(builder, builder.createObjectOffsetList(this.devices)); const syntheticTrackers = DataFeedUpdate.createSyntheticTrackersVector(builder, builder.createObjectOffsetList(this.syntheticTrackers)); const bones = DataFeedUpdate.createBonesVector(builder, builder.createObjectOffsetList(this.bones)); + const stayAlignedPose = (this.stayAlignedPose !== null ? this.stayAlignedPose!.pack(builder) : 0); - return DataFeedUpdate.createDataFeedUpdate(builder, - devices, - syntheticTrackers, - bones - ); + DataFeedUpdate.startDataFeedUpdate(builder); + DataFeedUpdate.addDevices(builder, devices); + DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackers); + DataFeedUpdate.addBones(builder, bones); + DataFeedUpdate.addStayAlignedPose(builder, stayAlignedPose); + + return DataFeedUpdate.endDataFeedUpdate(builder); } } diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.ts b/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.ts new file mode 100644 index 00000000..9ef4f1d4 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-pose.ts @@ -0,0 +1,100 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StayAlignedPose implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StayAlignedPose { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStayAlignedPose(bb:flatbuffers.ByteBuffer, obj?:StayAlignedPose):StayAlignedPose { + return (obj || new StayAlignedPose()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStayAlignedPose(bb:flatbuffers.ByteBuffer, obj?:StayAlignedPose):StayAlignedPose { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StayAlignedPose()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +upperLegAngleInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +lowerLegAngleInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +footAngleInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startStayAlignedPose(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addUpperLegAngleInDeg(builder:flatbuffers.Builder, upperLegAngleInDeg:number) { + builder.addFieldFloat32(0, upperLegAngleInDeg, 0.0); +} + +static addLowerLegAngleInDeg(builder:flatbuffers.Builder, lowerLegAngleInDeg:number) { + builder.addFieldFloat32(1, lowerLegAngleInDeg, 0.0); +} + +static addFootAngleInDeg(builder:flatbuffers.Builder, footAngleInDeg:number) { + builder.addFieldFloat32(2, footAngleInDeg, 0.0); +} + +static endStayAlignedPose(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStayAlignedPose(builder:flatbuffers.Builder, upperLegAngleInDeg:number, lowerLegAngleInDeg:number, footAngleInDeg:number):flatbuffers.Offset { + StayAlignedPose.startStayAlignedPose(builder); + StayAlignedPose.addUpperLegAngleInDeg(builder, upperLegAngleInDeg); + StayAlignedPose.addLowerLegAngleInDeg(builder, lowerLegAngleInDeg); + StayAlignedPose.addFootAngleInDeg(builder, footAngleInDeg); + return StayAlignedPose.endStayAlignedPose(builder); +} + +unpack(): StayAlignedPoseT { + return new StayAlignedPoseT( + this.upperLegAngleInDeg(), + this.lowerLegAngleInDeg(), + this.footAngleInDeg() + ); +} + + +unpackTo(_o: StayAlignedPoseT): void { + _o.upperLegAngleInDeg = this.upperLegAngleInDeg(); + _o.lowerLegAngleInDeg = this.lowerLegAngleInDeg(); + _o.footAngleInDeg = this.footAngleInDeg(); +} +} + +export class StayAlignedPoseT implements flatbuffers.IGeneratedObject { +constructor( + public upperLegAngleInDeg: number = 0.0, + public lowerLegAngleInDeg: number = 0.0, + public footAngleInDeg: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StayAlignedPose.createStayAlignedPose(builder, + this.upperLegAngleInDeg, + this.lowerLegAngleInDeg, + this.footAngleInDeg + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.ts b/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.ts new file mode 100644 index 00000000..915e20b2 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.ts @@ -0,0 +1,128 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StayAlignedTracker implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StayAlignedTracker { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStayAlignedTracker(bb:flatbuffers.ByteBuffer, obj?:StayAlignedTracker):StayAlignedTracker { + return (obj || new StayAlignedTracker()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStayAlignedTracker(bb:flatbuffers.ByteBuffer, obj?:StayAlignedTracker):StayAlignedTracker { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StayAlignedTracker()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +yawCorrectionInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +lockedErrorInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +centerErrorInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +neighborErrorInDeg():number { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +locked():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startStayAlignedTracker(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addYawCorrectionInDeg(builder:flatbuffers.Builder, yawCorrectionInDeg:number) { + builder.addFieldFloat32(0, yawCorrectionInDeg, 0.0); +} + +static addLockedErrorInDeg(builder:flatbuffers.Builder, lockedErrorInDeg:number) { + builder.addFieldFloat32(1, lockedErrorInDeg, 0.0); +} + +static addCenterErrorInDeg(builder:flatbuffers.Builder, centerErrorInDeg:number) { + builder.addFieldFloat32(2, centerErrorInDeg, 0.0); +} + +static addNeighborErrorInDeg(builder:flatbuffers.Builder, neighborErrorInDeg:number) { + builder.addFieldFloat32(3, neighborErrorInDeg, 0.0); +} + +static addLocked(builder:flatbuffers.Builder, locked:boolean) { + builder.addFieldInt8(4, +locked, +false); +} + +static endStayAlignedTracker(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStayAlignedTracker(builder:flatbuffers.Builder, yawCorrectionInDeg:number, lockedErrorInDeg:number, centerErrorInDeg:number, neighborErrorInDeg:number, locked:boolean):flatbuffers.Offset { + StayAlignedTracker.startStayAlignedTracker(builder); + StayAlignedTracker.addYawCorrectionInDeg(builder, yawCorrectionInDeg); + StayAlignedTracker.addLockedErrorInDeg(builder, lockedErrorInDeg); + StayAlignedTracker.addCenterErrorInDeg(builder, centerErrorInDeg); + StayAlignedTracker.addNeighborErrorInDeg(builder, neighborErrorInDeg); + StayAlignedTracker.addLocked(builder, locked); + return StayAlignedTracker.endStayAlignedTracker(builder); +} + +unpack(): StayAlignedTrackerT { + return new StayAlignedTrackerT( + this.yawCorrectionInDeg(), + this.lockedErrorInDeg(), + this.centerErrorInDeg(), + this.neighborErrorInDeg(), + this.locked() + ); +} + + +unpackTo(_o: StayAlignedTrackerT): void { + _o.yawCorrectionInDeg = this.yawCorrectionInDeg(); + _o.lockedErrorInDeg = this.lockedErrorInDeg(); + _o.centerErrorInDeg = this.centerErrorInDeg(); + _o.neighborErrorInDeg = this.neighborErrorInDeg(); + _o.locked = this.locked(); +} +} + +export class StayAlignedTrackerT implements flatbuffers.IGeneratedObject { +constructor( + public yawCorrectionInDeg: number = 0.0, + public lockedErrorInDeg: number = 0.0, + public centerErrorInDeg: number = 0.0, + public neighborErrorInDeg: number = 0.0, + public locked: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StayAlignedTracker.createStayAlignedTracker(builder, + this.yawCorrectionInDeg, + this.lockedErrorInDeg, + this.centerErrorInDeg, + this.neighborErrorInDeg, + this.locked + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts index 4db4b26c..d710547d 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts @@ -80,8 +80,13 @@ tps():boolean { return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; } +stayAligned():boolean { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + static startTrackerDataMask(builder:flatbuffers.Builder) { - builder.startObject(11); + builder.startObject(12); } static addInfo(builder:flatbuffers.Builder, info:boolean) { @@ -128,12 +133,16 @@ static addTps(builder:flatbuffers.Builder, tps:boolean) { builder.addFieldInt8(10, +tps, +false); } +static addStayAligned(builder:flatbuffers.Builder, stayAligned:boolean) { + builder.addFieldInt8(11, +stayAligned, +false); +} + static endTrackerDataMask(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } -static createTrackerDataMask(builder:flatbuffers.Builder, info:boolean, status:boolean, rotation:boolean, position:boolean, rawAngularVelocity:boolean, rawAcceleration:boolean, temp:boolean, linearAcceleration:boolean, rotationReferenceAdjusted:boolean, rotationIdentityAdjusted:boolean, tps:boolean):flatbuffers.Offset { +static createTrackerDataMask(builder:flatbuffers.Builder, info:boolean, status:boolean, rotation:boolean, position:boolean, rawAngularVelocity:boolean, rawAcceleration:boolean, temp:boolean, linearAcceleration:boolean, rotationReferenceAdjusted:boolean, rotationIdentityAdjusted:boolean, tps:boolean, stayAligned:boolean):flatbuffers.Offset { TrackerDataMask.startTrackerDataMask(builder); TrackerDataMask.addInfo(builder, info); TrackerDataMask.addStatus(builder, status); @@ -146,6 +155,7 @@ static createTrackerDataMask(builder:flatbuffers.Builder, info:boolean, status:b TrackerDataMask.addRotationReferenceAdjusted(builder, rotationReferenceAdjusted); TrackerDataMask.addRotationIdentityAdjusted(builder, rotationIdentityAdjusted); TrackerDataMask.addTps(builder, tps); + TrackerDataMask.addStayAligned(builder, stayAligned); return TrackerDataMask.endTrackerDataMask(builder); } @@ -161,7 +171,8 @@ unpack(): TrackerDataMaskT { this.linearAcceleration(), this.rotationReferenceAdjusted(), this.rotationIdentityAdjusted(), - this.tps() + this.tps(), + this.stayAligned() ); } @@ -178,6 +189,7 @@ unpackTo(_o: TrackerDataMaskT): void { _o.rotationReferenceAdjusted = this.rotationReferenceAdjusted(); _o.rotationIdentityAdjusted = this.rotationIdentityAdjusted(); _o.tps = this.tps(); + _o.stayAligned = this.stayAligned(); } } @@ -193,7 +205,8 @@ constructor( public linearAcceleration: boolean = false, public rotationReferenceAdjusted: boolean = false, public rotationIdentityAdjusted: boolean = false, - public tps: boolean = false + public tps: boolean = false, + public stayAligned: boolean = false ){} @@ -209,7 +222,8 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { this.linearAcceleration, this.rotationReferenceAdjusted, this.rotationIdentityAdjusted, - this.tps + this.tps, + this.stayAligned ); } } diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts index ec2234b9..7fe46708 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts @@ -2,6 +2,7 @@ import * as flatbuffers from 'flatbuffers'; +import { StayAlignedTracker, StayAlignedTrackerT } from '../../../solarxr-protocol/data-feed/stay-aligned/stay-aligned-tracker.js'; import { TrackerInfo, TrackerInfoT } from '../../../solarxr-protocol/data-feed/tracker/tracker-info.js'; import { Temperature, TemperatureT } from '../../../solarxr-protocol/datatypes/temperature.js'; import { TrackerId, TrackerIdT } from '../../../solarxr-protocol/datatypes/tracker-id.js'; @@ -132,8 +133,16 @@ tps():number|null { return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; } +/** + * Stay Aligned + */ +stayAligned(obj?:StayAlignedTracker):StayAlignedTracker|null { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? (obj || new StayAlignedTracker()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + static startTrackerData(builder:flatbuffers.Builder) { - builder.startObject(12); + builder.startObject(13); } static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { @@ -184,6 +193,10 @@ static addTps(builder:flatbuffers.Builder, tps:number) { builder.addFieldInt16(11, tps, 0); } +static addStayAligned(builder:flatbuffers.Builder, stayAlignedOffset:flatbuffers.Offset) { + builder.addFieldOffset(12, stayAlignedOffset, 0); +} + static endTrackerData(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -203,7 +216,8 @@ unpack(): TrackerDataT { (this.linearAcceleration() !== null ? this.linearAcceleration()!.unpack() : null), (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null), (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null), - this.tps() + this.tps(), + (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null) ); } @@ -221,6 +235,7 @@ unpackTo(_o: TrackerDataT): void { _o.rotationReferenceAdjusted = (this.rotationReferenceAdjusted() !== null ? this.rotationReferenceAdjusted()!.unpack() : null); _o.rotationIdentityAdjusted = (this.rotationIdentityAdjusted() !== null ? this.rotationIdentityAdjusted()!.unpack() : null); _o.tps = this.tps(); + _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); } } @@ -237,13 +252,15 @@ constructor( public linearAcceleration: Vec3fT|null = null, public rotationReferenceAdjusted: QuatT|null = null, public rotationIdentityAdjusted: QuatT|null = null, - public tps: number|null = null + public tps: number|null = null, + public stayAligned: StayAlignedTrackerT|null = null ){} pack(builder:flatbuffers.Builder): flatbuffers.Offset { const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); const info = (this.info !== null ? this.info!.pack(builder) : 0); + const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); TrackerData.startTrackerData(builder); TrackerData.addTrackerId(builder, trackerId); @@ -259,6 +276,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { TrackerData.addRotationIdentityAdjusted(builder, (this.rotationIdentityAdjusted !== null ? this.rotationIdentityAdjusted!.pack(builder) : 0)); if (this.tps !== null) TrackerData.addTps(builder, this.tps); + TrackerData.addStayAligned(builder, stayAligned); return TrackerData.endTrackerData(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts index 496b99cb..e7ca7570 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts @@ -7,11 +7,11 @@ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../sol import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; +import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; -import { YawCorrectionSettings, YawCorrectionSettingsT } from '../../solarxr-protocol/rpc/yaw-correction-settings.js'; import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; @@ -83,9 +83,9 @@ resetsSettings(obj?:ResetsSettings):ResetsSettings|null { return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } -yawCorrectionSettings(obj?:YawCorrectionSettings):YawCorrectionSettings|null { +stayAligned(obj?:StayAlignedSettings):StayAlignedSettings|null { const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? (obj || new YawCorrectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; + return offset ? (obj || new StayAlignedSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } static startChangeSettingsRequest(builder:flatbuffers.Builder) { @@ -132,8 +132,8 @@ static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatb builder.addFieldOffset(9, resetsSettingsOffset, 0); } -static addYawCorrectionSettings(builder:flatbuffers.Builder, yawCorrectionSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(10, yawCorrectionSettingsOffset, 0); +static addStayAligned(builder:flatbuffers.Builder, stayAlignedOffset:flatbuffers.Offset) { + builder.addFieldOffset(10, stayAlignedOffset, 0); } static endChangeSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -154,7 +154,7 @@ unpack(): ChangeSettingsRequestT { (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), - (this.yawCorrectionSettings() !== null ? this.yawCorrectionSettings()!.unpack() : null) + (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null) ); } @@ -170,7 +170,7 @@ unpackTo(_o: ChangeSettingsRequestT): void { _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); - _o.yawCorrectionSettings = (this.yawCorrectionSettings() !== null ? this.yawCorrectionSettings()!.unpack() : null); + _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); } } @@ -186,7 +186,7 @@ constructor( public tapDetectionSettings: TapDetectionSettingsT|null = null, public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, - public yawCorrectionSettings: YawCorrectionSettingsT|null = null + public stayAligned: StayAlignedSettingsT|null = null ){} @@ -201,7 +201,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); - const yawCorrectionSettings = (this.yawCorrectionSettings !== null ? this.yawCorrectionSettings!.pack(builder) : 0); + const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); ChangeSettingsRequest.startChangeSettingsRequest(builder); ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); @@ -214,7 +214,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { ChangeSettingsRequest.addTapDetectionSettings(builder, tapDetectionSettings); ChangeSettingsRequest.addAutoBoneSettings(builder, autoBoneSettings); ChangeSettingsRequest.addResetsSettings(builder, resetsSettings); - ChangeSettingsRequest.addYawCorrectionSettings(builder, yawCorrectionSettings); + ChangeSettingsRequest.addStayAligned(builder, stayAligned); return ChangeSettingsRequest.endChangeSettingsRequest(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.ts new file mode 100644 index 00000000..fc57920e --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.ts @@ -0,0 +1,73 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { StayAlignedRelaxedPose } from '../../solarxr-protocol/rpc/stay-aligned-relaxed-pose.js'; + + +export class DetectStayAlignedRelaxedPoseRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):DetectStayAlignedRelaxedPoseRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDetectStayAlignedRelaxedPoseRequest(bb:flatbuffers.ByteBuffer, obj?:DetectStayAlignedRelaxedPoseRequest):DetectStayAlignedRelaxedPoseRequest { + return (obj || new DetectStayAlignedRelaxedPoseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDetectStayAlignedRelaxedPoseRequest(bb:flatbuffers.ByteBuffer, obj?:DetectStayAlignedRelaxedPoseRequest):DetectStayAlignedRelaxedPoseRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DetectStayAlignedRelaxedPoseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +pose():StayAlignedRelaxedPose { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : StayAlignedRelaxedPose.STANDING; +} + +static startDetectStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addPose(builder:flatbuffers.Builder, pose:StayAlignedRelaxedPose) { + builder.addFieldInt8(0, pose, StayAlignedRelaxedPose.STANDING); +} + +static endDetectStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDetectStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder, pose:StayAlignedRelaxedPose):flatbuffers.Offset { + DetectStayAlignedRelaxedPoseRequest.startDetectStayAlignedRelaxedPoseRequest(builder); + DetectStayAlignedRelaxedPoseRequest.addPose(builder, pose); + return DetectStayAlignedRelaxedPoseRequest.endDetectStayAlignedRelaxedPoseRequest(builder); +} + +unpack(): DetectStayAlignedRelaxedPoseRequestT { + return new DetectStayAlignedRelaxedPoseRequestT( + this.pose() + ); +} + + +unpackTo(_o: DetectStayAlignedRelaxedPoseRequestT): void { + _o.pose = this.pose(); +} +} + +export class DetectStayAlignedRelaxedPoseRequestT implements flatbuffers.IGeneratedObject { +constructor( + public pose: StayAlignedRelaxedPose = StayAlignedRelaxedPose.STANDING +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return DetectStayAlignedRelaxedPoseRequest.createDetectStayAlignedRelaxedPoseRequest(builder, + this.pose + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/enable-stay-aligned-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/enable-stay-aligned-request.ts new file mode 100644 index 00000000..21a9b82e --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/enable-stay-aligned-request.ts @@ -0,0 +1,72 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class EnableStayAlignedRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):EnableStayAlignedRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsEnableStayAlignedRequest(bb:flatbuffers.ByteBuffer, obj?:EnableStayAlignedRequest):EnableStayAlignedRequest { + return (obj || new EnableStayAlignedRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsEnableStayAlignedRequest(bb:flatbuffers.ByteBuffer, obj?:EnableStayAlignedRequest):EnableStayAlignedRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new EnableStayAlignedRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +enable():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startEnableStayAlignedRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addEnable(builder:flatbuffers.Builder, enable:boolean) { + builder.addFieldInt8(0, +enable, +false); +} + +static endEnableStayAlignedRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createEnableStayAlignedRequest(builder:flatbuffers.Builder, enable:boolean):flatbuffers.Offset { + EnableStayAlignedRequest.startEnableStayAlignedRequest(builder); + EnableStayAlignedRequest.addEnable(builder, enable); + return EnableStayAlignedRequest.endEnableStayAlignedRequest(builder); +} + +unpack(): EnableStayAlignedRequestT { + return new EnableStayAlignedRequestT( + this.enable() + ); +} + + +unpackTo(_o: EnableStayAlignedRequestT): void { + _o.enable = this.enable(); +} +} + +export class EnableStayAlignedRequestT implements flatbuffers.IGeneratedObject { +constructor( + public enable: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return EnableStayAlignedRequest.createEnableStayAlignedRequest(builder, + this.enable + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.ts new file mode 100644 index 00000000..c920dce0 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.ts @@ -0,0 +1,73 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { StayAlignedRelaxedPose } from '../../solarxr-protocol/rpc/stay-aligned-relaxed-pose.js'; + + +export class ResetStayAlignedRelaxedPoseRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ResetStayAlignedRelaxedPoseRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsResetStayAlignedRelaxedPoseRequest(bb:flatbuffers.ByteBuffer, obj?:ResetStayAlignedRelaxedPoseRequest):ResetStayAlignedRelaxedPoseRequest { + return (obj || new ResetStayAlignedRelaxedPoseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsResetStayAlignedRelaxedPoseRequest(bb:flatbuffers.ByteBuffer, obj?:ResetStayAlignedRelaxedPoseRequest):ResetStayAlignedRelaxedPoseRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ResetStayAlignedRelaxedPoseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +pose():StayAlignedRelaxedPose { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : StayAlignedRelaxedPose.STANDING; +} + +static startResetStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addPose(builder:flatbuffers.Builder, pose:StayAlignedRelaxedPose) { + builder.addFieldInt8(0, pose, StayAlignedRelaxedPose.STANDING); +} + +static endResetStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createResetStayAlignedRelaxedPoseRequest(builder:flatbuffers.Builder, pose:StayAlignedRelaxedPose):flatbuffers.Offset { + ResetStayAlignedRelaxedPoseRequest.startResetStayAlignedRelaxedPoseRequest(builder); + ResetStayAlignedRelaxedPoseRequest.addPose(builder, pose); + return ResetStayAlignedRelaxedPoseRequest.endResetStayAlignedRelaxedPoseRequest(builder); +} + +unpack(): ResetStayAlignedRelaxedPoseRequestT { + return new ResetStayAlignedRelaxedPoseRequestT( + this.pose() + ); +} + + +unpackTo(_o: ResetStayAlignedRelaxedPoseRequestT): void { + _o.pose = this.pose(); +} +} + +export class ResetStayAlignedRelaxedPoseRequestT implements flatbuffers.IGeneratedObject { +constructor( + public pose: StayAlignedRelaxedPose = StayAlignedRelaxedPose.STANDING +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ResetStayAlignedRelaxedPoseRequest.createResetStayAlignedRelaxedPoseRequest(builder, + this.pose + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts index e4b5c6f5..cb449922 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -17,6 +17,8 @@ import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../.. import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { DetectStayAlignedRelaxedPoseRequest, DetectStayAlignedRelaxedPoseRequestT } from '../../solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.js'; +import { EnableStayAlignedRequest, EnableStayAlignedRequestT } from '../../solarxr-protocol/rpc/enable-stay-aligned-request.js'; import { FirmwareUpdateRequest, FirmwareUpdateRequestT } from '../../solarxr-protocol/rpc/firmware-update-request.js'; import { FirmwareUpdateStatusResponse, FirmwareUpdateStatusResponseT } from '../../solarxr-protocol/rpc/firmware-update-status-response.js'; import { FirmwareUpdateStopQueuesRequest, FirmwareUpdateStopQueuesRequestT } from '../../solarxr-protocol/rpc/firmware-update-stop-queues-request.js'; @@ -39,6 +41,7 @@ import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/re import { RecordBVHStatusRequest, RecordBVHStatusRequestT } from '../../solarxr-protocol/rpc/record-bvhstatus-request.js'; import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; +import { ResetStayAlignedRelaxedPoseRequest, ResetStayAlignedRelaxedPoseRequestT } from '../../solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.js'; import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message.js'; import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; @@ -167,7 +170,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|WifiProvisioningStatusResponseT|null = null + public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|DetectStayAlignedRelaxedPoseRequestT|EnableStayAlignedRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|ResetStayAlignedRelaxedPoseRequestT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|WifiProvisioningStatusResponseT|null = null ){} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts index 611b1a84..49708f49 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -14,6 +14,8 @@ import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../.. import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { DetectStayAlignedRelaxedPoseRequest, DetectStayAlignedRelaxedPoseRequestT } from '../../solarxr-protocol/rpc/detect-stay-aligned-relaxed-pose-request.js'; +import { EnableStayAlignedRequest, EnableStayAlignedRequestT } from '../../solarxr-protocol/rpc/enable-stay-aligned-request.js'; import { FirmwareUpdateRequest, FirmwareUpdateRequestT } from '../../solarxr-protocol/rpc/firmware-update-request.js'; import { FirmwareUpdateStatusResponse, FirmwareUpdateStatusResponseT } from '../../solarxr-protocol/rpc/firmware-update-status-response.js'; import { FirmwareUpdateStopQueuesRequest, FirmwareUpdateStopQueuesRequestT } from '../../solarxr-protocol/rpc/firmware-update-stop-queues-request.js'; @@ -36,6 +38,7 @@ import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/re import { RecordBVHStatusRequest, RecordBVHStatusRequestT } from '../../solarxr-protocol/rpc/record-bvhstatus-request.js'; import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request.js'; import { ResetResponse, ResetResponseT } from '../../solarxr-protocol/rpc/reset-response.js'; +import { ResetStayAlignedRelaxedPoseRequest, ResetStayAlignedRelaxedPoseRequestT } from '../../solarxr-protocol/rpc/reset-stay-aligned-relaxed-pose-request.js'; import { SaveFileNotification, SaveFileNotificationT } from '../../solarxr-protocol/rpc/save-file-notification.js'; import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-protocol/rpc/serial-devices-request.js'; import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; @@ -137,13 +140,16 @@ export enum RpcMessage { ChangeMagToggleRequest = 64, RecordBVHStatusRequest = 65, VRCConfigStateRequest = 66, - VRCConfigStateChangeResponse = 67 + VRCConfigStateChangeResponse = 67, + EnableStayAlignedRequest = 68, + DetectStayAlignedRelaxedPoseRequest = 69, + ResetStayAlignedRelaxedPoseRequest = 70 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { + accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -213,15 +219,18 @@ export function unionToRpcMessage( case 'RecordBVHStatusRequest': return accessor(new RecordBVHStatusRequest())! as RecordBVHStatusRequest; case 'VRCConfigStateRequest': return accessor(new VRCConfigStateRequest())! as VRCConfigStateRequest; case 'VRCConfigStateChangeResponse': return accessor(new VRCConfigStateChangeResponse())! as VRCConfigStateChangeResponse; + case 'EnableStayAlignedRequest': return accessor(new EnableStayAlignedRequest())! as EnableStayAlignedRequest; + case 'DetectStayAlignedRelaxedPoseRequest': return accessor(new DetectStayAlignedRelaxedPoseRequest())! as DetectStayAlignedRelaxedPoseRequest; + case 'ResetStayAlignedRelaxedPoseRequest': return accessor(new ResetStayAlignedRelaxedPoseRequest())! as ResetStayAlignedRelaxedPoseRequest; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, index: number -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -291,6 +300,9 @@ export function unionListToRpcMessage( case 'RecordBVHStatusRequest': return accessor(index, new RecordBVHStatusRequest())! as RecordBVHStatusRequest; case 'VRCConfigStateRequest': return accessor(index, new VRCConfigStateRequest())! as VRCConfigStateRequest; case 'VRCConfigStateChangeResponse': return accessor(index, new VRCConfigStateChangeResponse())! as VRCConfigStateChangeResponse; + case 'EnableStayAlignedRequest': return accessor(index, new EnableStayAlignedRequest())! as EnableStayAlignedRequest; + case 'DetectStayAlignedRelaxedPoseRequest': return accessor(index, new DetectStayAlignedRelaxedPoseRequest())! as DetectStayAlignedRelaxedPoseRequest; + case 'ResetStayAlignedRelaxedPoseRequest': return accessor(index, new ResetStayAlignedRelaxedPoseRequest())! as ResetStayAlignedRelaxedPoseRequest; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts index e90ab9c8..29156104 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts @@ -7,11 +7,11 @@ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../sol import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; +import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting.js'; import { TapDetectionSettings, TapDetectionSettingsT } from '../../solarxr-protocol/rpc/tap-detection-settings.js'; import { VMCOSCSettings, VMCOSCSettingsT } from '../../solarxr-protocol/rpc/vmcoscsettings.js'; import { VRCOSCSettings, VRCOSCSettingsT } from '../../solarxr-protocol/rpc/vrcoscsettings.js'; -import { YawCorrectionSettings, YawCorrectionSettingsT } from '../../solarxr-protocol/rpc/yaw-correction-settings.js'; import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings.js'; @@ -83,9 +83,9 @@ resetsSettings(obj?:ResetsSettings):ResetsSettings|null { return offset ? (obj || new ResetsSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } -yawCorrectionSettings(obj?:YawCorrectionSettings):YawCorrectionSettings|null { +stayAligned(obj?:StayAlignedSettings):StayAlignedSettings|null { const offset = this.bb!.__offset(this.bb_pos, 24); - return offset ? (obj || new YawCorrectionSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; + return offset ? (obj || new StayAlignedSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } static startSettingsResponse(builder:flatbuffers.Builder) { @@ -132,8 +132,8 @@ static addResetsSettings(builder:flatbuffers.Builder, resetsSettingsOffset:flatb builder.addFieldOffset(9, resetsSettingsOffset, 0); } -static addYawCorrectionSettings(builder:flatbuffers.Builder, yawCorrectionSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(10, yawCorrectionSettingsOffset, 0); +static addStayAligned(builder:flatbuffers.Builder, stayAlignedOffset:flatbuffers.Offset) { + builder.addFieldOffset(10, stayAlignedOffset, 0); } static endSettingsResponse(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -154,7 +154,7 @@ unpack(): SettingsResponseT { (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null), (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), - (this.yawCorrectionSettings() !== null ? this.yawCorrectionSettings()!.unpack() : null) + (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null) ); } @@ -170,7 +170,7 @@ unpackTo(_o: SettingsResponseT): void { _o.tapDetectionSettings = (this.tapDetectionSettings() !== null ? this.tapDetectionSettings()!.unpack() : null); _o.autoBoneSettings = (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null); _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); - _o.yawCorrectionSettings = (this.yawCorrectionSettings() !== null ? this.yawCorrectionSettings()!.unpack() : null); + _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); } } @@ -186,7 +186,7 @@ constructor( public tapDetectionSettings: TapDetectionSettingsT|null = null, public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, - public yawCorrectionSettings: YawCorrectionSettingsT|null = null + public stayAligned: StayAlignedSettingsT|null = null ){} @@ -201,7 +201,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const tapDetectionSettings = (this.tapDetectionSettings !== null ? this.tapDetectionSettings!.pack(builder) : 0); const autoBoneSettings = (this.autoBoneSettings !== null ? this.autoBoneSettings!.pack(builder) : 0); const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); - const yawCorrectionSettings = (this.yawCorrectionSettings !== null ? this.yawCorrectionSettings!.pack(builder) : 0); + const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); SettingsResponse.startSettingsResponse(builder); SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); @@ -214,7 +214,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { SettingsResponse.addTapDetectionSettings(builder, tapDetectionSettings); SettingsResponse.addAutoBoneSettings(builder, autoBoneSettings); SettingsResponse.addResetsSettings(builder, resetsSettings); - SettingsResponse.addYawCorrectionSettings(builder, yawCorrectionSettings); + SettingsResponse.addStayAligned(builder, stayAligned); return SettingsResponse.endSettingsResponse(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-relaxed-pose.ts b/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-relaxed-pose.ts new file mode 100644 index 00000000..bbbd1600 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-relaxed-pose.ts @@ -0,0 +1,7 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +export enum StayAlignedRelaxedPose { + STANDING = 0, + SITTING = 1, + FLAT = 2 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-settings.ts new file mode 100644 index 00000000..67b30b64 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/stay-aligned-settings.ts @@ -0,0 +1,268 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class StayAlignedSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):StayAlignedSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStayAlignedSettings(bb:flatbuffers.ByteBuffer, obj?:StayAlignedSettings):StayAlignedSettings { + return (obj || new StayAlignedSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStayAlignedSettings(bb:flatbuffers.ByteBuffer, obj?:StayAlignedSettings):StayAlignedSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StayAlignedSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +enabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +extraYawCorrection():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +hideYawCorrection():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +standingEnabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +standingUpperLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +standingLowerLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +standingFootAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +sittingEnabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +sittingUpperLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 20); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +sittingLowerLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 22); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +sittingFootAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +flatEnabled():boolean { + const offset = this.bb!.__offset(this.bb_pos, 26); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +flatUpperLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +flatLowerLegAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 30); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +flatFootAngle():number { + const offset = this.bb!.__offset(this.bb_pos, 32); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startStayAlignedSettings(builder:flatbuffers.Builder) { + builder.startObject(15); +} + +static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { + builder.addFieldInt8(0, +enabled, +false); +} + +static addExtraYawCorrection(builder:flatbuffers.Builder, extraYawCorrection:boolean) { + builder.addFieldInt8(1, +extraYawCorrection, +false); +} + +static addHideYawCorrection(builder:flatbuffers.Builder, hideYawCorrection:boolean) { + builder.addFieldInt8(2, +hideYawCorrection, +false); +} + +static addStandingEnabled(builder:flatbuffers.Builder, standingEnabled:boolean) { + builder.addFieldInt8(3, +standingEnabled, +false); +} + +static addStandingUpperLegAngle(builder:flatbuffers.Builder, standingUpperLegAngle:number) { + builder.addFieldFloat32(4, standingUpperLegAngle, 0.0); +} + +static addStandingLowerLegAngle(builder:flatbuffers.Builder, standingLowerLegAngle:number) { + builder.addFieldFloat32(5, standingLowerLegAngle, 0.0); +} + +static addStandingFootAngle(builder:flatbuffers.Builder, standingFootAngle:number) { + builder.addFieldFloat32(6, standingFootAngle, 0.0); +} + +static addSittingEnabled(builder:flatbuffers.Builder, sittingEnabled:boolean) { + builder.addFieldInt8(7, +sittingEnabled, +false); +} + +static addSittingUpperLegAngle(builder:flatbuffers.Builder, sittingUpperLegAngle:number) { + builder.addFieldFloat32(8, sittingUpperLegAngle, 0.0); +} + +static addSittingLowerLegAngle(builder:flatbuffers.Builder, sittingLowerLegAngle:number) { + builder.addFieldFloat32(9, sittingLowerLegAngle, 0.0); +} + +static addSittingFootAngle(builder:flatbuffers.Builder, sittingFootAngle:number) { + builder.addFieldFloat32(10, sittingFootAngle, 0.0); +} + +static addFlatEnabled(builder:flatbuffers.Builder, flatEnabled:boolean) { + builder.addFieldInt8(11, +flatEnabled, +false); +} + +static addFlatUpperLegAngle(builder:flatbuffers.Builder, flatUpperLegAngle:number) { + builder.addFieldFloat32(12, flatUpperLegAngle, 0.0); +} + +static addFlatLowerLegAngle(builder:flatbuffers.Builder, flatLowerLegAngle:number) { + builder.addFieldFloat32(13, flatLowerLegAngle, 0.0); +} + +static addFlatFootAngle(builder:flatbuffers.Builder, flatFootAngle:number) { + builder.addFieldFloat32(14, flatFootAngle, 0.0); +} + +static endStayAlignedSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStayAlignedSettings(builder:flatbuffers.Builder, enabled:boolean, extraYawCorrection:boolean, hideYawCorrection:boolean, standingEnabled:boolean, standingUpperLegAngle:number, standingLowerLegAngle:number, standingFootAngle:number, sittingEnabled:boolean, sittingUpperLegAngle:number, sittingLowerLegAngle:number, sittingFootAngle:number, flatEnabled:boolean, flatUpperLegAngle:number, flatLowerLegAngle:number, flatFootAngle:number):flatbuffers.Offset { + StayAlignedSettings.startStayAlignedSettings(builder); + StayAlignedSettings.addEnabled(builder, enabled); + StayAlignedSettings.addExtraYawCorrection(builder, extraYawCorrection); + StayAlignedSettings.addHideYawCorrection(builder, hideYawCorrection); + StayAlignedSettings.addStandingEnabled(builder, standingEnabled); + StayAlignedSettings.addStandingUpperLegAngle(builder, standingUpperLegAngle); + StayAlignedSettings.addStandingLowerLegAngle(builder, standingLowerLegAngle); + StayAlignedSettings.addStandingFootAngle(builder, standingFootAngle); + StayAlignedSettings.addSittingEnabled(builder, sittingEnabled); + StayAlignedSettings.addSittingUpperLegAngle(builder, sittingUpperLegAngle); + StayAlignedSettings.addSittingLowerLegAngle(builder, sittingLowerLegAngle); + StayAlignedSettings.addSittingFootAngle(builder, sittingFootAngle); + StayAlignedSettings.addFlatEnabled(builder, flatEnabled); + StayAlignedSettings.addFlatUpperLegAngle(builder, flatUpperLegAngle); + StayAlignedSettings.addFlatLowerLegAngle(builder, flatLowerLegAngle); + StayAlignedSettings.addFlatFootAngle(builder, flatFootAngle); + return StayAlignedSettings.endStayAlignedSettings(builder); +} + +unpack(): StayAlignedSettingsT { + return new StayAlignedSettingsT( + this.enabled(), + this.extraYawCorrection(), + this.hideYawCorrection(), + this.standingEnabled(), + this.standingUpperLegAngle(), + this.standingLowerLegAngle(), + this.standingFootAngle(), + this.sittingEnabled(), + this.sittingUpperLegAngle(), + this.sittingLowerLegAngle(), + this.sittingFootAngle(), + this.flatEnabled(), + this.flatUpperLegAngle(), + this.flatLowerLegAngle(), + this.flatFootAngle() + ); +} + + +unpackTo(_o: StayAlignedSettingsT): void { + _o.enabled = this.enabled(); + _o.extraYawCorrection = this.extraYawCorrection(); + _o.hideYawCorrection = this.hideYawCorrection(); + _o.standingEnabled = this.standingEnabled(); + _o.standingUpperLegAngle = this.standingUpperLegAngle(); + _o.standingLowerLegAngle = this.standingLowerLegAngle(); + _o.standingFootAngle = this.standingFootAngle(); + _o.sittingEnabled = this.sittingEnabled(); + _o.sittingUpperLegAngle = this.sittingUpperLegAngle(); + _o.sittingLowerLegAngle = this.sittingLowerLegAngle(); + _o.sittingFootAngle = this.sittingFootAngle(); + _o.flatEnabled = this.flatEnabled(); + _o.flatUpperLegAngle = this.flatUpperLegAngle(); + _o.flatLowerLegAngle = this.flatLowerLegAngle(); + _o.flatFootAngle = this.flatFootAngle(); +} +} + +export class StayAlignedSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public enabled: boolean = false, + public extraYawCorrection: boolean = false, + public hideYawCorrection: boolean = false, + public standingEnabled: boolean = false, + public standingUpperLegAngle: number = 0.0, + public standingLowerLegAngle: number = 0.0, + public standingFootAngle: number = 0.0, + public sittingEnabled: boolean = false, + public sittingUpperLegAngle: number = 0.0, + public sittingLowerLegAngle: number = 0.0, + public sittingFootAngle: number = 0.0, + public flatEnabled: boolean = false, + public flatUpperLegAngle: number = 0.0, + public flatLowerLegAngle: number = 0.0, + public flatFootAngle: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return StayAlignedSettings.createStayAlignedSettings(builder, + this.enabled, + this.extraYawCorrection, + this.hideYawCorrection, + this.standingEnabled, + this.standingUpperLegAngle, + this.standingLowerLegAngle, + this.standingFootAngle, + this.sittingEnabled, + this.sittingUpperLegAngle, + this.sittingLowerLegAngle, + this.sittingFootAngle, + this.flatEnabled, + this.flatUpperLegAngle, + this.flatLowerLegAngle, + this.flatFootAngle + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/yaw-correction-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/yaw-correction-settings.ts deleted file mode 100644 index 11338a84..00000000 --- a/protocol/typescript/src/solarxr-protocol/rpc/yaw-correction-settings.ts +++ /dev/null @@ -1,86 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class YawCorrectionSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):YawCorrectionSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsYawCorrectionSettings(bb:flatbuffers.ByteBuffer, obj?:YawCorrectionSettings):YawCorrectionSettings { - return (obj || new YawCorrectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsYawCorrectionSettings(bb:flatbuffers.ByteBuffer, obj?:YawCorrectionSettings):YawCorrectionSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new YawCorrectionSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -enabled():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -amountInDegPerSec():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startYawCorrectionSettings(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addEnabled(builder:flatbuffers.Builder, enabled:boolean) { - builder.addFieldInt8(0, +enabled, +false); -} - -static addAmountInDegPerSec(builder:flatbuffers.Builder, amountInDegPerSec:number) { - builder.addFieldFloat32(1, amountInDegPerSec, 0.0); -} - -static endYawCorrectionSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createYawCorrectionSettings(builder:flatbuffers.Builder, enabled:boolean, amountInDegPerSec:number):flatbuffers.Offset { - YawCorrectionSettings.startYawCorrectionSettings(builder); - YawCorrectionSettings.addEnabled(builder, enabled); - YawCorrectionSettings.addAmountInDegPerSec(builder, amountInDegPerSec); - return YawCorrectionSettings.endYawCorrectionSettings(builder); -} - -unpack(): YawCorrectionSettingsT { - return new YawCorrectionSettingsT( - this.enabled(), - this.amountInDegPerSec() - ); -} - - -unpackTo(_o: YawCorrectionSettingsT): void { - _o.enabled = this.enabled(); - _o.amountInDegPerSec = this.amountInDegPerSec(); -} -} - -export class YawCorrectionSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public enabled: boolean = false, - public amountInDegPerSec: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return YawCorrectionSettings.createYawCorrectionSettings(builder, - this.enabled, - this.amountInDegPerSec - ); -} -} diff --git a/schema/data_feed/data_feed.fbs b/schema/data_feed/data_feed.fbs index 63c9c49a..4bac251d 100644 --- a/schema/data_feed/data_feed.fbs +++ b/schema/data_feed/data_feed.fbs @@ -27,6 +27,7 @@ include "datatypes/datatypes.fbs"; include "tracker.fbs"; include "device_data.fbs"; include "bone.fbs"; +include "stay_aligned.fbs"; namespace solarxr_protocol.data_feed; @@ -79,6 +80,7 @@ table DataFeedUpdate { synthetic_trackers: [solarxr_protocol.data_feed.tracker.TrackerData]; /// This must represent a set, where there is no more than one bone for a `BodyPart`. bones: [solarxr_protocol.data_feed.Bone]; + stay_aligned_pose: solarxr_protocol.data_feed.stay_aligned.StayAlignedPose; } @@ -91,4 +93,5 @@ table DataFeedConfig { data_mask: solarxr_protocol.data_feed.device_data.DeviceDataMask; synthetic_trackers_mask: solarxr_protocol.data_feed.tracker.TrackerDataMask; bone_mask: bool; // TODO: decide if we want to make this a vec of `BodyPart` + stay_aligned_pose_mask: bool; } diff --git a/schema/data_feed/stay_aligned.fbs b/schema/data_feed/stay_aligned.fbs new file mode 100644 index 00000000..94ef5cc6 --- /dev/null +++ b/schema/data_feed/stay_aligned.fbs @@ -0,0 +1,15 @@ +namespace solarxr_protocol.data_feed.stay_aligned; + +table StayAlignedPose { + upper_leg_angle_in_deg: float; + lower_leg_angle_in_deg: float; + foot_angle_in_deg: float; +} + +table StayAlignedTracker { + yaw_correction_in_deg: float; + locked_error_in_deg: float; + center_error_in_deg: float; + neighbor_error_in_deg: float; + locked: bool; +} diff --git a/schema/data_feed/tracker.fbs b/schema/data_feed/tracker.fbs index 193e4590..2f3af702 100644 --- a/schema/data_feed/tracker.fbs +++ b/schema/data_feed/tracker.fbs @@ -1,5 +1,6 @@ include "datatypes/math.fbs"; include "datatypes/datatypes.fbs"; +include "stay_aligned.fbs"; namespace solarxr_protocol.data_feed.tracker; @@ -48,6 +49,9 @@ table TrackerData { /// Data ticks per second, processed by SlimeVR server tps: uint16 = null; + + /// Stay Aligned + stay_aligned: solarxr_protocol.data_feed.stay_aligned.StayAlignedTracker; } /// A mask of the different components in `TrackerComponent` @@ -63,6 +67,7 @@ table TrackerDataMask { rotation_reference_adjusted: bool; rotation_identity_adjusted: bool; tps: bool; + stay_aligned: bool; } /// Static description of a tracker @@ -102,7 +107,7 @@ table TrackerInfo { is_hmd: bool; magnetometer: solarxr_protocol.datatypes.MagnetometerStatus; - + /// Indicates what type of data the tracker sends (note: it always ends up being rotation in the end) data_support: solarxr_protocol.datatypes.hardware_info.TrackerDataType; } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 57d1f816..313dde9c 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -79,6 +79,9 @@ union RpcMessage { RecordBVHStatusRequest, VRCConfigStateRequest, VRCConfigStateChangeResponse, + EnableStayAlignedRequest, + DetectStayAlignedRelaxedPoseRequest, + ResetStayAlignedRelaxedPoseRequest, } table RpcMessageHeader { @@ -142,7 +145,7 @@ table SettingsResponse { tap_detection_settings: TapDetectionSettings; auto_bone_settings: AutoBoneSettings; resets_settings: ResetsSettings; - yaw_correction_settings: YawCorrectionSettings; + stay_aligned: StayAlignedSettings; } table ChangeSettingsRequest { @@ -156,7 +159,7 @@ table ChangeSettingsRequest { tap_detection_settings: TapDetectionSettings; auto_bone_settings: AutoBoneSettings; resets_settings: ResetsSettings; - yaw_correction_settings: YawCorrectionSettings; + stay_aligned: StayAlignedSettings; } table SteamVRTrackersSetting { @@ -274,9 +277,22 @@ table ResetsSettings { reset_hmd_pitch: bool; } -table YawCorrectionSettings { +table StayAlignedSettings { enabled: bool; - amountInDegPerSec: float32; + extraYawCorrection: bool; + hideYawCorrection: bool; + standingEnabled: bool; + standingUpperLegAngle: float32; + standingLowerLegAngle: float32; + standingFootAngle: float32; + sittingEnabled: bool; + sittingUpperLegAngle: float32; + sittingLowerLegAngle: float32; + sittingFootAngle: float32; + flatEnabled: bool; + flatUpperLegAngle: float32; + flatLowerLegAngle: float32; + flatFootAngle: float32; } /// See TapDetectionSettings::setup_mode @@ -849,3 +865,21 @@ table VRCConfigStateChangeResponse { state: VRCConfigValues; recommended: VRCConfigRecommendedValues; } + +table EnableStayAlignedRequest { + enable: bool; +} + +enum StayAlignedRelaxedPose: uint8 { + STANDING = 0, + SITTING = 1, + FLAT = 2 +} + +table DetectStayAlignedRelaxedPoseRequest { + pose: StayAlignedRelaxedPose; +} + +table ResetStayAlignedRelaxedPoseRequest { + pose: StayAlignedRelaxedPose; +}