Mercurial > public > ostc4
diff Common/Inc/data_central.h @ 539:d784f281833a
Added inertia simulation for compass heading:
In previous version calculated compass values were directly used for visualization of the compass. This causes a fast changing (jumping) of values. With the inertia introduction the compass behalfs more like an analog compass. The final value is reached slowly and the displayed values are more stable.
For configuration a new menu item has been added to the compass menu allowing to switch inertia off (default), small and large inertia simulation
author | Ideenmodellierer |
---|---|
date | Sat, 10 Oct 2020 16:59:18 +0200 |
parents | 58200d756365 |
children | 1b995079c045 |
line wrap: on
line diff
--- a/Common/Inc/data_central.h Sat Oct 10 13:51:44 2020 +0200 +++ b/Common/Inc/data_central.h Sat Oct 10 16:59:18 2020 +0200 @@ -433,6 +433,8 @@ void setBatteryPercentage(uint8_t newChargePercentage); void setButtonResponsiveness(uint8_t *ButtonSensitivyList); void calibrateCompass(void); +void compass_Inertia(float newHeading); +float compass_getCompensated(); void clearDeco(void); void translateDate(uint32_t datetmpreg, RTC_DateTypeDef *sDate); void translateTime(uint32_t tmpreg, RTC_TimeTypeDef *sTime);