File: GetCANandTick.js

package info (click to toggle)
savvycan 220-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,456 kB
  • sloc: cpp: 61,803; sh: 293; javascript: 91; python: 44; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 340 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function setup ()
{
    host.log("Example script 1.0");
    host.setTickInterval(20000);
    can.sendFrame(0, 0x7E0, 8, [0x0d, 1, 0, 0, 0, 0, 0, 0]);
    
    can.setFilter(0x100, 0x700, 0);
}

function gotCANFrame (bus, id, len, data)
{
    host.log("Bus: " + bus + "  id: " + id.toString(16));
}
function tick()
{
    host.log("TICK!");
}