Additional module type logging

pull/42/head
sh123 2021-11-13 11:27:57 +02:00
rodzic a07dbada5a
commit 36a621766d
1 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -215,7 +215,8 @@ void Service::setupLora(long loraFreq, long bw, int sf, int cr, int pwr, int syn
radio_->setCRC(enableCrc); radio_->setCRC(enableCrc);
//radio_->forceLDRO(false); //radio_->forceLDRO(false);
#ifdef USE_SX126X #ifdef USE_SX126X
#pragma message("Using SX1268") #pragma message("Using SX126X")
LOG_INFO("Using SX126X module");
radio_->setRfSwitchPins(4, 5); radio_->setRfSwitchPins(4, 5);
radio_->clearDio1Action(); radio_->clearDio1Action();
if (config_.LoraUseIsr) { if (config_.LoraUseIsr) {
@ -224,7 +225,8 @@ void Service::setupLora(long loraFreq, long bw, int sf, int cr, int pwr, int syn
radio_->setDio1Action(onLoraDataAvailableIsrNoRead); radio_->setDio1Action(onLoraDataAvailableIsrNoRead);
} }
#else #else
#pragma message("Using SX1278") #pragma message("Using SX127X")
LOG_INFO("Using SX127X module");
radio_->clearDio0Action(); radio_->clearDio0Action();
if (config_.LoraUseIsr) { if (config_.LoraUseIsr) {
radio_->setDio0Action(onLoraDataAvailableIsr); radio_->setDio0Action(onLoraDataAvailableIsr);
@ -653,7 +655,7 @@ bool Service::onRigTxBegin()
void Service::onRigTx(byte b) void Service::onRigTx(byte b)
{ {
LOG_TRACE((char)b, b); LOG_TRACE((char)b, String(b, HEX));
#ifdef USE_RADIOLIB #ifdef USE_RADIOLIB
txQueue_.push(b); txQueue_.push(b);
#else #else
@ -717,7 +719,7 @@ void Service::attachKissNetworkClient()
void Service::onSerialTx(byte b) void Service::onSerialTx(byte b)
{ {
LOG_TRACE((char)b, b); LOG_TRACE((char)b, String(b, HEX));
if (config_.UsbSerialEnable) { if (config_.UsbSerialEnable) {
Serial.write(b); Serial.write(b);
} }
@ -772,7 +774,7 @@ bool Service::onSerialRx(byte *b)
return false; return false;
} }
*b = (byte)rxResult; *b = (byte)rxResult;
LOG_TRACE((char)rxResult, rxResult); LOG_TRACE((char)rxResult, String(rxResult, HEX));
return true; return true;
} }