comparison Discovery/Src/data_central.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 6169309d6eb9
children 4abfb8a2a435
comparison
equal deleted inserted replaced
775:46c6d2380d4e 776:45b8f3c2acce
859 retVal = 1; 859 retVal = 1;
860 } 860 }
861 return retVal; 861 return retVal;
862 } 862 }
863 863
864
865 bool isCompassCalibrated(void)
866 {
867 return stateUsed->lifeData.compass_heading != -1;
868 }
869
870
864 void setCompassHeading(uint16_t heading) 871 void setCompassHeading(uint16_t heading)
865 { 872 {
866 873
867 // if heading == 0 set compassHeading to 360, because compassHeading == 0 means 'off' 874 // if heading == 0 set compassHeading to 360, because compassHeading == 0 means 'off'
868 875