1
0
forked from me/IronOS

Adding auto-rotation to the screen

Adds auto rotation support using the proper orientation detection. (Not
using raw values).
Should Fix and close #29
This commit is contained in:
Ben V. Brown
2017-07-27 11:46:04 +10:00
parent af9b8dca29
commit 1cbcba924f
11 changed files with 309 additions and 129 deletions

View File

@@ -38,10 +38,14 @@ void setup() {
StartUp_Accelerometer(systemSettings.sensitivity); //Start the accelerometer
setupPID(); //Init the PID values
readIronTemp(systemSettings.tempCalibration, 0, 0); //load the default calibration value
Init_Oled(systemSettings.flipDisplay); //Init the OLED display
if (systemSettings.OrientationMode == 2)
Init_Oled(!getOrientation()); //Init the OLED display
else
Init_Oled(systemSettings.OrientationMode); //Init the OLED display
OLED_DrawString("VER 1.16", 8); //Version Number
delayMs(300); //Pause to show version number
delayMs(400); //Pause to show version number
showBootLogoIfavailable();
Start_Watchdog(1000); //start the system watch dog as 1 second timeout
Start_Watchdog(5000); //start the system watch dog as 5 second timeout
}