chg: 'data detectclocks' - skip if isnoise

This commit is contained in:
iceman1001 2019-03-09 14:00:46 +01:00
parent aebfe193dc
commit 6d364ec70d

View file

@ -96,6 +96,8 @@ bool HasGraphData(){
// Get or auto-detect ask clock rate
int GetAskClock(const char *str, bool printAns) {
if (getSignalProperties()->isnoise)
return false;
int clock = param_get32ex(str, 0, 0, 10);
if (clock > 0)
@ -127,6 +129,9 @@ int GetAskClock(const char *str, bool printAns) {
}
uint8_t GetPskCarrier(const char *str, bool printAns) {
if (getSignalProperties()->isnoise)
return false;
uint8_t carrier = 0;
uint8_t bits[MAX_GRAPH_TRACE_LEN] = {0};
size_t size = getFromGraphBuf(bits);
@ -145,6 +150,10 @@ uint8_t GetPskCarrier(const char *str, bool printAns) {
}
int GetPskClock(const char* str, bool printAns) {
if (getSignalProperties()->isnoise)
return -1;
int clock = param_get32ex(str, 0, 0, 10);
if (clock != 0)
return clock;
@ -168,6 +177,9 @@ int GetPskClock(const char* str, bool printAns) {
int GetNrzClock(const char* str, bool printAns) {
if (getSignalProperties()->isnoise)
return -1;
int clock = param_get32ex(str, 0, 0, 10);
if (clock != 0)
return clock;
@ -213,6 +225,10 @@ int GetFskClock(const char* str, bool printAns) {
return 0;
}
bool fskClocks(uint8_t *fc1, uint8_t *fc2, uint8_t *rf1, int *firstClockEdge) {
if (getSignalProperties()->isnoise)
return false;
uint8_t bits[MAX_GRAPH_TRACE_LEN] = {0};
size_t size = getFromGraphBuf(bits);
if (size == 0)