diff --git a/Controller.cpp b/Controller.cpp index ad4fcd6..0ffd061 100644 --- a/Controller.cpp +++ b/Controller.cpp @@ -393,6 +393,7 @@ void CController::Dump(const std::shared_ptr p, const std::st std::cout << " and "; if (p->IsLast()) std::cout << "the last packet"; + std::cout << std::endl; } auto width = std::cout.width(2); auto fill = std::cout.fill('0'); @@ -400,21 +401,21 @@ void CController::Dump(const std::shared_ptr p, const std::st { std::cout << "DStar data: "; for (unsigned int i=0; i<9; i++) - std::cout << p->GetDStarData()[i]; + std::cout << unsigned(p->GetDStarData()[i]); std::cout << std::endl; } if (p->DMRIsSet()) { std::cout << "DMR Data: "; for (unsigned int i=0; i<9; i++) - std::cout << p->GetDMRData()[i]; + std::cout << unsigned(p->GetDMRData()[i]); std::cout << std::endl; } if (p->M17IsSet()) { std::cout << "M17 Data: "; for (unsigned int i=0; i<16; i++) - std::cout << p->GetM17Data()[i]; + std::cout << unsigned(p->GetM17Data()[i]); std::cout << std::endl; } std::cout << std::dec; diff --git a/DV3003.cpp b/DV3003.cpp index a3d81d7..9125cc3 100644 --- a/DV3003.cpp +++ b/DV3003.cpp @@ -337,7 +337,7 @@ bool CDV3003::SendAudio(const uint8_t channel, const int16_t *audio) const const uint16_t len = 323; p.header.payload_length = htons(len); p.header.packet_type = PKT_SPEECH; - p.field_id = channel; + p.field_id = channel + PKT_CHANNEL0; p.payload.audio.speechd = 0x0U; p.payload.audio.num_samples = 160U; for (int i=0; i<160; i++) @@ -359,7 +359,7 @@ bool CDV3003::SendData(const uint8_t channel, const uint8_t *data) const p.start_byte = PKT_HEADER; p.header.payload_length = htons(12); p.header.packet_type = PKT_CHANNEL; - p.field_id = channel; + p.field_id = channel + PKT_CHANNEL0; p.payload.ambe.num_bits = 72U; p.payload.ambe.chand = 0x1U; memcpy(p.payload.ambe.data, data, 9);