Fixes after testing.
This commit is contained in:
parent
47822bbdec
commit
cd33c35974
4 changed files with 92 additions and 16 deletions
|
@ -154,10 +154,12 @@ void BLE_UpdateStatusPacket(uint8_t current_state)
|
|||
uint8_t team_ID;
|
||||
uint8_t player_ID;
|
||||
uint8_t weapon_ID;
|
||||
uint32_t secondary_color;
|
||||
Protocol_T protocol;
|
||||
(void) SETTINGS_get_uint8_t(SYSTEMK_SETTING_TEAMID, &team_ID);
|
||||
(void) SETTINGS_get_uint8_t(SYSTEMK_SETTING_PLAYERID, &player_ID);
|
||||
(void) SETTINGS_get_uint8_t(SYSTEMK_SETTING_WEAPONID, &weapon_ID);
|
||||
(void) SETTINGS_get_uint32_t(SYSTEMK_SETTING_SECONDARY_COLOR, &secondary_color);
|
||||
protocol = GetWeaponFromID(weapon_ID).Protocol;
|
||||
uint32_t Team_Color = (uint32_t)PROTOCOLS_GetColor(protocol, team_ID, player_ID);
|
||||
|
||||
|
@ -186,10 +188,10 @@ void BLE_UpdateStatusPacket(uint8_t current_state)
|
|||
Advertising_Data.data[19] = (Team_Color >> 8) & 0xFF;
|
||||
Advertising_Data.data[20] = (Team_Color >> 16) & 0xFF;
|
||||
Advertising_Data.data[21] = (Team_Color >> 24) & 0xFF;
|
||||
Advertising_Data.data[22] = (Team_Color >> 0) & 0xFF; // Secondary Color
|
||||
Advertising_Data.data[23] = (Team_Color >> 8) & 0xFF; // Secondary Color
|
||||
Advertising_Data.data[24] = (Team_Color >> 16) & 0xFF; // Secondary Color
|
||||
Advertising_Data.data[25] = (Team_Color >> 24) & 0xFF; // Secondary Color
|
||||
Advertising_Data.data[22] = (secondary_color >> 0) & 0xFF;
|
||||
Advertising_Data.data[23] = (secondary_color >> 8) & 0xFF;
|
||||
Advertising_Data.data[24] = (secondary_color >> 16) & 0xFF;
|
||||
Advertising_Data.data[25] = (secondary_color >> 24) & 0xFF;
|
||||
Advertising_Data.data[26] = current_state;
|
||||
Advertising_Data.data[27] = 0xFF;
|
||||
Advertising_Data.data[28] = 0xFF;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue