diff options
-rw-r--r-- | workspace/TS100/inc/LIS2DH12.hpp | 12 | ||||
-rw-r--r-- | workspace/TS100/src/OLED.cpp | 3 | ||||
-rw-r--r-- | workspace/TS100/src/main.cpp | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/workspace/TS100/inc/LIS2DH12.hpp b/workspace/TS100/inc/LIS2DH12.hpp index b292db32..21a7bbc4 100644 --- a/workspace/TS100/inc/LIS2DH12.hpp +++ b/workspace/TS100/inc/LIS2DH12.hpp @@ -19,15 +19,15 @@ public: static Orientation getOrientation() { #ifdef MODEL_TS80 uint8_t val = (FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS, - LIS_INT2_SRC) >> 2); + LIS_INT2_SRC) >> 2); if (val == 8) val = 3; - else if (val==1) - val=0; - else if(val==2) - val=1; + else if (val == 1) + val = 1; + else if (val == 2) + val = 0; else - val=3; + val = 3; return static_cast<Orientation>(val); #endif #ifdef MODEL_TS100 diff --git a/workspace/TS100/src/OLED.cpp b/workspace/TS100/src/OLED.cpp index 94f9f4a2..62d6634a 100644 --- a/workspace/TS100/src/OLED.cpp +++ b/workspace/TS100/src/OLED.cpp @@ -144,6 +144,9 @@ void OLED::drawChar(char c, char PrecursorCommand) { } void OLED::setRotation(bool leftHanded) { +#ifdef MODEL_TS80 + leftHanded=!leftHanded; +#endif if (inLeftHandedMode == leftHanded) { return; } diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 2d7ab5cb..9513f402 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -987,7 +987,7 @@ void startPIDTask(void const *argument __unused) { const uint16_t mass = 2020 / 20; // divide here so division is compile-time. #endif #ifdef MODEL_TS80 - const uint16_t mass = 2020 / 60; + const uint16_t mass = 2020 / 50; #endif int32_t milliWattsNeeded = tempToMilliWatts(tempError.average(), |