Rotation fix
This commit is contained in:
@@ -472,10 +472,10 @@ static void settings_setDisplayRotation(void) {
|
|||||||
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
||||||
switch (systemSettings.OrientationMode) {
|
switch (systemSettings.OrientationMode) {
|
||||||
case 0:
|
case 0:
|
||||||
OLED::setRotation(true);
|
OLED::setRotation(false);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
OLED::setRotation(false);
|
OLED::setRotation(true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// do nothing on auto
|
// do nothing on auto
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ void startGUITask(void const *argument __unused) {
|
|||||||
bool buttonLockout = false;
|
bool buttonLockout = false;
|
||||||
bool tempOnDisplay = false;
|
bool tempOnDisplay = false;
|
||||||
getTipRawTemp(1); // reset filter
|
getTipRawTemp(1); // reset filter
|
||||||
OLED::setRotation(!(systemSettings.OrientationMode & 1));
|
OLED::setRotation(systemSettings.OrientationMode & 1);
|
||||||
uint32_t ticks = xTaskGetTickCount();
|
uint32_t ticks = xTaskGetTickCount();
|
||||||
ticks += 400; // 4 seconds from now
|
ticks += 400; // 4 seconds from now
|
||||||
while (xTaskGetTickCount() < ticks) {
|
while (xTaskGetTickCount() < ticks) {
|
||||||
@@ -1056,7 +1056,7 @@ void startMOVTask(void const *argument __unused) {
|
|||||||
osDelay(250); // wait for accelerometer to stabilize
|
osDelay(250); // wait for accelerometer to stabilize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OLED::setRotation(!(systemSettings.OrientationMode & 1));
|
OLED::setRotation(systemSettings.OrientationMode & 1);
|
||||||
lastMovementTime = 0;
|
lastMovementTime = 0;
|
||||||
int16_t datax[MOVFilter] = { 0 };
|
int16_t datax[MOVFilter] = { 0 };
|
||||||
int16_t datay[MOVFilter] = { 0 };
|
int16_t datay[MOVFilter] = { 0 };
|
||||||
|
|||||||
Reference in New Issue
Block a user