1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-03 05:37:50 -04:00

Merge branch 'f4exb:master' into freq_scanner

This commit is contained in:
srcejon 2025-03-06 13:46:24 +00:00 committed by GitHub
commit 5ae5641f99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 6 deletions

View File

@ -10,6 +10,8 @@ on:
jobs: jobs:
build_mac_x64: build_mac_x64:
runs-on: macos-13 runs-on: macos-13
env:
MACOSX_DEPLOYMENT_TARGET: 12.0
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:

View File

@ -859,7 +859,7 @@ if(ENABLE_CHANNELRX_REMOTETCPSINK)
ExternalProject_Add(flac ExternalProject_Add(flac
GIT_REPOSITORY https://github.com/xiph/flac.git GIT_REPOSITORY https://github.com/xiph/flac.git
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/flac" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/flac"
CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DINSTALL_MANPAGES=OFF -D=BUILD_SHARED_LIBS=ON -DWITH_FORTIFY_SOURCE=OFF -DWITH_STACK_PROTECTOR=PFF -DBUILD_PROGRAMS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DWITH_OGG=OFF -DBUILD_DOCS=OFF CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DINSTALL_MANPAGES=OFF -DBUILD_SHARED_LIBS=ON -DWITH_FORTIFY_SOURCE=OFF -DWITH_STACK_PROTECTOR=PFF -DBUILD_PROGRAMS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DWITH_OGG=OFF -DBUILD_DOCS=OFF
BUILD_BYPRODUCTS "${FLAC_LIBRARIES}" BUILD_BYPRODUCTS "${FLAC_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""

View File

@ -76,6 +76,12 @@ QString RS41Frame::toHex()
return m_bytes.toHex(); return m_bytes.toHex();
} }
int16_t RS41Frame::getInt16(const QByteArray ba, int offset) const
{
return (ba[offset] & 0xff)
| ((ba[offset+1] & 0xff) << 8);
}
uint16_t RS41Frame::getUInt16(const QByteArray ba, int offset) const uint16_t RS41Frame::getUInt16(const QByteArray ba, int offset) const
{ {
return (ba[offset] & 0xff) return (ba[offset] & 0xff)
@ -130,7 +136,7 @@ void RS41Frame::decodeMeas(const QByteArray ba)
m_pressureMain = getUInt24(ba, 0x1b); m_pressureMain = getUInt24(ba, 0x1b);
m_pressureRef1 = getUInt24(ba, 0x1e); m_pressureRef1 = getUInt24(ba, 0x1e);
m_pressureRef2 = getUInt24(ba, 0x21); m_pressureRef2 = getUInt24(ba, 0x21);
m_pressureTemp = getUInt16(ba, 0x26) / 100.0f; m_pressureTemp = getInt16(ba, 0x26) / 100.0f;
} }
void RS41Frame::decodeGPSInfo(const QByteArray ba) void RS41Frame::decodeGPSInfo(const QByteArray ba)
@ -187,7 +193,7 @@ static float waterVapourSaturationPressure(float tCelsius)
return p / 100.0f; return p / 100.0f;
} }
static float calcT(int f, int f1, int f2, float r1, float r2, float *poly, float *cal) static float calcT(int f, int f1, int f2, float r1, float r2, const float *poly, const float *cal)
{ {
/*float g = (float)(f2-f1) / (r2-r1); // gain /*float g = (float)(f2-f1) / (r2-r1); // gain
float Rb = (f1*r2-f2*r1) / (float)(f2-f1); // offset float Rb = (f1*r2-f2*r1) / (float)(f2-f1); // offset
@ -219,7 +225,7 @@ static float calcT(int f, int f1, int f2, float r1, float r2, float *poly, float
return tCal; return tCal;
} }
static float calcU(int cInt, int cMin, int cMax, float c1, float c2, float T, float HT, float *capCal, float *matrixCal, float height, float *vectorPCal, float *matrixPCal) static float calcU(int cInt, int cMin, int cMax, float c1, float c2, float T, float HT, const float *capCal, const float *matrixCal, float height, const float *vectorPCal, const float *matrixPCal)
{ {
//qDebug() << "cInt " << cInt << " cMin " << cMin << " cMax " << cMax << " c1 " << c1 << " c2 " << c2 << " T " << T << " HT " << HT << " capCal[0] " << capCal[0] << " capCal[1] " << capCal[1] << "height" << height; //qDebug() << "cInt " << cInt << " cMin " << cMin << " cMax " << cMax << " c1 " << c1 << " c2 " << c2 << " T " << T << " HT " << HT << " capCal[0] " << capCal[0] << " capCal[1] " << capCal[1] << "height" << height;
@ -302,7 +308,7 @@ static float calcU(int cInt, int cMin, int cMax, float c1, float c2, float T, fl
return uCal; return uCal;
} }
static float calcP(int f, int f1, int f2, float pressureTemp, float *cal) static float calcP(int f, int f1, int f2, float pressureTemp, const float *cal)
{ {
// Convert integer measurement to scale factor // Convert integer measurement to scale factor
float s = (f-f1) / (float)(f2-f1); float s = (f-f1) / (float)(f2-f1);

View File

@ -124,6 +124,7 @@ public:
static int getFrameLength(int frameType); static int getFrameLength(int frameType);
protected: protected:
int16_t getInt16(const QByteArray ba, int offset) const;
uint16_t getUInt16(const QByteArray ba, int offset) const; uint16_t getUInt16(const QByteArray ba, int offset) const;
uint32_t getUInt24(const QByteArray ba, int offset) const; uint32_t getUInt24(const QByteArray ba, int offset) const;
uint32_t getUInt32(const QByteArray ba, int offset) const; uint32_t getUInt32(const QByteArray ba, int offset) const;

View File

@ -444,6 +444,7 @@ EMNR::G::G(
std::copy(Calculus::GG.begin(), Calculus::GG.end(), GG.begin()); std::copy(Calculus::GG.begin(), Calculus::GG.end(), GG.begin());
std::copy(Calculus::GGS.begin(), Calculus::GGS.end(), GGS.begin()); std::copy(Calculus::GGS.begin(), Calculus::GGS.end(), GGS.begin());
/* Removed as redundant and causes a stack overflow on Mac - see #2324
// We keep this pretty useless part just in case... // We keep this pretty useless part just in case...
if ((fileb = fopen("calculus", "rb"))) if ((fileb = fopen("calculus", "rb")))
{ {
@ -462,7 +463,7 @@ EMNR::G::G(
std::copy(ggs.begin(), ggs.end(), GGS.begin()); std::copy(ggs.begin(), ggs.end(), GGS.begin());
} }
fclose(fileb); fclose(fileb);
} }*/
} }
void EMNR::G::calc_gamma0() void EMNR::G::calc_gamma0()