Label fmt_string
Posted: Thu 6. Oct 2022, 08:12
I seem to be having some difficulties with the string formatters. Is there a better description of the formatters that are supported?
Code: Select all
// =======================================================================================================================
// Global Settings
// =======================================================================================================================
[global]
format=1
compress=0
messages=3
variables=3
labels=3
fonts=2
[font1]
font="century_16_18_numbers.fon"
name="Font1"
type=0
[font2]
font="Palatino_Linotype_24_28.fon"
name="Font2"
type=0
//-------------Messages-----------------------
[message1]
enable=1
name="EEC1"
canid=0x0CF00400
frametype=1
channel=0
timeout=0
[message2]
enable=1
name="CCVS1"
canid=0x18FEF100
frametype=1
channel=0
timeout=0
[message3]
enable=1
name="VEP1"
canid=0x18FEF700
frametype=1
channel=0
timeout=0
//----------------Variables---------------------
[variable1]
name="RPM"
messagename="EEC1"
position=32,16
byteorder=1
muxtype=0
muxval=0
scale=0.125
offset=0
vartype=2
datatype=2
[variable2]
name="SPEED"
messagename="CCVS1"
position=16,16
byteorder=1
muxtype=0
muxval=0
scale=0.00390625
offset=0
vartype=2
datatype=2
[variable3]
name="VOLTS"
messagename="VEP1"
position=40,16
byteorder=1
muxtype=0
muxval=0
scale=.05
offset=0
vartype=2
datatype=2
//-------------Labels----------------------
[label1]
position=10,10
name="label1"
font_name="Font2"
fmt_string="%4.1f RPM"
var_name="RPM"
length=10
initval="--- RPM"
fontcolor=255,0,0
bgcolor=0,0,0
update_rate=0
[label2]
position=10,40
name="label2"
font_name="Font2"
fmt_string="%4.1f KPH"
var_name="SPEED"
length=10
initval="--- KPH"
fontcolor=0,255,0
bgcolor=0,0,0
update_rate=0
[label3]
position=10,70
name="label3"
font_name="Font2"
fmt_string="%3.2f Volts"
var_name="VOLTS"
length=10
initval="--- VOLTS"
fontcolor=0,0,255
bgcolor=0,0,0
update_rate=0