Skip to content

Commit

Permalink
calibrate temperatures reading
Browse files Browse the repository at this point in the history
* Update user_main.c

* Update user_main.c

* Update user_main.c

* Update user_main.c

* Update user_main.c
  • Loading branch information
openshwprojects committed Sep 7, 2024
1 parent 4695fe9 commit 9becf09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,9 @@ void Main_OnEverySecond()
UINT32 temperature;
temp_single_get_current_temperature(&temperature);
#if PLATFORM_BK7231T
g_wifi_temperature = temperature / 25.0f;
g_wifi_temperature = 2.21f * (temperature / 25.0f) - 65.91f;
#else
g_wifi_temperature = temperature * 0.128f;
g_wifi_temperature = (-0.457f * temperature) + 188.474f;
#endif
#elif PLATFORM_BL602
get_tsen_adc(&g_wifi_temperature, 0);
Expand Down

0 comments on commit 9becf09

Please sign in to comment.