fixes for device queries

main
Tom Early 4 years ago
parent bb885cf96a
commit 08ab73c1c0

@ -157,13 +157,12 @@ bool CController::InitVocoders()
{
if (desc.compare(0, 9, "USB-3006 ")) // the USB-3006 device doesn't need this check
{
std::cerr << "Both devices have to be the same type: " << desc << " != " << deviceset.back().second << std::endl;
return true;
std::cout << "Both devices should to be the same type: " << desc << " != " << deviceset.back().second << std::endl;
}
}
Edvtype dvtype = Edvtype::dv3003;
if (0==desc.compare("ThumbDV") || 0==desc.compare("DVstick-30") || 0==desc.compare("USB-3000"))
if (0==desc.compare("ThumbDV") || 0==desc.compare("DVstick-30") || 0==desc.compare("USB-3000") || desc.compare("FT230X Basic UART"))
dvtype = Edvtype::dv3000;
if (modules.size() > ((Edvtype::dv3000 == dvtype) ? 1 : 3))
@ -201,6 +200,12 @@ bool CController::InitVocoders()
}
}
if (dstar_device->GetProductID().compare(dmrsf_device->GetProductID()))
{
std::cerr << "Both devices must have the same DVSI product ID: " << dstar_device->GetProductID() << " != " << dmrsf_device->GetProductID() << std::endl;
return true;
}
// and start them up!
dstar_device->Start();
dmrsf_device->Start();

@ -348,7 +348,7 @@ bool CDVDevice::InitDevice()
dump("Product ID Response Packet", &responsePacket, packet_size(responsePacket));
return true;
}
const std::string productid(responsePacket.payload.ctrl.data.prodid);
productid.assign(responsePacket.payload.ctrl.data.prodid);
ctrlPacket.field_id = PKT_VERSTRING;
status = FT_Write(ftHandle, &ctrlPacket, 5, &written);

@ -36,6 +36,7 @@ public:
void Start();
void CloseDevice();
void AddPacket(const std::shared_ptr<CTranscoderPacket> packet);
std::string GetProductID() { return productid; }
protected:
const Encoding type;
@ -44,7 +45,7 @@ protected:
std::atomic<bool> keep_running;
CPacketQueue input_queue;
std::future<void> feedFuture, readFuture;
std::string description;
std::string description, productid;
bool DiscoverFtdiDevices();
bool ConfigureVocoder(uint8_t pkt_ch, Encoding type);

Loading…
Cancel
Save

Powered by TurnKey Linux.