aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2018-03-23 13:14:59 +1100
committerBen V. Brown <[email protected]>2018-03-23 13:14:59 +1100
commit03b2bede4d3b0d61cc4ed0abed516f033165c6bc (patch)
tree474d7c36ce7f845e915341d5fbb5a1f80f4090b2
parent37d5cf1e7035fd2547df143edce5934f1a212354 (diff)
downloadIronOS-2.03-RC3.tar.gz
IronOS-2.03-RC3.zip
Fix #231v2.03-RC3
-rw-r--r--workspace/TS100/src/Setup.c2
-rw-r--r--workspace/TS100/src/gui.cpp13
-rw-r--r--workspace/TS100/src/main.cpp10
3 files changed, 18 insertions, 7 deletions
diff --git a/workspace/TS100/src/Setup.c b/workspace/TS100/src/Setup.c
index 83a55491..f69a26e5 100644
--- a/workspace/TS100/src/Setup.c
+++ b/workspace/TS100/src/Setup.c
@@ -236,7 +236,7 @@ static void MX_TIM2_Init(void) {
htim2.Instance = TIM2;
htim2.Init.Prescaler = 2000; // pwm out is 10k, we want to run our PWM at around 100hz
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
- htim2.Init.Period = 120;
+ htim2.Init.Period = 122;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //4mhz before divide
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
HAL_TIM_Base_Init(&htim2);
diff --git a/workspace/TS100/src/gui.cpp b/workspace/TS100/src/gui.cpp
index 2371774f..94d6def6 100644
--- a/workspace/TS100/src/gui.cpp
+++ b/workspace/TS100/src/gui.cpp
@@ -387,6 +387,19 @@ static void settings_displayScrollSpeed(void) {
static void settings_setDisplayRotation(void) {
systemSettings.OrientationMode++;
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
+ switch (systemSettings.OrientationMode) {
+ case 0:
+ lcd.setRotation(false);
+ break;
+ case 1:
+ lcd.setRotation(true);
+ break;
+ case 2:
+ //do nothing on auto
+ break;
+ default:
+ break;
+ }
}
static void settings_displayDisplayRotation(void) {
diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp
index 54a94a03..499e98bb 100644
--- a/workspace/TS100/src/main.cpp
+++ b/workspace/TS100/src/main.cpp
@@ -57,10 +57,8 @@ int main(void) {
PCBVersion = 2;
//Setup the ST Accelerometer
accel2.initalize(); //startup the accelerometer
- }
- {
+ } else {
PCBVersion = 3;
-
}
HAL_IWDG_Refresh(&hiwdg);
restoreSettings(); // load the settings from flash
@@ -843,9 +841,9 @@ void startPIDTask(void const *argument) {
int32_t integralCount = 0;
int32_t derivativeLastValue = 0;
int32_t kp, ki, kd;
- kp = 80;
- ki = 120;
- kd = 60;
+ kp = 30;
+ ki = 60;
+ kd = 20;
// REMEBER ^^^^ These constants are backwards
// They act as dividers, so to 'increase' a P term, you make the number
// smaller.