1
0
forked from me/IronOS

Fix rotation for TS80

This commit is contained in:
Ben V. Brown
2019-01-26 21:05:18 +11:00
parent fa43aebec2
commit 36ea75a6df
3 changed files with 10 additions and 7 deletions

View File

@@ -19,15 +19,15 @@ public:
static Orientation getOrientation() { static Orientation getOrientation() {
#ifdef MODEL_TS80 #ifdef MODEL_TS80
uint8_t val = (FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS, uint8_t val = (FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS,
LIS_INT2_SRC) >> 2); LIS_INT2_SRC) >> 2);
if (val == 8) if (val == 8)
val = 3; val = 3;
else if (val==1) else if (val == 1)
val=0; val = 1;
else if(val==2) else if (val == 2)
val=1; val = 0;
else else
val=3; val = 3;
return static_cast<Orientation>(val); return static_cast<Orientation>(val);
#endif #endif
#ifdef MODEL_TS100 #ifdef MODEL_TS100

View File

@@ -144,6 +144,9 @@ void OLED::drawChar(char c, char PrecursorCommand) {
} }
void OLED::setRotation(bool leftHanded) { void OLED::setRotation(bool leftHanded) {
#ifdef MODEL_TS80
leftHanded=!leftHanded;
#endif
if (inLeftHandedMode == leftHanded) { if (inLeftHandedMode == leftHanded) {
return; return;
} }

View File

@@ -987,7 +987,7 @@ void startPIDTask(void const *argument __unused) {
const uint16_t mass = 2020 / 20; // divide here so division is compile-time. const uint16_t mass = 2020 / 20; // divide here so division is compile-time.
#endif #endif
#ifdef MODEL_TS80 #ifdef MODEL_TS80
const uint16_t mass = 2020 / 60; const uint16_t mass = 2020 / 50;
#endif #endif
int32_t milliWattsNeeded = tempToMilliWatts(tempError.average(), int32_t milliWattsNeeded = tempToMilliWatts(tempError.average(),