comparison Discovery/Src/settings.c @ 1058:3c73180fde1d Icon_Integration tip

Added log entry for surface GF: The surface GF has been added to the logbook data. A function records the GF which is present while entering close to surface condition for later storage. This is needed to avoid that an already decreased GF (after dive mode exit time) GF is stored. The surface GF is shown at logbook page1 and is available in the header data for external logbook services.
author Ideenmodellierer
date Sat, 10 Jan 2026 19:53:01 +0100
parents 3029dd4398a5
children
comparison
equal deleted inserted replaced
1057:24c1e3367a2e 1058:3c73180fde1d
2006 *low = (uint8_t)(hardwareDataGetPointer()->production_day * 8); 2006 *low = (uint8_t)(hardwareDataGetPointer()->production_day * 8);
2007 } 2007 }
2008 } 2008 }
2009 } 2009 }
2010 2010
2011 void firmwareVersionfrom16bit(uint8_t high16, uint8_t low16, uint8_t* fw_first, uint8_t* fw_second, uint8_t* fw_third)
2012 {
2013 *fw_first = (high16 >> 3);
2014 *fw_second = ((high16 & 0x3) << 2) | (low16 >> 6);
2015 *fw_third = (low16 & 0x1F) >> 1; /* discard beta information */
2016 }
2011 2017
2012 uint8_t firmwareVersion_16bit_high(void) 2018 uint8_t firmwareVersion_16bit_high(void)
2013 { 2019 {
2014 return ((firmware_FirmwareData.versionFirst & 0x1F) << 3) + ((firmware_FirmwareData.versionSecond & 0x1C) >> 2); 2020 return ((firmware_FirmwareData.versionFirst & 0x1F) << 3) + ((firmware_FirmwareData.versionSecond & 0x1C) >> 2);
2015 } 2021 }