diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-07-11 17:31:43 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-07-11 17:31:43 +0300 |
commit | 89b03ee1a4f491ae36b038ebfd936fa85edde6ce (patch) | |
tree | b52e2eef2ff2de0af3b57192fc27afdde782fc07 /src/Accelerometers | |
parent | 0574af940f5d0fac2facf667c56868b3b3863390 (diff) |
Bug fix to reporting accelerometer orientation
Diffstat (limited to 'src/Accelerometers')
-rw-r--r-- | src/Accelerometers/Accelerometers.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Accelerometers/Accelerometers.cpp b/src/Accelerometers/Accelerometers.cpp index 0ef1eeaa..7cbff6a0 100644 --- a/src/Accelerometers/Accelerometers.cpp +++ b/src/Accelerometers/Accelerometers.cpp @@ -325,7 +325,12 @@ GCodeResult Accelerometers::ConfigureAccelerometer(GCodeBuffer& gb, const String if (gb.Seen('I')) { seen = true; - if (!TranslateOrientation(gb.GetUIValue())) + const uint32_t localOrientation = gb.GetUIValue(); + if (TranslateOrientation(localOrientation)) + { + orientation = localOrientation; + } + else { reply.copy("Bad orientation parameter"); return GCodeResult::error; |