comparison Discovery/Src/base.c @ 776:45b8f3c2acce

Add support for a configurable compass declination in a range of -99 to 99 degrees. This allows the displayed compass reading to be configured to take into account the compass declination (difference between the measured magnetic North direction and the actual geographical North direction) that has different values for different locations around the globe. See https://magnetic-declination.com/ for more information. (mikeller)
author heinrichsweikamp
date Thu, 18 May 2023 09:49:17 +0200
parents 2c243233c999
children dd7ce655db26
comparison
equal deleted inserted replaced
775:46c6d2380d4e 776:45b8f3c2acce
1046 1046
1047 1047
1048 void set_globalState_Menu_Line(uint8_t line) 1048 void set_globalState_Menu_Line(uint8_t line)
1049 { 1049 {
1050 globalStateID = ((globalStateID & MaskLineFieldDigit) + (line << 16)); 1050 globalStateID = ((globalStateID & MaskLineFieldDigit) + (line << 16));
1051 }
1052
1053
1054 uint8_t get_globalState_Menu_Line(void)
1055 {
1056 return (globalStateID & ~MaskLineFieldDigit) >> 16;
1051 } 1057 }
1052 1058
1053 1059
1054 void set_globalState(uint32_t newID) 1060 void set_globalState(uint32_t newID)
1055 { 1061 {