mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Fix rotation for TS80
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user