Fixed badly computed vibration strength, which could'nt reach 255...

This commit is contained in:
Th3maz1ng 2023-10-22 08:54:13 +02:00
parent 24c3d8f397
commit ab08d61ee2

View File

@ -2,6 +2,8 @@
#include "watch_peripherals.h"
#include "watch_settings.h"
#include "app_log.h"
/***
* It is needed to have a reference on two header_titles because when
* switching from one screen using a header to an other screen which is also using one
@ -61,7 +63,7 @@ void common_screen_header_update_title(const char * title)
void common_screen_onclick_vibration(void)
{
uint16_t vibration_strength = persistency_get_settings()->display.display_vibrate_on_touch_strength*32;
uint16_t vibration_strength = (persistency_get_settings()->display.display_vibrate_on_touch_strength + 1)*32;
uint32_t vibration_duration_ms = 0;
if(persistency_get_settings()->display.display_vibrate_on_touch_duration)
vibration_duration_ms = persistency_get_settings()->display.display_vibrate_on_touch_duration*50 + 50;