// @file sns_tilt.proto // // Defines message types for the Tilt Sensor. // // Copyright (c) 2017-2018 Qualcomm Technologies, Inc. // All Rights Reserved. // Confidential and Proprietary - Qualcomm Technologies, Inc. syntax = "proto2"; import "nanopb.proto"; import "sns_std_sensor.proto"; // The Tilt Sensor looks for a change in angle of a gravity vector from an // anchor vector. // // The initial anchor vector is based on an average of one second of // accel data after initial activation. // // The gravity vector is calculated based on an average of two seconds of // accel data. // // The anchor vector is reset to the current gravity vector each time the // Tilt event is generated. // There is only one anchor vector shared amongst all clients. // // The Tilt event is generated when the current gravity vector is 35 degrees // or more from the anchor vector. // Tilt Sensor Attribute Requirements: // SNS_STD_SENSOR_ATTRID_TYPE: "tilt" // SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE // Stream Requests: // - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is used to enable the sensor // Message IDs for Tilt Sensor enum sns_tilt_msgid { option (nanopb_enumopt).long_names = false; SNS_TILT_MSGID_SNS_TILT_EVENT = 774; } // Stream events: // // A NULL message with message ID SNS_TILT_MSGID_SNS_TILT_EVENT is used to // publish tilt event // // Tilt does not publish configuration events.