Skip to content

Instantly share code, notes, and snippets.

View JenyaZolotarev's full-sized avatar

JenyaZolotarev

View GitHub Profile
@ebroecker
ebroecker / signaldecode.c
Last active September 26, 2019 14:19 — forked from reinzor/signaldecode.c
Decode CAN signals
#include <stdint.h>
#include <iostream>
#include <stdint.h> //uint typedefinitions, non-rtw!
#define MASK64(nbits) ((0xffffffffffffffff)>> (64-nbits))
float toPhysicalValue(uint64_t target, float factor, float offset, bool is_signed)
{
if (is_signed)