Mercurial > public > ostc4
comparison Discovery/Src/show_logbook.c @ 610:ae7f8333c900
Added access to logbook marker data:
In previous version event data could only be stored in memory but read back and usage in the OSTC itself was not supported. After the events like a marker set by the diver may be retrieved from the log.
Added visualization of markers to T3_Profile view
author | Ideenmodellierer |
---|---|
date | Thu, 14 Jan 2021 20:38:28 +0100 |
parents | 16e369eae6e5 |
children | a594a778c883 |
comparison
equal
deleted
inserted
replaced
609:1b243c6c7067 | 610:ae7f8333c900 |
---|---|
448 uint16_t bottlePressureEnd = 0; | 448 uint16_t bottlePressureEnd = 0; |
449 uint16_t loop = 0; | 449 uint16_t loop = 0; |
450 #endif | 450 #endif |
451 | 451 |
452 uint16_t dataLength = 0; | 452 uint16_t dataLength = 0; |
453 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, tempdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tankdata); | 453 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, tempdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tankdata,NULL); |
454 | 454 |
455 //Print Date | 455 //Print Date |
456 uint8_t year = logbookHeader.dateYear; | 456 uint8_t year = logbookHeader.dateYear; |
457 uint8_t month = logbookHeader.dateMonth; | 457 uint8_t month = logbookHeader.dateMonth; |
458 uint8_t day = logbookHeader.dateDay; | 458 uint8_t day = logbookHeader.dateDay; |
734 uint8_t gasdata[1000]; | 734 uint8_t gasdata[1000]; |
735 int16_t tempdata[1000]; | 735 int16_t tempdata[1000]; |
736 uint16_t decoDepthdata[1000]; | 736 uint16_t decoDepthdata[1000]; |
737 uint16_t *pDecoDepthData = 0; | 737 uint16_t *pDecoDepthData = 0; |
738 | 738 |
739 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, tempdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, decoDepthdata, NULL); | 739 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, tempdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, decoDepthdata, NULL, NULL); |
740 | 740 |
741 for(int i = 0; i<dataLength; i++) | 741 for(int i = 0; i<dataLength; i++) |
742 { | 742 { |
743 if(decoDepthdata[i] >= 300) | 743 if(decoDepthdata[i] >= 300) |
744 { | 744 { |
901 | 901 |
902 logbook_getHeader(StepBackwards, &logbookHeader); | 902 logbook_getHeader(StepBackwards, &logbookHeader); |
903 uint16_t dataLength = 0; | 903 uint16_t dataLength = 0; |
904 uint16_t depthdata[1000]; | 904 uint16_t depthdata[1000]; |
905 uint8_t gasdata[1000]; | 905 uint8_t gasdata[1000]; |
906 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | 906 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); |
907 | 907 |
908 //--- print coordinate system & depth graph with gaschanges --- | 908 //--- print coordinate system & depth graph with gaschanges --- |
909 show_logbook_draw_depth_graph(hgfx, StepBackwards, &wintemp, 1, dataLength, depthdata, gasdata, NULL); | 909 show_logbook_draw_depth_graph(hgfx, StepBackwards, &wintemp, 1, dataLength, depthdata, gasdata, NULL); |
910 | 910 |
911 //--- print gas list --- | 911 //--- print gas list --- |
959 uint16_t *setpoint = ppO2data; | 959 uint16_t *setpoint = ppO2data; |
960 uint16_t *sensor1 = ppO2data; | 960 uint16_t *sensor1 = ppO2data; |
961 | 961 |
962 | 962 |
963 if(logbookHeader.diveMode != DIVEMODE_CCR) | 963 if(logbookHeader.diveMode != DIVEMODE_CCR) |
964 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, NULL, ppO2data, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | 964 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata,gasdata, NULL, ppO2data, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); |
965 else | 965 else |
966 { | 966 { |
967 if(logbookHeader.CCRmode == CCRMODE_FixedSetpoint) | 967 if(logbookHeader.CCRmode == CCRMODE_FixedSetpoint) |
968 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata, gasdata, NULL, NULL, setpoint, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | 968 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata, gasdata, NULL, NULL, setpoint, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); |
969 else | 969 else |
970 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata, gasdata, NULL, NULL, NULL, sensor1, sensor2, sensor3, NULL, NULL, NULL, NULL); | 970 dataLength = logbook_readSampleData(StepBackwards, 1000, depthdata, gasdata, NULL, NULL, NULL, sensor1, sensor2, sensor3, NULL, NULL, NULL, NULL, NULL); |
971 } | 971 } |
972 | 972 |
973 | 973 |
974 //--- print coordinate system & depth graph with bailout--- | 974 //--- print coordinate system & depth graph with bailout--- |
975 show_logbook_draw_depth_graph(hgfx, StepBackwards, &wintemp, 0, dataLength, depthdata, gasdata, NULL); | 975 show_logbook_draw_depth_graph(hgfx, StepBackwards, &wintemp, 0, dataLength, depthdata, gasdata, NULL); |