comparison Discovery/Src/logbook.c @ 298:50c26a4442af cleanup-3

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>
author Jan Mulder <jlmulder@xs4all.nl>
date Thu, 16 May 2019 14:02:46 +0200
parents 04cdeff80254
children 8e62f4701676
comparison
equal deleted inserted replaced
297:87d54b4fd946 298:50c26a4442af
748 length -= 1; 748 length -= 1;
749 } 749 }
750 750
751 // second event Byte 751 // second event Byte
752 //bailout 752 //bailout
753 if(eventByte2.ub.bit1) 753 if(eventByte2.ub.bit0)
754 { 754 {
755 //evaluate bailout gas Gas 755 //evaluate bailout gas Gas
756 *bailout = 1; 756 *bailout = 1;
757 757
758 ext_flash_read_next_sample_part( (uint8_t*)&tempU8, 1); 758 ext_flash_read_next_sample_part( (uint8_t*)&tempU8, 1);