Compare commits

..

7 Commits

Author SHA1 Message Date
GGZ8 0f85b27f90
Merge 7815be8741 into 2b8c7c5f4b 2025-02-14 14:00:41 +00:00
Khem Raj 2b8c7c5f4b Include time.h for timespec struct definition
Fixes
git/isobusfs/../libj1939.h:33:18: error: field has incomplete type 'struct timespec'
   33 |         struct timespec next_send_time;
      |                         ^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-02-14 12:41:31 +01:00
Jan Engelhardt 4577316bd6 Update .gitignore 2025-02-14 12:40:42 +01:00
Marc Kleine-Budde 4364d655b8
Merge pull request #576 from jengelh/master
build: give libisobusfs a version
2025-02-12 16:55:15 +01:00
Jan Engelhardt 2e71e396c5 build: give libisobusfs a version 2025-02-10 15:32:27 +01:00
GGZ8 7815be8741 WIP on pr-realcan: 277048e RealCAN implementation 2024-09-30 12:41:39 +02:00
GGZ8 dae324dbd5 index on pr-realcan: 277048e RealCAN implementation 2024-09-30 12:41:39 +02:00
4 changed files with 16 additions and 0 deletions

7
.gitignore vendored
View File

@ -1,6 +1,13 @@
*~
*.a
*.so
*.so.*
*.o
.ccls-cache
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
compile_commands.json
tags
/build

View File

@ -126,6 +126,7 @@ if(NOT ANDROID)
set_target_properties(isobusfs PROPERTIES
PUBLIC_HEADER "${PUBLIC_HEADER_ISOBUSFS}"
SOVERSION 0
)
install(TARGETS isobusfs

View File

@ -857,7 +857,14 @@ int main(int argc, char **argv)
if (ret)
return 1;
int k[] = {1,2};
int j = 0;
while (running) {
ts_gap = double_to_timespec((k[j%2])/1000.0);
// printf("%lu, %lu\n", ts_gap.tv_sec, ts_gap.tv_nsec);
setsockopt_txtime(s);
setup_time();
j++;
/* clear values but preserve cu.fd.len */
cu.fd.flags = 0;
cu.fd.__res0 = 0;

View File

@ -17,6 +17,7 @@
#include <linux/can/j1939.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <sys/socket.h>
#ifndef J1939_LIB_H