summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-09-03 15:54:52 +0200
committerAijana S <aijana.schumann@highstreet-technologies.com>2020-09-03 15:10:33 +0000
commit0b7b69385f71c353510987d9e6045691fcba8afa (patch)
treeae7b985065f29f1bf34a05fcd5ed06abc3473057 /sdnr/wt/odlux/apps/linkCalculationApp/src/handlers
parent59b9f3a76de1cca0b833a7841dd7dcaeb03f0f65 (diff)
Update LinkCalculator
update linkCalculator with latest changes Issue-ID: CCSDK-2714 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: Ie921da17f46a5e13e08a17d6433c80f7213220f2
Diffstat (limited to 'sdnr/wt/odlux/apps/linkCalculationApp/src/handlers')
-rw-r--r--sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts24
1 files changed, 19 insertions, 5 deletions
diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
index 00dd48d45..85c013572 100644
--- a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
@@ -15,14 +15,13 @@
* the License.
* ============LICENSE_END==========================================================================
*/
-// main state handler
import { combineActionHandler } from '../../../../framework/src/flux/middleware';
// ** do not remove **
import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
import { IActionHandler } from '../../../../framework/src/flux/action';;
-import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction} from '../actions/commonLinkCalculationActions';
+import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction} from '../actions/commonLinkCalculationActions';
declare module '../../../../framework/src/store/applicationStore' {
interface IApplicationStoreState {
@@ -48,7 +47,12 @@ export type ILinkCalculationAppStateState= {
rainAtt : number,
siteA: any,
siteB: any,
- reachable: boolean
+ reachable: boolean,
+ polarization : string | null,
+ amslA: number,
+ amslB:number,
+ aglA: number,
+ aglB:number
}
const initialState: ILinkCalculationAppStateState ={
@@ -65,7 +69,12 @@ const initialState: ILinkCalculationAppStateState ={
siteB: '',
rainVal : 0,
rainAtt: 0,
- reachable : true
+ reachable : true,
+ polarization : 'Horizontal',
+ amslA: 0,
+ amslB:0,
+ aglA: 0,
+ aglB:0
}
@@ -102,7 +111,12 @@ export const LinkCalculationHandler: IActionHandler<ILinkCalculationAppStateStat
}
else if(action instanceof isCalculationServerReachableAction){
state = Object.assign({}, state, { reachable: action.reachable });
-}
+ }
+ else if (action instanceof UpdatePolAction){
+ state = Object.assign({}, state, {polarization: action.polarization})
+ }else if (action instanceof updateAltitudeAction){
+ state = Object.assign({}, state, {amslA:action.amslA, amslB:action.amslA, aglA:action.aglA, aglB:action.aglB})
+ }
return state
}