Rotation fix (#432)

This commit is contained in:
Ben V. Brown
2019-01-26 19:42:33 +10:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -472,10 +472,10 @@ static void settings_setDisplayRotation(void) {
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
switch (systemSettings.OrientationMode) {
case 0:
OLED::setRotation(true);
OLED::setRotation(false);
break;
case 1:
OLED::setRotation(false);
OLED::setRotation(true);
break;
case 2:
// do nothing on auto

View File

@@ -770,7 +770,7 @@ void startGUITask(void const *argument __unused) {
bool buttonLockout = false;
bool tempOnDisplay = false;
getTipRawTemp(1); // reset filter
OLED::setRotation(!(systemSettings.OrientationMode & 1));
OLED::setRotation(systemSettings.OrientationMode & 1);
uint32_t ticks = xTaskGetTickCount();
ticks += 400; // 4 seconds from now
while (xTaskGetTickCount() < ticks) {
@@ -1056,7 +1056,7 @@ void startMOVTask(void const *argument __unused) {
osDelay(250); // wait for accelerometer to stabilize
#endif
OLED::setRotation(!(systemSettings.OrientationMode & 1));
OLED::setRotation(systemSettings.OrientationMode & 1);
lastMovementTime = 0;
int16_t datax[MOVFilter] = { 0 };
int16_t datay[MOVFilter] = { 0 };