mirror of
https://github.com/intrepidcs/icsscand.git
synced 2026-09-21 16:48:21 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7e4af48c2 |
@@ -1,8 +1,3 @@
|
||||
v2.0.3
|
||||
Update copyright date
|
||||
Update to libicsneo v0.2.0
|
||||
Ensure lock is held when accessing open devices
|
||||
|
||||
v2.0.2
|
||||
Use libicsneo v0.1.2 to resolve LEDs not indicating device status
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(libicsneo-socketcan-daemon VERSION 2.0.3)
|
||||
project(libicsneo-socketcan-daemon VERSION 2.0.2)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2016-2020 Intrepid Control Systems, Inc.
|
||||
Copyright (c) 2016-2019 Intrepid Control Systems, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
Version 2.0.3
|
||||
Version 2.0.2
|
||||
|
||||
This is the usermode daemon for the Intrepid Control Systems SocketCAN support. This daemon requires that ```intrepid.ko``` is loaded on your system.
|
||||
|
||||
1. Build and load the kernel module follwowing the instructions in [intrepid-socketcan-kernel-module](https://github.com/intrepidcs/intrepid-socketcan-kernel-module).
|
||||
|
||||
2. Install the dependencies needed. These are CMake 3.2+, GCC 4.8+, git, libusb-1.0-0-dev, and libpcap.
|
||||
2. Install the dependencies needed. These are CMake 3.2+, GCC 4.8+, git, and libusb-1.0-0-dev.
|
||||
|
||||
On Ubuntu or other Debian-based systems, run `sudo apt install git cmake gcc libusb-1.0-0-dev libpcap-dev build-essential`.
|
||||
On Ubuntu or other Debian-based systems, run `sudo apt install git cmake gcc libusb-1.0-0-dev build-essential`.
|
||||
|
||||
3. Clone this repository recursively by running `git clone --recursive https://github.com/intrepidcs/icsscand.git`
|
||||
|
||||
4. Switch into the cloned directory, `cd icsscand`
|
||||
|
||||
5. Make a build directory and switch into it, `mkdir build && cd build`
|
||||
5. Make a build directory and switch into it, `mkdir -p build && cd build`
|
||||
|
||||
6. Invoke CMake, `cmake .. -DCMAKE_BUILD_TYPE=Release`
|
||||
|
||||
|
||||
+3
-5
@@ -187,7 +187,7 @@ void header() {
|
||||
|
||||
void usage(std::string executableName) {
|
||||
std::cerr << "The libicsneo SocketCAN Usermode Daemon\n";
|
||||
std::cerr << "Copyright 2019-2020 Intrepid Control Systems, Inc.\n\n";
|
||||
std::cerr << "Copyright Intrepid Control Systems, Inc. 2019\n\n";
|
||||
std::cerr << "Usage: " << executableName << " [option]\n\n";
|
||||
std::cerr << "Options:\n";
|
||||
std::cerr << "\t-d, --daemon\t\tRun as a daemon in the background\n";
|
||||
@@ -223,8 +223,8 @@ void searchForDevices() {
|
||||
});
|
||||
if(!newDevice.device->open() || !newDevice.device->goOnline()) {
|
||||
if(firstTimeFailedToOpen) {
|
||||
const std::string err = icsneo::GetLastError().describe();
|
||||
LOGF(LOG_INFO, "%s failed to connect. Will keep trying...\n%s\n", newDevice.device->describe().c_str(), err.c_str());
|
||||
icsneo::APIEvent err = icsneo::GetLastError();
|
||||
LOGF(LOG_INFO, "%s failed to connect. Will keep trying...\n%s\n", newDevice.device->describe().c_str(), err.describe().c_str());
|
||||
failedToOpen.push_back(serial);
|
||||
}
|
||||
continue;
|
||||
@@ -274,7 +274,6 @@ void searchForDevices() {
|
||||
return;
|
||||
auto canMessage = std::static_pointer_cast<icsneo::CANMessage>(message);
|
||||
const OpenDevice* openDevice = nullptr;
|
||||
std::lock_guard<std::mutex> lg(openDevicesMutex);
|
||||
for(const auto& dev : openDevices) {
|
||||
if(dev.device->getSerial() == serial) {
|
||||
openDevice = &dev;
|
||||
@@ -482,7 +481,6 @@ int main(int argc, char** argv) {
|
||||
msg->data = currentPosition;
|
||||
currentPosition += msg->length;
|
||||
bool sent = false;
|
||||
std::lock_guard<std::mutex> lg(openDevicesMutex);
|
||||
for(auto& dev : openDevices) {
|
||||
for(auto& netifPair : dev.interfaces) {
|
||||
if(netifPair.second->getKernelHandle() != msg->netid)
|
||||
|
||||
Vendored
+1
-1
Submodule third-party/libicsneo updated: b09f85693f...f16ee630ee
Reference in New Issue
Block a user