Skip to content

Commit

Permalink
Fixed extra stop changing time to proper values
Browse files Browse the repository at this point in the history
Fixed in release 14.1
Please update the application for your operating system. Or use the online version:
https://vlasovalexey.github.io/DiveProMe/HTML_SRC/

Android 14.1 version will be available in the next couple of days.
  • Loading branch information
VlasovAlexey committed Jan 28, 2024
1 parent c8e2d9a commit 0011d0c
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 46 deletions.
54 changes: 44 additions & 10 deletions HTML_SRC/build_dive.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,18 +1061,52 @@ function ExtraStops(output) {
tn_cng_time_idx = 0.00001;
}

for(c = 1 ; c < output.length ; c++){
if(output[c].gasName != output[c-1].gasName){
output.splice(c,0,
{
endDepth: output[c].startDepth,
startDepth: output[c].startDepth,
time: tn_cng_time_idx,
gasName: output[c].gasName
}
);
//OC plan
if ($("#tn_plan_ccr").val() * 1.0 == 1) {
for(c = 1 ; c < output.length ; c++){
if(output[c].gasName != output[c-1].gasName){
output.splice(c,0, {
gasName: output[c].gasName,
startDepth: output[c].startDepth,
endDepth: output[c].startDepth,
time: tn_cng_time_idx
}
);
}
}
}
//CCR bailout plan
if ($("#tn_plan_ccr").val() * 1.0 == 2 && opt_blt_dln == 1) {

var god_deco_gas = 0;
var deco_mix_stp = ($("#opt_deco").val() * 1.0);

for(c = 1 ; c < output.length ; c++){

var cnt = 0;

//we need add extra stop time only if changed to bailout array mix
for (j = 0; j < deco_mix_stp; j++) {
//console.log( mix_to_txt_arr([deco_mix_arr[cnt], deco_mix_arr[cnt + 1]]));
if(output[c].gasName == (mix_to_txt_arr([deco_mix_arr[cnt], deco_mix_arr[cnt + 1]]))){
god_deco_gas = 1;
}
cnt = cnt + 2;
}

if(output[c].gasName != output[c-1].gasName && god_deco_gas == 1){
output.splice(c,0, {
gasName: output[c].gasName,
startDepth: output[c].startDepth,
endDepth: output[c].startDepth,
time: tn_cng_time_idx
}
);
god_deco_gas = 0;
}
}
}

return output;
}

Expand Down
4 changes: 2 additions & 2 deletions HTML_SRC/dive_comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,9 @@ return s})({"/dive_comp.js":[function(require,module,exports){
gfLow = gfLow || 1.0;
gfHigh = gfHigh || 1.0;
maxppO2 = maxppO2 || 1.6;
maxEND = 200;
maxEND = maxEND || 30;
var currentGasName;
//console.log(this.segments);

if (typeof fromDepth == 'undefined') {
if (this.segments.length == 0) {
throw "No depth to decompress from has been specified, and neither have any dive stages been registered. Unable to decompress.";
Expand Down
56 changes: 28 additions & 28 deletions HTML_SRC/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1574,12 +1574,12 @@
<table class="tr_download_me" id="tr_download_me">
<tr class="tr_download_me">
<th class="tr_download_win">
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_win64_v14.0.zip?v12214134">
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_win64_v14.1.zip?v12214134">
<img src="download_me.png">
</a>
</th>
<th class="tr_download_mac" >
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_mac64_v14.0.zip?v12243">
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_mac64_v14.1.zip?v12243">
<img src="download_me.png">
</a>
</th>
Expand All @@ -1589,7 +1589,7 @@
</a>
</th>
<th class="tr_download_andr" >
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_v0_14.0.apk?v1245434">
<a href="/DiveMePro+/BuildsPlatformsStatic/DiveProMe_v0_14.1.apk?v1245434">
<img src="download_me.png">
</a>
</th>
Expand Down Expand Up @@ -2161,32 +2161,32 @@
<script src="Arial_Digiscream_Normal-normal.js"></script>
<script src="svg2pdf.src.js"></script>
<script src="jspdf.plugin.autotable.js"></script>
<script src="highstock.js?v0.1811153112624115315113311111131167" charset="UTF-8"></script>
<script src="exporting.src.js?v0.16135121412583156133592113157" charset="UTF-8"></script>
<script src="offline-exporting.src.js?v0.1525413156233311163171819215" charset="UTF-8"></script>
<script src="cns_table.js?v0.11815112612351125453356333111171"></script>
<script src="html_new_gen_main.js?v0.1112111125453653333111186411841154923457" charset="UTF-8"></script>
<script src="android_fn.js?v0.284184112511131425336551339116234517" charset="UTF-8"></script>
<script src="cookie_settings.js?v0.112285311142251365313311111836441521679123457wa123" charset="UTF-8"></script>
<script src="lng_fn.js?v0.110267w1a134g215f11452v336513313112"charset="UTF-8"></script>
<script src="dive_comp.js?0.184621112183331514425v1651135319123457"charset="UTF-8"></script>
<script src="block_gen.js?v0.82611211831352315545v169531123457" charset="UTF-8"></script>
<script src="saul_planner.js?v0.1542v6353351213" charset="UTF-8"></script>
<script src="gases_list_gen.js?v0.134v565835323112711131116143159123457" charset="UTF-8"></script>
<script src="build_dive.js?v0.11115434v525635323016311311137" charset="UTF-8"></script>
<script src="tables_build.js?v0.1817234v5253356236411113118415912345w1" charset="UTF-8"></script>
<script src="gf_option.js?v0.18841214234v575335326116131511912345" charset="UTF-8"></script>
<script src="chart_theme.js?v0.1821412834v5753353261131461115912345" charset="UTF-8"></script>
<script src="chart_profile.js?v0.182121134v535335126331874641115912345" charset="UTF-8"></script>
<script src="style_manager.js?v0.1812v11114353533562311327468114315912345" charset="UTF-8"></script>
<script src="ios_fn.js?v0.101211121113v1334563356532745" charset="UTF-8"></script>
<script src="calc_learn.js?v0.18111267v1283454335653214113591213415w" charset="UTF-8"></script>
<script src="highstock.js?v0.18111531126324115315113311111131167" charset="UTF-8"></script>
<script src="exporting.src.js?v0.161351213412583156133592113157" charset="UTF-8"></script>
<script src="offline-exporting.src.js?v0.15325413156233311163171819215" charset="UTF-8"></script>
<script src="cns_table.js?v0.118151126123511325453356333111171"></script>
<script src="html_new_gen_main.js?v0.11121111325453653333111186411841154923457" charset="UTF-8"></script>
<script src="android_fn.js?v0.2841841125111314325336551339116234517" charset="UTF-8"></script>
<script src="cookie_settings.js?v0.1122853111423251365313311111836441521679123457wa123" charset="UTF-8"></script>
<script src="lng_fn.js?v0.110267w1a134g215f114523v336513313112"charset="UTF-8"></script>
<script src="dive_comp.js?0.1846211121833315144253v1651135319123457"charset="UTF-8"></script>
<script src="block_gen.js?v0.826112118313352315545v169531123457" charset="UTF-8"></script>
<script src="saul_planner.js?v0.1542v63533351213" charset="UTF-8"></script>
<script src="gases_list_gen.js?v0.134v5658335323112711131116143159123457" charset="UTF-8"></script>
<script src="build_dive.js?v0.11115434v5256335323016311311137" charset="UTF-8"></script>
<script src="tables_build.js?v0.1817234v52533562336411113118415912345w1" charset="UTF-8"></script>
<script src="gf_option.js?v0.18841214234v5753353236116131511912345" charset="UTF-8"></script>
<script src="chart_theme.js?v0.1821412834v57533532361131461115912345" charset="UTF-8"></script>
<script src="chart_profile.js?v0.182121134v5353351236331874641115912345" charset="UTF-8"></script>
<script src="style_manager.js?v0.1812v111143535335623311327468114315912345" charset="UTF-8"></script>
<script src="ios_fn.js?v0.101211121113v13345633565327345" charset="UTF-8"></script>
<script src="calc_learn.js?v0.18111267v12834543356532134113591213415w" charset="UTF-8"></script>
<!-- Very important place only here node js check functions! -->
<script src="nodejs_fn.js?v0.1818244152v61134573356532113591213415" charset="UTF-8"></script>
<script src="price_calc.js?v0.8842617111v4113453335653225191123145" charset="UTF-8"></script>
<script src="main.js?v0.18812454115651911v1313452335653272113415aw" charset="UTF-8"></script>
<script src="lvl_functions.js?v0.182411162v371345833565321141151912345" charset="UTF-8"></script>
<script src="style_manager.js?v0.1881412131v62134573356532141115912345" charset="UTF-8"></script>
<script src="nodejs_fn.js?v0.1818244152v611345733565321313591213415" charset="UTF-8"></script>
<script src="price_calc.js?v0.8842617111v41134533356532235191123145" charset="UTF-8"></script>
<script src="main.js?v0.18812454115651911v13134523356532732113415aw" charset="UTF-8"></script>
<script src="lvl_functions.js?v0.182411162v3713458335653213141151912345" charset="UTF-8"></script>
<script src="style_manager.js?v0.1881412131v621345733565321341115912345" charset="UTF-8"></script>
<!-- Preloader Info Wait when all Page Loaded-->
<script type="text/javascript">
window.onload = function() {
Expand Down
15 changes: 9 additions & 6 deletions HTML_SRC/tables_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function ccr_compact_plan(tmp_arr) {
tmp_arr.splice(j, 1);
}
}

for (j = 0; j < tmp_arr.length - 1; j++) {
//ccr_last_add_cnt = ccr_last_add_cnt + 1;
//collapse different mixes for "descent"
Expand All @@ -33,12 +34,14 @@ function ccr_compact_plan(tmp_arr) {
if (tmp_arr[j + 1].startDepth == tmp_arr[j + 1].endDepth && ccr_glue == 1) {
//next is flat!
ccr_time_sh = ccr_time_sh + tmp_arr[j].time;
ccr_fixed_plan.push({
gasName: tmp_arr[j - 1].gasName,
startDepth: ccr_start_dp,
endDepth: tmp_arr[j].endDepth,
time: ccr_time_sh
});

ccr_fixed_plan.push({
gasName: tmp_arr[j - 1].gasName,
startDepth: ccr_start_dp,
endDepth: tmp_arr[j].endDepth,
time: ccr_time_sh
});

// and we reset counter and time
ccr_time_sh = 0;
ccr_glue = 0;
Expand Down

0 comments on commit 0011d0c

Please sign in to comment.