Mercurial > public > ostc4
comparison Discovery/Src/show_logbook.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 | b0d3e8b84966 |
| children |
comparison
equal
deleted
inserted
replaced
| 1057:24c1e3367a2e | 1058:3c73180fde1d |
|---|---|
| 433 wintemp.right = 799 - wintemp.left; | 433 wintemp.right = 799 - wintemp.left; |
| 434 wintemp.top = LOG_BORDER_OFFSET; | 434 wintemp.top = LOG_BORDER_OFFSET; |
| 435 wintemp.bottom = 479 - 40; | 435 wintemp.bottom = 479 - 40; |
| 436 char timeSuffix; | 436 char timeSuffix; |
| 437 uint8_t hoursToDisplay; | 437 uint8_t hoursToDisplay; |
| 438 uint8_t fw_first = 0; | |
| 439 uint8_t fw_second = 0; | |
| 440 uint8_t fw_third = 0; | |
| 438 | 441 |
| 439 SLogbookHeader logbookHeader; | 442 SLogbookHeader logbookHeader; |
| 440 logbook_getHeader(StepBackwards ,&logbookHeader); | 443 logbook_getHeader(StepBackwards ,&logbookHeader); |
| 441 | 444 |
| 442 uint16_t depthdata[1000] = { 0 }; | 445 uint16_t depthdata[1000] = { 0 }; |
| 676 else | 679 else |
| 677 text[1] = 'C'; | 680 text[1] = 'C'; |
| 678 text[2] = 0; | 681 text[2] = 0; |
| 679 | 682 |
| 680 Gfx_write_label_var(hgfx, start, 300,top, &FontT42,CLUT_GasSensor4,text); | 683 Gfx_write_label_var(hgfx, start, 300,top, &FontT42,CLUT_GasSensor4,text); |
| 684 | |
| 685 if(logbookHeader.decoModel == GF_MODE) | |
| 686 { | |
| 687 firmwareVersionfrom16bit(logbookHeader.firmwareVersionHigh, logbookHeader.firmwareVersionLow, &fw_first, &fw_second, &fw_third); | |
| 688 if((fw_first >= GF_SURF_FW_FIRST) && (fw_second >= GF_SURF_FW_SECOND) && (fw_third >= GF_SURF_FW_THIRD)) | |
| 689 { | |
| 690 top+= 50; | |
| 691 start = 30; | |
| 692 snprintf(text,20,"%u",logbookHeader.gfAtEnd); | |
| 693 Gfx_write_label_var(hgfx, start, 300,top, &FontT42,CLUT_GasSensor1,text); | |
| 694 start += FontT42.spacesize2Monospaced + 5; | |
| 695 if(logbookHeader.gfAtEnd > 99) | |
| 696 { | |
| 697 start += FontT42.spacesize2Monospaced * 2; | |
| 698 } | |
| 699 if(logbookHeader.gfAtEnd > 9) | |
| 700 { | |
| 701 start += FontT42.spacesize2Monospaced; | |
| 702 } | |
| 703 snprintf(text,20,"%c%c",TXT_2BYTE,TXT2BYTE_GFSurf); | |
| 704 Gfx_write_label_var(hgfx, start, 300,top, &FontT24,CLUT_GasSensor4,text); | |
| 705 } | |
| 706 } | |
| 681 | 707 |
| 682 // CNS | 708 // CNS |
| 683 snprintf(text,20,"CNS: %i %%",logbookHeader.maxCNS); | 709 snprintf(text,20,"CNS: %i %%",logbookHeader.maxCNS); |
| 684 Gfx_write_label_var(hgfx, 30, 250,440, &FontT42,CLUT_GasSensor1,text); | 710 Gfx_write_label_var(hgfx, 30, 250,440, &FontT42,CLUT_GasSensor1,text); |
| 685 | 711 |
