Skip to content

Commit

Permalink
Followed renaming of DaemonSource to RemoteSource in SDRangel 4.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Jan 27, 2019
1 parent 4c856fe commit 72fdfff
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions src/app/channel-details/channel-details-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { WfmModComponent } from './wfm-mod/wfm-mod.component';
import { SsbModComponent } from './ssb-mod/ssb-mod.component';
import { UdpSinkComponent } from './udp-sink/udp-sink.component';
import { UdpSourceComponent } from './udp-source/udp-source.component';
import { DaemonSourceComponent } from './daemon-source/daemon-source.component';
import { RemoteSourceComponent } from './remote-source/remote-source.component';
import { RemoteSinkComponent } from './remote-sink/remote-sink.component';

export const routes: Routes = [
Expand All @@ -35,8 +35,8 @@ export const routes: Routes = [
component: RemoteSinkComponent
},
{
path: 'daemonsource',
component: DaemonSourceComponent
path: 'remotesource',
component: RemoteSourceComponent
},
{
path: 'dsddemod',
Expand Down
4 changes: 2 additions & 2 deletions src/app/channel-details/channel-details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export class ChannelDetailsComponent implements OnInit {
this.router.navigate(['bfmdemod'], { relativeTo: this.route});
} else if (channelSettings.channelType === 'RemoteSink') {
this.router.navigate(['remotesink'], { relativeTo: this.route});
} else if (channelSettings.channelType === 'DaemonSource') {
this.router.navigate(['daemonsource'], { relativeTo: this.route});
} else if (channelSettings.channelType === 'RemoteSource') {
this.router.navigate(['remotesource'], { relativeTo: this.route});
} else if (channelSettings.channelType === 'DSDDemod') {
this.router.navigate(['dsddemod'], { relativeTo: this.route});
} else if (channelSettings.channelType === 'NFMDemod') {
Expand Down
4 changes: 2 additions & 2 deletions src/app/channel-details/channel-details.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { WfmModComponent } from './wfm-mod/wfm-mod.component';
import { SsbModComponent } from './ssb-mod/ssb-mod.component';
import { UdpSinkComponent } from './udp-sink/udp-sink.component';
import { UdpSourceComponent } from './udp-source/udp-source.component';
import { DaemonSourceComponent } from './daemon-source/daemon-source.component';
import { RemoteSourceComponent } from './remote-source/remote-source.component';
import { RemoteSinkComponent } from './remote-sink/remote-sink.component';

@NgModule({
Expand Down Expand Up @@ -57,7 +57,7 @@ import { RemoteSinkComponent } from './remote-sink/remote-sink.component';
SsbModComponent,
UdpSinkComponent,
UdpSourceComponent,
DaemonSourceComponent,
RemoteSourceComponent,
RemoteSinkComponent
]
})
Expand Down
6 changes: 3 additions & 3 deletions src/app/channel-details/channel-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { WFMModSettings, WFMModReport } from './wfm-mod/wfm-mod';
import { SSBModReport, SSBModSettings } from './ssb-mod/ssb-mod';
import { UDPSinkReport, UDPSinkSettings } from './udp-sink/udp-sink';
import { UDPSourceSettings, UDPSourceReport } from './udp-source/udp-source';
import { DaemonSourceSettings, DaemonSourceReport } from './daemon-source/daemon-source';
import { RemoteSourceSettings, RemoteSourceReport } from './remote-source/remote-source';
import { RemoteSinkSettings } from './remote-sink/remote-sink';

export interface ChannelSettings {
Expand All @@ -24,7 +24,7 @@ export interface ChannelSettings {
WFMDemodSettings?: WFMDemodSettings;
AMModSettings?: AMModSettings;
NFMModSettings?: NFMModSettings;
DaemonSourceSettings?: DaemonSourceSettings;
RemoteSourceSettings?: RemoteSourceSettings;
RemoteSinkSettings?: RemoteSinkSettings;
SSBModSettings?: SSBModSettings;
UDPSourceSettings?: UDPSourceSettings;
Expand All @@ -41,7 +41,7 @@ export interface ChannelReport {
WFMDemodReport?: WFMDemodReport;
AMModReport?: AMModReport;
NFMModReport?: NFMModReport;
DaemonSourceReport?: DaemonSourceReport;
RemoteSourceReport?: RemoteSourceReport;
SSBModReport?: SSBModReport;
UDPSourceReport?: UDPSourceReport;
UDPSinkReport?: UDPSinkReport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(click)="toggleMonitor()">
<img src="./assets/icons/eye-icon.svg" style="height:16px; width:16px; margin-top: 2px;"/>
</button>&nbsp;
<app-channel-header class="channel-header-comp" channelType="DaemonSource"
<app-channel-header class="channel-header-comp" channelType="RemoteSource"
[basebandRate]="deviceBasebandRate"
[title]="settings.title"
[color]="rgbTitleStr"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DaemonSourceComponent } from './daemon-source.component';
import { RemoteSourceComponent } from './remote-source.component';
import { ChannelHeaderComponent } from '../channel-header/channel-header.component';
import { ChannelMonitorComponent } from '../channel-monitor/channel-monitor.component';
import { RouterModule, ActivatedRoute } from '@angular/router';
Expand All @@ -10,14 +10,14 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CommonComponentsModule } from '../../common-components/common-components.module';
import { ColorPickerModule } from 'ngx-color-picker';

describe('DaemonSourceComponent', () => {
let component: DaemonSourceComponent;
let fixture: ComponentFixture<DaemonSourceComponent>;
describe('RemoteSourceComponent', () => {
let component: RemoteSourceComponent;
let fixture: ComponentFixture<RemoteSourceComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
DaemonSourceComponent,
RemoteSourceComponent,
ChannelHeaderComponent,
ChannelMonitorComponent
],
Expand All @@ -42,7 +42,7 @@ describe('DaemonSourceComponent', () => {
}));

beforeEach(() => {
fixture = TestBed.createComponent(DaemonSourceComponent);
fixture = TestBed.createComponent(RemoteSourceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { DaemonSourceSettings, DAEMON_SOURCE_SETTINGS_DEFAULT, DaemonSourceReport, DAEMON_SOURCE_REPORT_DEFAULT } from './daemon-source';
import { RemoteSourceSettings, REMOTE_SOURCE_SETTINGS_DEFAULT, RemoteSourceReport, REMOTE_SOURCE_REPORT_DEFAULT } from './remote-source';
import { ActivatedRoute } from '@angular/router';
import { ChannelDetailsService } from '../channel-details.service';
import { DevicesetService } from '../../deviceset/deviceset/deviceset.service';
Expand All @@ -10,16 +10,16 @@ import { Utils } from '../../common-components/utils';
import { ChannelSettings } from '../channel-details';

@Component({
selector: 'app-daemon-source',
templateUrl: './daemon-source.component.html',
styleUrls: ['./daemon-source.component.css']
selector: 'app-remote-source',
templateUrl: './remote-source.component.html',
styleUrls: ['./remote-source.component.css']
})
export class DaemonSourceComponent implements OnInit {
export class RemoteSourceComponent implements OnInit {
deviceIndex: number;
channelIndex: number;
sdrangelURL: string;
settings: DaemonSourceSettings = DAEMON_SOURCE_SETTINGS_DEFAULT;
report: DaemonSourceReport = DAEMON_SOURCE_REPORT_DEFAULT;
settings: RemoteSourceSettings = REMOTE_SOURCE_SETTINGS_DEFAULT;
report: RemoteSourceReport = REMOTE_SOURCE_REPORT_DEFAULT;
deviceCenterFrequency: number;
deviceBasebandRate: number;
statusMessage: string;
Expand Down Expand Up @@ -95,25 +95,25 @@ export class DaemonSourceComponent implements OnInit {
private getChannelSettings() {
this.channeldetailsService.getSettings(this.sdrangelURL, this.deviceIndex, this.channelIndex).subscribe(
channelSettings => {
if (channelSettings.channelType === 'DaemonSource') {
if (channelSettings.channelType === 'RemoteSource') {
this.statusMessage = 'OK';
this.statusError = false;
this.settings = channelSettings.DaemonSourceSettings;
this.settings = channelSettings.RemoteSourceSettings;
this.rgbTitle = Utils.intToRGB(this.settings.rgbColor);
this.rgbTitleStr = Utils.getRGBStr(this.rgbTitle);
} else {
this.statusMessage = 'Not a DaemonSource channel';
this.statusMessage = 'Not a RemoteSource channel';
this.statusError = true;
}
}
);
}

private setDeviceSettings(daemonSourceSettings: DaemonSourceSettings) {
private setDeviceSettings(daemonSourceSettings: RemoteSourceSettings) {
const settings: ChannelSettings = <ChannelSettings>{};
settings.channelType = 'DaemonSource';
settings.channelType = 'RemoteSource';
settings.tx = 1,
settings.DaemonSourceSettings = daemonSourceSettings;
settings.RemoteSourceSettings = daemonSourceSettings;
this.channeldetailsService.setSettings(this.sdrangelURL, this.deviceIndex, this.channelIndex, settings).subscribe(
res => {
console.log('Set settings OK', res);
Expand All @@ -135,7 +135,7 @@ export class DaemonSourceComponent implements OnInit {
this.channeldetailsService.getReport(this.sdrangelURL, this.deviceIndex, this.channelIndex).subscribe(
channelReport => {
if (channelReport.channelType === 'DaemonSource') {
this.report = channelReport.DaemonSourceReport;
this.report = channelReport.RemoteSourceReport;
const timestampUs = this.report.tvSec * 1000000 + this.report.tvUSec;
if (this.lastTimestampUs === 0) {
this.lastTimestampUs = timestampUs;
Expand Down Expand Up @@ -182,7 +182,7 @@ export class DaemonSourceComponent implements OnInit {
}

setTitleColor() {
const newSettings: DaemonSourceSettings = <DaemonSourceSettings>{};
const newSettings: RemoteSourceSettings = <RemoteSourceSettings>{};
newSettings.rgbColor = Utils.rgbToInt(this.rgbTitleStr);
this.setDeviceSettings(newSettings);
}
Expand All @@ -193,19 +193,19 @@ export class DaemonSourceComponent implements OnInit {
}

setTitle() {
const newSettings: DaemonSourceSettings = <DaemonSourceSettings>{};
const newSettings: RemoteSourceSettings = <RemoteSourceSettings>{};
newSettings.title = this.settings.title;
this.setDeviceSettings(newSettings);
}

setDataAddress() {
const newSettings: DaemonSourceSettings = <DaemonSourceSettings>{};
const newSettings: RemoteSourceSettings = <RemoteSourceSettings>{};
newSettings.dataAddress = this.settings.dataAddress;
this.setDeviceSettings(newSettings);
}

setDataPort() {
const newSettings: DaemonSourceSettings = <DaemonSourceSettings>{};
const newSettings: RemoteSourceSettings = <RemoteSourceSettings>{};
newSettings.dataPort = this.settings.dataPort;
this.setDeviceSettings(newSettings);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
export interface DaemonSourceSettings {
export interface RemoteSourceSettings {
dataAddress: string;
dataPort: number;
rgbColor: number;
title: string;
}

export const DAEMON_SOURCE_SETTINGS_DEFAULT = {
export const REMOTE_SOURCE_SETTINGS_DEFAULT = {
dataAddress: '127.0.0.1',
dataPort: 9090,
rgbColor: -7601148,
title: 'Daemon channel source'
title: 'Remote channel source'
};

export interface DaemonSourceReport {
export interface RemoteSourceReport {
centerFreq: number;
correctableErrorsCount: number;
nbFECBlocks: number;
Expand All @@ -26,7 +26,7 @@ export interface DaemonSourceReport {
uncorrectableErrorsCount: number;
}

export const DAEMON_SOURCE_REPORT_DEFAULT = {
export const REMOTE_SOURCE_REPORT_DEFAULT = {
centerFreq: 434900,
correctableErrorsCount: 0,
nbFECBlocks: 8,
Expand Down

0 comments on commit 72fdfff

Please sign in to comment.