
Page 96 of 117
G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.
com
7.5.3
gfit_event_set_target_ (0xB5)
Event: An event that is sent to the MCU when G.FIT receives commands over ANT+ or BLE FTMS to set a
target for the session.
Requires Response: Yes, see section 4.4.2.
Depends on Controllable Feature: Target Inclination/Target Resistance Level/Target Power/Target Heart
Rate/Targeted Distance
Corresponding G.FIT library functions: gfit_event_set_target_inclination,
gfit_event_set_target_resistance_level, gfit_event_set_target_power, gfit_event_set_target_heart_rate, and
gfit_event_set_targeted_distance
Table 7-64. gfit_event_set_target_ event message
Byte #
Name
Length
Description
0
Sync
1 byte
Fixed value of 10100100 or 10100101
(Refer to the
Interfacing with ANT General Purpose Chipsets and
Modules document for details.)
1
Length
1 byte
0x02 + Target Value Length
2
Message ID
1 byte
0xE0 (event)
3
Sub-Message ID
1 byte
0xB5 (gfit_event_set_target_)
4
Target Type
1 byte
Indicates the type of target. See Table 7-65.
5-(N-1)
Target Value
Variable
N
Checksum
1 byte
XOR of all previous bytes including the sync byte.
Table 7-65. Target types
Target type
Target value
Value
Description
Length
(bytes)
Description
0x10
Set Target
Inclination
2
Target Inclination (0.01%, signed)
0x11
Set Target
Resistance Level
2
Target Resistance Level (0.5%, signed)
0x12
Set Target Power
2
Target Power (0.25 W, signed)
0x13
Set Target Heart
Rate
1
Target Heart Rate (bpm, unsigned)
0x14
Set Targeted
Distance
4
Targeted Distance (m, unsigned)
Note:
All multi-byte parameters are encoded as little-endian.