Updated BLE to spec. version 0.11

This commit is contained in:
Joe Kearney 2025-02-24 19:54:37 -06:00
parent 82ec410264
commit 908bdbba35
4 changed files with 76 additions and 27 deletions

View file

@ -89,6 +89,27 @@ __attribute__((always_inline)) inline TeamID_t Resolve_Common_Team_ID(uint8_t te
return (team_ID & COMMON_TEAM_ID_MASK);
}
__attribute__((always_inline)) static inline SystemKResult_T Set_Player_With_Audio_Feedback(uint8_t player_ID)
{
static uint8_t Player_ID = 0; // This is static because AUDIO_PRONOUNCE_NUMBER_0_TO_100 needs a *pointer*.
SystemKResult_T result = SYSTEMK_RESULT_SUCCESS;
Player_ID = player_ID;
result = SETTINGS_set_uint8_t(SYSTEMK_SETTING_PLAYERID, Player_ID);
if (result == SYSTEMK_RESULT_SUCCESS)
{
AudioAction_T audio_action = {.ID = AUDIO_PLAY_PLAYER_ID_PROMPT, .Play_To_Completion = true, .Data = (void *)0x00};
Perform_Audio_Action(&audio_action);
AudioAction_T volume_action = {.ID = AUDIO_PRONOUNCE_NUMBER_0_TO_100, .Play_To_Completion = true, .Data = (void *)&Player_ID};
Perform_Audio_Action(&volume_action);
}
return result;
}
__attribute__((always_inline)) inline bool Team_Can_Tag_Me(uint8_t tagging_team_ID)
{
bool can_tag = false;