Skip to content

platform: re-enable HAS_BUILTIN_HRM capability #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions platform/platform_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
{
'HAS_ACCESSORY_CONNECTOR',
'HAS_APP_GLANCES',
# 'HAS_BUILTIN_HRM', -- TODO: disabled because driver was removed
# 'HAS_BUILTIN_HRM', -- disabled by default
'HAS_CORE_NAVIGATION4',
'HAS_HEALTH_TRACKING',
'HAS_JAVASCRIPT',
Expand All @@ -209,7 +209,7 @@
'COMPOSITOR_USES_DMA',
'HAS_ACCESSORY_CONNECTOR',
'HAS_APP_GLANCES',
# 'HAS_BUILTIN_HRM', -- TODO: disabled because driver was removed
# 'HAS_BUILTIN_HRM', -- disabled by default
'HAS_CORE_NAVIGATION4',
'HAS_GLYPH_BITMAP_CACHING',
'HAS_HEALTH_TRACKING',
Expand Down Expand Up @@ -323,6 +323,10 @@ def get_capability_dict(ctx, board):
if ctx.env.NOJS:
capabilities_of_board.discard('HAS_JAVASCRIPT')

if ctx.env.SILK_HR:
# Enable builtin HRM for Silk
capabilities_of_board.add('HAS_BUILTIN_HRM')

# End overrides section

false_capabilities = master_capability_set - capabilities_of_board
Expand Down
7 changes: 6 additions & 1 deletion platform/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ def has_touch(ctx):

@conf
def get_hrm(ctx):
return None
if is_robert(ctx):
return "AS7000"
elif is_silk(ctx):
return "AS7000"
else:
return None


@conf
Expand Down
Loading
Loading