Skip to main content
FW version: Stable

User calibration vector

The purpose of the usrcalib functionality is to allow manufacturers to store some information about the vehicle, such as its production number, model, and year. These data are stored permanently (as part of the metadata vector), so even if the vehicle's firmware is changed, the information in the USRCALIB will not be affected.

Command usrcalib [id] [data]

idnamesizeDescription
0usrWelcome200 charEvery controller startup, this will be printed to the terminal
1usrDevName40 charDevice name
2usrDevSN40 charDevice serial number
3usrDevId0int32Any 32-bit signed integer
4usrDevId1int32Any 32-bit signed integer
5usrDevId2int32Any 32-bit signed integer
6usrDevId3int32Any 32-bit signed integer
7usrDevId4int32Any 32-bit signed integer
8usrDevId5int32Any 32-bit signed integer
9usrDevId6int32Any 32-bit signed integer
10usrDevId7int32Any 32-bit signed integer
11usrDevId8int32Any 32-bit signed integer
12usrDevId9int32Any 32-bit signed integer

Change USRCALIB value

Set usrWelcome to "Hello world!": Run this command in the terminal: usrcalib 0 Hello world!

Set usrDevId0 to 123: usrcalib 3 123

Run usrcalib to print the whole USRCALIB vector. To print only one value, use usrcalib 3. If USRCALIB value is a number, its value is stored in the retval variable.

Examples

Set welcome message

Set the welcome message:

SC-felix#>usrcalib 0 Hello world
set usr calibration index 0 to Hello ? (y/n)

Print the whole USRCALIB vector:

SC-felix#>usrcalib
0 usrWelcome 'Hello'
1 usrDevName ''
2 usrDevSN ''
3 usrDevId0 0
4 usrDevId1 0
5 usrDevId2 0
6 usrDevId3 0
7 usrDevId4 0
8 usrDevId5 0
9 usrDevId6 0
10 usrDevId7 0
11 usrDevId8 0
12 usrDevId9 0

Set and read USRCALIB

If you execute usrcalib [id], the return value is actual value stored in the USRCALIB. This only works for integers types (usrDevId0-usrDevId9)

Set USRCALIB "usrDevId0" to value 1234:

SC-felix#>usrcalib 3 1234
set usr calibration index 3 to 1234 ? (y/n)

Read the value:

SC-felix#>usrcalib 3
3 usrDevId0 1234
SC-felix#>vr
List of available dynamic vars:
-> retval int32 : 1234
-> ticks uint32 : 2961034
-> debuglevel uint8 : 16
-> errlevel uint8 : 17

Total 4 entries
SC-felix#>