Skip to content

Commit

Permalink
HackRF: input: removed Tx sync flag. Output: implemented Fc pos
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Apr 15, 2019
1 parent 4c1a924 commit dc882ff
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AddDevicesetDialogComponent } from './main/add-deviceset-dialog/add-dev
export class AppComponent {

title = 'SDRangelCli';
version = '1.0.2';
version = '1.0.3';
sdrangelURL = 'http://127.0.0.1:8091/sdrangel'; // the default URL

constructor(private sdrangelUrlService: SdrangelUrlService,
Expand Down
2 changes: 0 additions & 2 deletions src/app/device-details/hackrf-input/hackrf-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export interface HackRFInputSettings {
devSampleRate: number;
fcPos: number;
iqCorrection: number;
linkTxFrequency: number;
lnaExt: number;
lnaGain: number;
log2Decim: number;
Expand All @@ -27,7 +26,6 @@ export const HACKRF_INPUT_SETTINGS_DEFAULT = {
devSampleRate: 2400000,
fcPos: 2,
iqCorrection: 0,
linkTxFrequency: 0,
lnaExt: 0,
lnaGain: 16,
log2Decim: 0,
Expand Down
13 changes: 11 additions & 2 deletions src/app/device-details/hackrf-output/hackrf-output.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</td>
<td></td>
</tr>
<!--- Sample rate, Interpolation -->
<!--- Sample rate, Interpolation, Fc pos -->
<tr>
<td>
SR
Expand All @@ -90,7 +90,16 @@
</mat-select>
</td>
<td>
</td>
Fc pos
<mat-select style="width:8ch; background-color: white; margin: 1px;"
[(value)]="settings.fcPos"
(selectionChange)="setFcPos()"
matTooltip="Center frequency position">
<mat-option *ngFor="let fcPos of fcPositions" [value]="fcPos.value">
{{fcPos.viewValue}}
</mat-option>
</mat-select>
</td>
</tr>
<!--- Use reverse API, reverse API device index -->
<tr>
Expand Down
16 changes: 16 additions & 0 deletions src/app/device-details/hackrf-output/hackrf-output.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ interface Log2Interp {
viewValue: number;
}

interface FcPos {
value: number;
viewValue: string;
}

interface RFBandwidth {
value: number;
viewValue: number;
Expand All @@ -34,6 +39,11 @@ export class HackrfOutputComponent implements OnInit {
{value: 5, viewValue: 32},
{value: 6, viewValue: 64},
];
fcPositions: FcPos[] = [
{value: 0, viewValue: 'Inf'},
{value: 1, viewValue: 'Sup'},
{value: 2, viewValue: 'Cen'},
];
rfBandwidths: RFBandwidth[] = [
{value: 1750000, viewValue: 1.75},
{value: 2500000, viewValue: 2.5},
Expand Down Expand Up @@ -169,6 +179,12 @@ export class HackrfOutputComponent implements OnInit {
this.setDeviceSettings(newSettings);
}

setFcPos() {
const newSettings: HackRFOutputSettings = <HackRFOutputSettings>{};
newSettings.fcPos = this.settings.fcPos;
this.setDeviceSettings(newSettings);
}

setRFAmp() {
const newSettings: HackRFOutputSettings = <HackRFOutputSettings>{};
newSettings.lnaExt = this.rfAmp ? 1 : 0;
Expand Down
2 changes: 2 additions & 0 deletions src/app/device-details/hackrf-output/hackrf-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface HackRFOutputSettings {
biasT: number;
centerFrequency: number;
devSampleRate: number;
fcPos: number;
lnaExt: number;
log2Interp: number;
vgaGain: number;
Expand All @@ -19,6 +20,7 @@ export const HACKRF_OUTPUT_SETTINGS_DEFAULT = {
biasT: 0,
centerFrequency: 435000000,
devSampleRate: 2000000,
fcPos: 2,
lnaExt: 1,
log2Interp: 5,
vgaGain: 19,
Expand Down

0 comments on commit dc882ff

Please sign in to comment.