blob: d57f922f0baddcecfb52597f354ed5623fa4e37e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// @file sns_device_orient.proto
//
// Defines the API for the Device Orientation sensors
//
// 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";
// A device orientation sensor reports the current orientation of the device.
//
// Minor or transient rotations should not cause a new event to be reported,
// and this sensor should only be implemented with the help of an accelerometer.
// Moving the device to an orientation where the Z axis is vertical (either up
// or down) should not cause a new event to be reported.
// ## Device Orientation sensor attributes:
// SNS_STD_SENSOR_ATTRID_TYPE is "device_orient"
//
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
// No configuration is available for this sensor.
//
// ## Event Message: SNS_DEVICE_ORIENT_MSGID_SNS_DEVICE_ORIENT_EVENT
// Message IDs for Device Orientation Sensor
enum sns_device_orient_msgid {
option (nanopb_enumopt).long_names = false;
SNS_DEVICE_ORIENT_MSGID_SNS_DEVICE_ORIENT_EVENT = 776;
}
enum sns_device_orient_event_type
{
option (nanopb_enumopt).long_names = false;
SNS_DEVICE_ORIENT_EVENT_TYPE_UNKNOWN = -1;
// Device is in default orientation (Y axis is vertical and points up)
SNS_DEVICE_ORIENT_EVENT_TYPE_DEFAULT = 0;
// Device is rotated 90 degrees counter-clockwise from default orientation
// (X axis is vertical and points up)
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_1 = 1;
// Device is rotated 180 degrees from default orientation (Y axis is
// vertical and points down)
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_2 = 2;
// Device is rotated 90 degrees clockwise from default orientation (X axis
// is vertical and points down)
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_3 = 3;
}
message sns_device_orient_event
{
// Detected state
required sns_device_orient_event_type state = 1;
}
|