Mercurial > public > ostc4
changeset 617:4eba86129d35
Development bugfix: Low battery warning was interpretated as marker:
The previous version checked event bit 1 and 2 and returned a marker in case both were set. The indication for a battery low warning is that the 3 LSBit of the event byte are set => not intended marker in case of low battery situation. To fix this an additional check for bit0 has been added.
author | Ideenmodellierer |
---|---|
date | Wed, 27 Jan 2021 22:03:11 +0100 |
parents | a594a778c883 |
children | 96af74455420 |
files | Discovery/Src/logbook.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/logbook.c Wed Jan 27 21:58:46 2021 +0100 +++ b/Discovery/Src/logbook.c Wed Jan 27 22:03:11 2021 +0100 @@ -739,7 +739,7 @@ length--; /* marker */ - if(eventByte1.ub.bit1 && eventByte1.ub.bit2 && event != NULL) + if((eventByte1.ub.bit1 && eventByte1.ub.bit2 && !eventByte1.ub.bit0) && (event != NULL)) /* 3 lsb low bit means battery low */ { *event = 1; }