mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:53:23 +00:00
Deal with some of the whitespace issues in planner.c
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fbaeeec807
commit
414d7f2632
1 changed files with 21 additions and 21 deletions
|
@ -411,7 +411,7 @@ struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration,
|
|||
struct divedatapoint *dp = create_dp(duration, depth, cylinderid, po2);
|
||||
dp->entered = entered;
|
||||
add_to_end_of_diveplan(diveplan, dp);
|
||||
return (dp);
|
||||
return dp;
|
||||
}
|
||||
|
||||
struct gaschanges {
|
||||
|
@ -808,7 +808,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
|
|||
temp_len = snprintf(temp, sz_temp, "%s", translate("gettextFromC", "Deco model: VPM-B at nominal conservatism"));
|
||||
else
|
||||
temp_len = snprintf(temp, sz_temp, translate("gettextFromC", "Deco model: VPM-B at +%d conservatism"), diveplan->vpmb_conservatism);
|
||||
if(diveplan->eff_gflow)
|
||||
if (diveplan->eff_gflow)
|
||||
temp_len += snprintf(temp + temp_len, sz_temp - temp_len, translate("gettextFromC", ", effective GF=%d/%d"), diveplan->eff_gflow
|
||||
, diveplan->eff_gfhigh);
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ bool enough_gas(int current_cylinder)
|
|||
if (!cyl->start.mbar)
|
||||
return true;
|
||||
if (cyl->type.size.mliter)
|
||||
return (float) (cyl->end.mbar - prefs.reserve_gas) * cyl->type.size.mliter / 1000.0 > (float) cyl->deco_gas_used.mliter;
|
||||
return (float)(cyl->end.mbar - prefs.reserve_gas) * cyl->type.size.mliter / 1000.0 > (float) cyl->deco_gas_used.mliter;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
@ -1089,7 +1089,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
transitiontime = depth / 75; /* this still needs to be made configurable */
|
||||
plan_add_segment(diveplan, transitiontime, 0, current_cylinder, po2, false);
|
||||
create_dive_from_plan(diveplan, is_planner);
|
||||
return(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
#if DEBUG_PLAN & 4
|
||||
|
@ -1126,7 +1126,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
nuclear_regeneration(clock);
|
||||
vpmb_start_gradient();
|
||||
|
||||
if(decoMode() == RECREATIONAL) {
|
||||
if (decoMode() == RECREATIONAL) {
|
||||
bool safety_stop = prefs.safetystop && max_depth >= 10000;
|
||||
track_ascent_gas(depth, &displayed_dive.cylinder[current_cylinder], avg_depth, bottom_time, safety_stop);
|
||||
// How long can we stay at the current depth and still directly ascent to the surface?
|
||||
|
@ -1177,7 +1177,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
|
||||
free(stoplevels);
|
||||
free(gaschanges);
|
||||
return(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (best_first_ascend_cylinder != current_cylinder) {
|
||||
|
@ -1354,7 +1354,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
this_decotimestep, po2, &displayed_dive, prefs.decosac);
|
||||
clock += this_decotimestep;
|
||||
/* Finish infinite deco */
|
||||
if(clock >= 48 * 3600 && depth >= 6000) {
|
||||
if (clock >= 48 * 3600 && depth >= 6000) {
|
||||
error = LONGDECO;
|
||||
break;
|
||||
}
|
||||
|
@ -1402,9 +1402,9 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
} while (!is_final_plan);
|
||||
|
||||
plan_add_segment(diveplan, clock - previous_point_time, 0, current_cylinder, po2, false);
|
||||
if(decoMode() == VPMB) {
|
||||
if (decoMode() == VPMB) {
|
||||
diveplan->eff_gfhigh = rint(100.0 * regressionb());
|
||||
diveplan->eff_gflow = rint(100*(regressiona() * first_stop_depth + regressionb()));
|
||||
diveplan->eff_gflow = rint(100.0 * (regressiona() * first_stop_depth + regressionb()));
|
||||
}
|
||||
|
||||
create_dive_from_plan(diveplan, is_planner);
|
||||
|
@ -1474,9 +1474,9 @@ int validate_gas(const char *text, struct gasmix *gas)
|
|||
he = 0;
|
||||
text += strlen(translate("gettextFromC", "air"));
|
||||
} else if (!strcasecmp(text, translate("gettextFromC", "oxygen"))) {
|
||||
o2 = 1000;
|
||||
he = 0;
|
||||
text += strlen(translate("gettextFromC", "oxygen"));
|
||||
o2 = 1000;
|
||||
he = 0;
|
||||
text += strlen(translate("gettextFromC", "oxygen"));
|
||||
} else if (!strncasecmp(text, translate("gettextFromC", "ean"), 3)) {
|
||||
o2 = get_permille(text + 3, &text);
|
||||
he = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue