Skip to content

Commit

Permalink
[sensorfw] Fix MER#983 revert accel x & y values.
Browse files Browse the repository at this point in the history
They used to be opposite to what they are. This fixes that and
the corresponding orientation.
  • Loading branch information
lpotter committed May 8, 2015
1 parent 9f94ae7 commit d314e8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/sensord-hybris.conf
Expand Up @@ -12,7 +12,7 @@ transformation_matrix = "-1,0,0,0,1,0,0,0,1"
needs_calibration = 0

[accelerometer]
transformation_matrix = "-1,0,0,0,-1,0,0,0,1"
transformation_matrix = "1,0,0,0,1,0,0,0,1"


#[magnetometer]
Expand Down
4 changes: 2 additions & 2 deletions filters/orientationinterpreter/orientationinterpreter.cpp
Expand Up @@ -135,7 +135,7 @@ int OrientationInterpreter::orientationCheck(const AccelerationData &data, Orie
PoseData OrientationInterpreter::rotateToPortrait(int rotation)
{
PoseData newTopEdge = PoseData::Undefined;
newTopEdge.orientation_ = (rotation >= 0) ? PoseData::BottomUp : PoseData::BottomDown;
newTopEdge.orientation_ = (rotation <= 0) ? PoseData::BottomUp : PoseData::BottomDown;

// Some threshold to switching between portrait modes
if (topEdge.orientation_ == PoseData::BottomUp || topEdge.orientation_ == PoseData::BottomDown)
Expand All @@ -153,7 +153,7 @@ PoseData OrientationInterpreter::rotateToLandscape(int rotation)
{

PoseData newTopEdge = PoseData::Undefined;
newTopEdge.orientation_ = (rotation >= 0) ? PoseData::LeftUp : PoseData::RightUp;
newTopEdge.orientation_ = (rotation <= 0) ? PoseData::LeftUp : PoseData::RightUp;
// Some threshold to switching between landscape modes
if (topEdge.orientation_ == PoseData::LeftUp || topEdge.orientation_ == PoseData::RightUp)
{
Expand Down

0 comments on commit d314e8f

Please sign in to comment.