windows adjustements

This commit is contained in:
dj2ls 2022-01-11 16:53:35 +01:00
parent a8d921bc6e
commit 2f146ec4a3
3 changed files with 23 additions and 11 deletions

View file

@ -929,6 +929,7 @@
<option selected value="255">AUTO</option>
<option value="10">HIGH SNR (DC1)</option>
<option value="12">MED SNR (DC3)</option>
<option value="14">LOW SNR (DC0)</option>
</select>
</div>
</div>

View file

@ -73,7 +73,7 @@ Spectrum.prototype.drawSpectrum = function(bins) {
var height = this.ctx.canvas.height;
// Fill with black
this.ctx.fillStyle = "black";
this.ctx.fillStyle = "white";
this.ctx.fillRect(0, 0, width, height);
// FFT averaging
@ -192,7 +192,7 @@ Spectrum.prototype.addData = function(data) {
if (data.length != this.wf_size) {
this.wf_size = data.length;
this.ctx_wf.canvas.width = data.length;
this.ctx_wf.fillStyle = "black";
this.ctx_wf.fillStyle = "white";
this.ctx_wf.fillRect(0, 0, this.wf.width, this.wf.height);
this.imagedata = this.ctx_wf.createImageData(data.length, 1);
}
@ -396,7 +396,7 @@ function Spectrum(id, options) {
this.paused = false;
this.fullscreen = false;
this.min_db = 0;
this.max_db = 50;
this.max_db = 70;
this.spectrumHeight = 0;
// Colors
@ -408,7 +408,7 @@ function Spectrum(id, options) {
this.canvas.height = this.canvas.clientHeight;
this.canvas.width = this.canvas.clientWidth;
this.ctx = this.canvas.getContext("2d");
this.ctx.fillStyle = "black";
this.ctx.fillStyle = "white";
this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
// Create offscreen canvas for axes

View file

@ -26,12 +26,23 @@ def freedv_get_mode(mode):
# pathlib.Path("lib/codec2/linux/libcodec2.so.1.0") precompiled
# pathlib.Path("../../tnc/codec2/build_linux/src/libcodec2.so.1.0") external loading manual build
# pathlib.Path("../../tnc/lib/codec2/linux/libcodec2.so.1.0") external loading precompiled
libname = ["libcodec2.so", \
pathlib.Path("codec2/build_linux/src/libcodec2.so.1.0"), \
pathlib.Path("lib/codec2/linux/libcodec2.so.1.0"), \
pathlib.Path("../tnc/codec2/build_linux/src/libcodec2.so.1.0"), \
pathlib.Path("../tnc/lib/codec2/linux/libcodec2.so.1.0"), \
]
if sys.platform == 'linux':
libname = ["libcodec2.so", \
pathlib.Path("codec2/build_linux/src/libcodec2.so.1.0"), \
pathlib.Path("lib/codec2/linux/libcodec2.so.1.0"), \
pathlib.Path("../tnc/codec2/build_linux/src/libcodec2.so.1.0"), \
pathlib.Path("../tnc/lib/codec2/linux/libcodec2.so.1.0"), \
]
elif sys.platform == 'win32' or sys.platform == 'win64':
libname = ["libcodec2.dll", \
pathlib.Path("lib\\codec2\\windows\\libcodec2.dll"), \
]
else:
print(f"[C2 ] Platform not supported {sys.platform}", file=sys.stderr)
# iterate through codec2 search pathes
for i in libname:
try:
@ -44,7 +55,7 @@ for i in libname:
# quit module if codec2 cant be loaded
if not 'api' in locals():
print(f"[C2 ] Loading Codec2 library failed", file=sys.stderr)
quit()