mirror of
https://github.com/tsukumijima/px4_drv.git
synced 2025-07-22 11:50:35 +02:00
winusb: 末尾の不要なタブ文字を除去
This commit is contained in:
@@ -313,7 +313,7 @@ int main(int argc, char *argv[])
|
||||
if (argv[i][1] == 't') {
|
||||
// target parameter
|
||||
char *t = NULL;
|
||||
|
||||
|
||||
if (argv[i][2] == '\0') {
|
||||
if ((i + 1) < argc)
|
||||
t = argv[++i];
|
||||
|
@@ -20,15 +20,15 @@ public:
|
||||
virtual LPCTSTR GetTunerName(void) = 0;
|
||||
|
||||
virtual const BOOL IsTunerOpening(void) = 0;
|
||||
|
||||
|
||||
virtual LPCTSTR EnumTuningSpace(const DWORD dwSpace) = 0;
|
||||
virtual LPCTSTR EnumChannelName(const DWORD dwSpace, const DWORD dwChannel) = 0;
|
||||
|
||||
virtual const BOOL SetChannel(const DWORD dwSpace, const DWORD dwChannel) = 0;
|
||||
|
||||
|
||||
virtual const DWORD GetCurSpace(void) = 0;
|
||||
virtual const DWORD GetCurChannel(void) = 0;
|
||||
|
||||
|
||||
// IBonDriver
|
||||
virtual void Release(void) = 0;
|
||||
};
|
||||
|
@@ -42,7 +42,7 @@ BonDriver::BonDriver() noexcept
|
||||
current_ofs_(0),
|
||||
quit_event_(nullptr)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
BonDriver::~BonDriver()
|
||||
|
@@ -7,7 +7,7 @@
|
||||
BOOL WINAPI DllMain(HANDLE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
|
||||
|
||||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
if (!px4::util::path::Init(hinstDLL))
|
||||
@@ -17,6 +17,6 @@ BOOL WINAPI DllMain(HANDLE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ DeviceManager::DeviceManager(const px4::DeviceDefinitionSet &device_defs, px4::R
|
||||
|
||||
for (auto it = all_devs.cbegin(); it != all_devs.cend(); ++it) {
|
||||
DeviceType type = DeviceType::UNKNOWN;
|
||||
|
||||
|
||||
if (it->first == L"PX4")
|
||||
type = DeviceType::PX4;
|
||||
else if (it->first == L"PXMLT")
|
||||
@@ -122,7 +122,7 @@ void DeviceManager::Add(const std::wstring &path, const std::pair<DeviceType, px
|
||||
case px4::DeviceType::PX4:
|
||||
{
|
||||
auto dev = std::make_unique<Px4Device>(path, def.second, ++index_, receiver_manager_);
|
||||
|
||||
|
||||
if (!dev->Init())
|
||||
devices_.emplace(path, std::move(dev));
|
||||
|
||||
|
@@ -62,7 +62,7 @@ LRESULT CALLBACK DeviceNotifier::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
||||
return -1;
|
||||
|
||||
dn->notify_handle_ = notify_handle;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -273,7 +273,7 @@ int Isdb2056Device::SetBackendPower(bool state)
|
||||
|
||||
int ret = 0;
|
||||
std::lock_guard<std::recursive_mutex> lock(lock_);
|
||||
|
||||
|
||||
if (!state && !available_)
|
||||
return 0;
|
||||
|
||||
|
@@ -370,7 +370,7 @@ unsigned __stdcall itedtv_winusb_worker(void *arg)
|
||||
|
||||
if (GetLastError() == ERROR_IO_PENDING)
|
||||
continue;
|
||||
|
||||
|
||||
dev_err(bus->dev, "itedtv_winusb_worker: WinUsb_ReadPipe() 2 failed. (%u, %u)\n", idx, GetLastError());
|
||||
work->can_submit = true;
|
||||
}
|
||||
|
@@ -330,7 +330,7 @@ int Px4Device::SetBackendPower(bool state)
|
||||
|
||||
int ret = 0;
|
||||
std::lock_guard<std::recursive_mutex> lock(lock_);
|
||||
|
||||
|
||||
if (!state && !available_)
|
||||
return 0;
|
||||
|
||||
@@ -592,7 +592,7 @@ int Px4Device::MultiDevice::Add(Px4Device &dev)
|
||||
msg_dbg("px4::Px4Device::MultiDevice::Add\n");
|
||||
|
||||
std::uint8_t dev_id = dev.serial_.dev_id - 1;
|
||||
|
||||
|
||||
if (dev_id > 1)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1000,7 +1000,7 @@ int Px4Device::Px4Receiver::Open()
|
||||
}
|
||||
if (ret)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
switch (system_) {
|
||||
case px4::SystemType::ISDB_T:
|
||||
@@ -1054,7 +1054,7 @@ int Px4Device::Px4Receiver::Open()
|
||||
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
|
||||
if (!parent_.open_count_) {
|
||||
for (int i = 0; i < 4; i += 2) {
|
||||
ret = parent_.receivers_[i]->InitPrimary();
|
||||
@@ -1100,7 +1100,7 @@ void Px4Device::Px4Receiver::Close()
|
||||
if (parent_.receivers_[i])
|
||||
parent_.receivers_[i]->Term();
|
||||
}
|
||||
|
||||
|
||||
if (!parent_.mldev_)
|
||||
parent_.SetBackendPower(false);
|
||||
} else if (parent_.available_) {
|
||||
|
@@ -732,7 +732,7 @@ void PxMltDevice::PxMltReceiver::Close()
|
||||
|
||||
lock.unlock();
|
||||
close_cond_.notify_all();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ bool RingBuffer::Alloc(std::size_t size)
|
||||
buf_ = nullptr;
|
||||
buf_size_ = 0;
|
||||
}
|
||||
|
||||
|
||||
if (!buf_ && size) {
|
||||
buf_ = reinterpret_cast<std::uint8_t*>(VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
|
||||
if (!buf_)
|
||||
|
@@ -100,7 +100,7 @@ std::size_t ServerBase::GetActiveConnectionCount() const noexcept
|
||||
void ServerBase::RemoveConnection(Connection *conn, bool destruct) noexcept
|
||||
{
|
||||
bool empty = false;
|
||||
|
||||
|
||||
try {
|
||||
std::lock_guard<std::mutex> lock(mtx_);
|
||||
|
||||
|
@@ -47,7 +47,7 @@ int msg_printf(const char *format, ...)
|
||||
va_start(args, format);
|
||||
c = vsprintf_s(buf, 1024, format, args);
|
||||
va_end(args);
|
||||
|
||||
|
||||
if (mode & MSG_MODE_CONSOLE)
|
||||
printf("%s", buf);
|
||||
|
||||
@@ -56,7 +56,7 @@ int msg_printf(const char *format, ...)
|
||||
|
||||
if ((mode & MSG_MODE_LOG_FILE) && (file_handle != INVALID_HANDLE_VALUE)) {
|
||||
DWORD wb;
|
||||
|
||||
|
||||
WriteFile(file_handle, buf, c, &wb, NULL);
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
protected:
|
||||
Pipe() noexcept : Pipe(nullptr) {}
|
||||
|
||||
|
||||
bool IsConnected() const noexcept { return (handle_ && handle_ != INVALID_HANDLE_VALUE); }
|
||||
void SetHandle(HANDLE handle) noexcept { handle_ = handle; }
|
||||
|
||||
|
@@ -55,7 +55,7 @@ template<> struct hash<GUID> {
|
||||
|
||||
for (int i = 0; i < (sizeof(guid) / sizeof(std::size_t)); i++)
|
||||
val ^= hash(p[i]);
|
||||
|
||||
|
||||
return val;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user