Skip to content

Commit

Permalink
Removed redundant safety stop property from dive options
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Aug 17, 2024
1 parent 860810f commit 52a147e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions projects/planner/src/app/shared/options.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ export class OptionsService {
return this.options.roundStopsToMinutes;
}

// TODO confirm it is not used
public get safetyStop(): SafetyStop {
return this.options.safetyStop;
}

public get salinity(): Salinity {
return this.options.salinity;
}
Expand Down Expand Up @@ -211,10 +206,6 @@ export class OptionsService {
this.options.roundStopsToMinutes = newValue;
}

public set safetyStop(newValue: SafetyStop) {
this.options.safetyStop = newValue;
}

public set salinity(newValue: Salinity) {
this.options.salinity = newValue;
}
Expand Down
4 changes: 2 additions & 2 deletions projects/planner/src/app/shared/planner.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
Time, SafetyStop, StandardGases,
Time, StandardGases,
CalculatedProfile, Event
} from 'scuba-physics';
import { PlannerService } from './planner.service';
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('PlannerService', () => {
dive = selectedDive.diveResult;
OptionExtensions.applySimpleSpeeds(optionsService.getOptions());
optionsService.problemSolvingDuration = 2;
optionsService.safetyStop = SafetyStop.always;
optionsService.useSafetyOn();
depthsService.plannedDepth = 30;
dispatcher = TestBed.inject(ReloadDispatcher);
planner.calculate(1);
Expand Down
2 changes: 1 addition & 1 deletion projects/planner/src/app/shared/preferencesStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('PreferencesStore', () => {
// setup needed for consumed calculation
const oValues = options.getOptions();
OptionExtensions.applySimpleSpeeds(oValues);
options.safetyStop = SafetyStop.always;
options.useSafetyOn();
options.gasSwitchDuration = 1;
options.problemSolvingDuration = 2;
depthsService.plannedDepth = 30;
Expand Down

0 comments on commit 52a147e

Please sign in to comment.