Mercurial > public > ostc4
diff Discovery/Src/data_central.c @ 774:6169309d6eb9
more menu items for the compass menu: Delete bearing, and reset to land based bearing. I have also re-enabled the real time bearing display in the menu - makes it easier to set the correct bearing. (mikeller)
author | heinrichsweikamp |
---|---|
date | Wed, 10 May 2023 16:25:39 +0200 |
parents | 29d9b5bc7946 |
children | 45b8f3c2acce |
line wrap: on
line diff
--- a/Discovery/Src/data_central.c Wed May 10 16:24:57 2023 +0200 +++ b/Discovery/Src/data_central.c Wed May 10 16:25:39 2023 +0200 @@ -860,3 +860,11 @@ } return retVal; } + +void setCompassHeading(uint16_t heading) +{ + + // if heading == 0 set compassHeading to 360, because compassHeading == 0 means 'off' + + stateUsedWrite->diveSettings.compassHeading = ((heading - 360) % 360) + 360; +}