add command line argument to override enable modem debug (faster then continually modifying the YAML config file);

3.56-maint
Bryan Biedenkapp 2 years ago
parent 243ad6ce0c
commit fe3d0b7e35

@ -101,6 +101,8 @@ bool g_fireNXDNControl = false;
uint8_t* g_gitHashBytes = nullptr;
bool g_modemDebug = false;
// ---------------------------------------------------------------------------
// Global Functions
// ---------------------------------------------------------------------------
@ -163,6 +165,7 @@ void usage(const char* message, const char* arg)
"\n\n"
" -v show version information\n"
" -h show this screen\n"
" -d force modem debug\n"
" -f foreground mode\n"
"\n"
" --setup setup and calibration mode\n"
@ -204,6 +207,9 @@ int checkArgs(int argc, char* argv[])
++p;
break;
}
else if (IS("-d")) {
g_modemDebug = true;
}
else if (IS("-f")) {
g_foreground = true;
}

@ -57,6 +57,8 @@ extern bool g_fireNXDNControl;
extern uint8_t* g_gitHashBytes;
extern bool g_modemDebug;
extern HOST_SW_API void fatal(const char* msg, ...);
#endif // __HOST_MAIN_H__

@ -492,6 +492,10 @@ bool Host::createModem()
bool trace = modemConf["trace"].as<bool>(false);
bool debug = modemConf["debug"].as<bool>(false);
// if modem debug is being forced from the commandline -- enable modem debug
if (g_modemDebug)
debug = true;
if (rfPower == 0U) { // clamp to 1
rfPower = 1U;
}

@ -121,6 +121,10 @@ int HostCal::run(int argc, char **argv)
m_channelId = 15U;
}
// if modem debug is being forced from the commandline -- enable modem debug
if (g_modemDebug)
m_debug = true;
if (!calculateRxTxFreq()) {
return false;
}

@ -242,6 +242,10 @@ int HostSetup::run(int argc, char** argv)
m_channelId = 15U;
}
// if modem debug is being forced from the commandline -- enable modem debug
if (g_modemDebug)
m_debug = true;
if (!calculateRxTxFreq(true)) {
return 1;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.