Moved from CAN_BCM to CAN_RAW. Restored basic functionality that BCM had natively. There are likely bugs due to some non functionality between how the original program operated with CAN_BCM and now, but it is working on my bench with a NMEA 2000 GPS.
Update README.md
Restored add/remove ID
Restored ability to remove or add active CAN frames. The CAN_ID must already exist in sniftab for this to work.
Update cansniffer.c
Fixed a potential for a segmentation fault to occur with the sniftab array.
Changed arbitrary max array value to defined name for flexibility with increasing the array size.
Other polish I forgot about.
Settings file operations work
Aligned settings file operations for use with 29bit IDs.
Instead of saving all 800 "slots" (or 11 bits IDs for the program as originally written), it now saves in use slots based on CAN ID and will load that ID into a slot for the program to potentially match upon.
Truncate when overwritting settings
Need to truncate settings file...
Update README.md
Update cansniffer.c
Cleaned up some unused commented code.
GitHub user 'crossband' raised an issue regarding the strict-aliasing compiler
warning in his specific setup: https://github.com/linux-can/can-utils/issues/42
In fact memcpy() and memset() are a better solution than the former pointer
magics, so remove the issues and the compiler warning flag too.
Reported-by: crossband (https://github.com/crossband)
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
As requested by Felix Seitz the timeout for screen updates should be
configurable to values smaller than 100ms. Marc Kleine-Budde provided the
original patch to increase the resolution of the timing relevant variables.
The rotating animation was replaced by a rolling screen update counter.
Additionally the CAN-ID is now printed in the same ASCII hex representation
as the CAN data.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>