# HG changeset patch
# User Jan Mulder <jlmulder@xs4all.nl>
# Date 1558008166 -7200
# Node ID 50c26a4442af856f363c640ea3ed745f7e023b11
# Parent  87d54b4fd946a5c53c56a15acc315ed8b236e754
Bugfix: fix drawing of CCR bailout profile

When bailing out to an OC gas from CCR dive mode, the profile was not
drawn correctly in the device internal logbook. It was truncated
from the moment of bailout, and the remaining CCR part of the dive
was stretched over the full dive time.

Yes, a lot of text for a 1 letter fix, but finding the reason of this
bug was not trivial. It appeared to be a parsing error from the
internal logbook, looking at the wrong bit from the extended sample
data on drawing time. The bit that denotes bailout is bit 0, and
not bit 1.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>

diff -r 87d54b4fd946 -r 50c26a4442af Discovery/Src/logbook.c
--- a/Discovery/Src/logbook.c	Thu May 16 08:56:15 2019 +0200
+++ b/Discovery/Src/logbook.c	Thu May 16 14:02:46 2019 +0200
@@ -750,7 +750,7 @@
 			
 			// second event Byte
 			//bailout
-			if(eventByte2.ub.bit1)
+			if(eventByte2.ub.bit0)
 			{
 				//evaluate bailout gas Gas
 				 *bailout = 1;