From 52a147e4527374de021148f7605913006623a9aa Mon Sep 17 00:00:00 2001 From: Jiri Pokorny Date: Sun, 18 Aug 2024 00:29:31 +0200 Subject: [PATCH] Removed redundant safety stop property from dive options --- projects/planner/src/app/shared/options.service.ts | 9 --------- projects/planner/src/app/shared/planner.service.spec.ts | 4 ++-- projects/planner/src/app/shared/preferencesStore.spec.ts | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/projects/planner/src/app/shared/options.service.ts b/projects/planner/src/app/shared/options.service.ts index bf3a8285..891d149d 100644 --- a/projects/planner/src/app/shared/options.service.ts +++ b/projects/planner/src/app/shared/options.service.ts @@ -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; } @@ -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; } diff --git a/projects/planner/src/app/shared/planner.service.spec.ts b/projects/planner/src/app/shared/planner.service.spec.ts index f8f09666..e444879e 100644 --- a/projects/planner/src/app/shared/planner.service.spec.ts +++ b/projects/planner/src/app/shared/planner.service.spec.ts @@ -1,5 +1,5 @@ import { - Time, SafetyStop, StandardGases, + Time, StandardGases, CalculatedProfile, Event } from 'scuba-physics'; import { PlannerService } from './planner.service'; @@ -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); diff --git a/projects/planner/src/app/shared/preferencesStore.spec.ts b/projects/planner/src/app/shared/preferencesStore.spec.ts index 43a17d82..93b8639d 100644 --- a/projects/planner/src/app/shared/preferencesStore.spec.ts +++ b/projects/planner/src/app/shared/preferencesStore.spec.ts @@ -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;