Mercurial > public > ostc4
comparison Discovery/Src/logbook.c @ 929:63c340abd70e Evo_2_23 tip
Add a line to the compass heading dive menu that shows the currently set heading to enable the
diver to confirm it / add it to notes.
Also add a log entry every time a new compass heading is set or the heading is cleared.
And add a way to add compass headings to the log without changing the currently set heading -
this was added after discussion with cave divers who are interested in recording headings
when mapping out caves.
From mikeller
author | heinrichsweikamp |
---|---|
date | Mon, 02 Dec 2024 11:16:10 +0100 |
parents | b456be1e152d |
children |
comparison
equal
deleted
inserted
replaced
928:9b7859554beb | 929:63c340abd70e |
---|---|
456 if(state->events.bailout) | 456 if(state->events.bailout) |
457 { | 457 { |
458 eventByte1.ub.bit7 = 1; | 458 eventByte1.ub.bit7 = 1; |
459 eventByte2.ub.bit0 = 1; | 459 eventByte2.ub.bit0 = 1; |
460 } | 460 } |
461 if (state->events.compassHeadingUpdate) { | |
462 eventByte1.ub.bit7 = 1; | |
463 eventByte2.ub.bit1 = 1; | |
464 } | |
461 //Add EventByte 1 | 465 //Add EventByte 1 |
462 if(eventByte1.uw > 0) | 466 if(eventByte1.uw > 0) |
463 { | 467 { |
464 sample[length] = eventByte1.uw; | 468 sample[length] = eventByte1.uw; |
465 length++; | 469 length++; |
495 //bailout gas in % O2 & %He | 499 //bailout gas in % O2 & %He |
496 sample[length] = state->events.info_bailoutO2; | 500 sample[length] = state->events.info_bailoutO2; |
497 length += 1; | 501 length += 1; |
498 sample[length] = state->events.info_bailoutHe; | 502 sample[length] = state->events.info_bailoutHe; |
499 length += 1; | 503 length += 1; |
504 } | |
505 if (state->events.compassHeadingUpdate) { | |
506 // New heading and type of heading | |
507 sample[length++] = state->events.info_compassHeadingUpdate & 0xFF; | |
508 sample[length++] = (state->events.info_compassHeadingUpdate & 0xFF00) >> 8; | |
500 } | 509 } |
501 | 510 |
502 | 511 |
503 if(divisor.temperature == 0) | 512 if(divisor.temperature == 0) |
504 { | 513 { |